From 6b19e65ee83175a3cb6be6d7c95c9eeabc2e3938 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Sun, 21 Jul 2024 19:03:58 +0100 Subject: [PATCH] add a desi NN script --- surveys/desi/make_desi_nn.sh | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 surveys/desi/make_desi_nn.sh diff --git a/surveys/desi/make_desi_nn.sh b/surveys/desi/make_desi_nn.sh new file mode 100755 index 0000000..4751eb4 --- /dev/null +++ b/surveys/desi/make_desi_nn.sh @@ -0,0 +1,59 @@ +#!/bin/bash +set -e +TEMPLPREF=/home/skoposov/science/PHOENIX/v2.0/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/ +WAVEFILE=/home/skoposov/science/PHOENIX/v2.0/HiResFITS/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits +BLAM0=3500 +BLAM1=5900 +RLAM0=5660 +RLAM1=7720 +ZLAM0=7420 +ZLAM1=9924 +BSTEP=0.4 +RSTEP=0.4 +ZSTEP=0.4 +BRESOL='x/1.55' +RRESOL='x/1.55' +ZRESOL='x/1.8' +VSINIS=0,300 +REVISION=v240212_phoenn +EVERY=200 +SMOOTH=0.0 +PREFIX=../../..//templ_data/desi/${REVISION}/ + +# rvs_read_grid --prefix /home/skoposov/science/PHOENIX/v2.0/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/ --templdb files.db +# /home/skoposov/science/specfit/rvspecfit/surveys/mask_phoenix_grid.sh ../../..//templ_data/desi/v230209/files.db ../../..//templ_data/desi/v230209/files_masked.db +# rvs_read_grid --prefix /home/skoposov/science/PHOENIX/v2.0/HiResFITS/PHOENIX-ACES-AGSS-COND-2011/ --templdb files.db +# ../mask_phoenix_grid.sh ./files.db ./files_masked_240212.db +DBFILE=${PREFIX}/files_masked_240212.db + +# B + +LAM0=($BLAM0 $RLAM0 $ZLAM0) +LAM1=($BLAM1 $RLAM1 $ZLAM1) +STEP=($BSTEP $RSTEP $ZSTEP) +CONF=(desi_b desi_r desi_z) +RESOL=($BRESOL $RRESOL $ZRESOL) + +for i in 0 1 2; do { + ( + CURLAM0=${LAM0[$i]} + CURLAM1=${LAM1[$i]} + CURCONF=${CONF[$i]} + CURSTEP=${STEP[$i]} + CURRESOL=${RESOL[$i]} + rvs_make_interpol --nthreads 2 --setup $CURCONF --lambda0 $CURLAM0 --lambda1 $CURLAM1 \ + --resol_func $CURRESOL --step $CURSTEP --templdb ${DBFILE} \ + --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --wavefile $WAVEFILE \ + --revision=$REVISION --no-normalize + + rvs_make_ccf --setup $CURCONF --lambda0 $CURLAM0 --lambda1 $CURLAM1 --every $EVERY \ + --vsinis $VSINIS --prefix ${PREFIX}/ --oprefix=${PREFIX} --step $CURSTEP \ + --revision=$REVISION + rvs_make_ccf --setup $CURCONF --lambda0 $CURLAM0 --lambda1 $CURLAM1 --every $EVERY \ + --vsinis $VSINIS --prefix ${PREFIX}/ --oprefix=${PREFIX} --step $CURSTEP \ + --revision=$REVISION --nocontinuum + ) & +} ; done +wait; + +for a in b r z ; do rvs_train_nn_interpolator --pca_init --revision=$REVISION --dir=/home/skoposov/science/specfit/templ_data/desi/${REVISION}/ --setup=desi_${a} ; done