GALAXEV 安装

GALAXEV 安装及使用
1.下载bc03星族数据文件和源文件
https://www.bruzual.org/bc03/
2.解压缩
3.配置环境变量及编译
将下列命令放到~/.bashrc里面

export bc03="/home/lzf/IRX/pycode/bc03/src"
. $bc03/.bc_bash

编译

cd $bc03
make all	

================================================
提取SSP步骤
1.ised2spec.py
编辑配置文件 gpl_conf1.txt、gpl_conf2.txt。[分别是输入ised文件、年龄(由于最多输出114列,因此分两次 112+108)、波长参数、输出文件名]
2.整合文件头几行

sed -i '1,2d' `find . -name "*.spec"`
cd 
head 4 bc2003_lr_BaSeL_m22_chab_ssp1.spec > ../../header1.txt
head 4 bc2003_lr_BaSeL_m22_chab_ssp2.spec > ../../header2.txt
cd ../../
cat header2.txt | cut -d' ' -f 2- > header3.txt
paste header1.txt header3.txt > header.txt

3.整理数据文件

sed -i '1,4d' `find -name "*.spec"`
for f in `find . -name "*2.spec"`
do  
export out=${f:0:(-6)}4.spec
cat $f | cut -d' ' -f 2- > ${f:0:(-6)}3.spec
paste ${f:0:(-6)}1.spec ${f:0:(-6)}3.spec > $out
done

其中,
获取每个数据文件名

for f in `find . -name "*2.spec"`
do 
export tmp=`echo $f | cut -d '/' -f 4`
echo ${tmp:0:(-6)}
done

4.加上头文件

for f in `find . -name "*2.spec"`
do 
cat header.txt ${f:0:(-6)}4.spec > ${f:0:(-6)}.spec
done
find -name "*[1,2,3,4].spec" | xargs rm

5.将其他模板文件整合过来

export ori_root = "/home/lzf/IRX/pycode/bc03"
export lib_names="BaSeL MIles Stelib"
export imf_names="Chabrier Kroupa Salpeter TopHeavy"
for lib in $lib_names
do
for imf in $imf_names
do
cp ${ori_root}/${lib}/${imf}/* ${lib}/${imf}/
done
done
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值