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