Skip to content

Commit

Permalink
streamline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Jul 30, 2024
1 parent 07f0bd1 commit 1b8fcb2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/scripts/gen_test_templ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DIR=`dirname $0`/../
DBFILE=$DIR/files_config1.db
PREF=$DIR/tmp/
PREF1=$DIR/templ_data_test/
PREF_TMP=$DIR/templ_data_tmp/
PREF_TMP=$PREF1/tmp/

CONF_NAME=config1
STEP=1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -e
DIR=`dirname $0`/../
PREFIX=$DIR//templ_data
PREFIX0=$DIR//templ_data/
PREFIX=$DIR//templ_data_aat
TEMPLPREF=$DIR/small_phoenix/
WAVEFILE=$DIR/small_phoenix/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits
BLAM0=3500
Expand All @@ -18,8 +19,8 @@ RVS_MAKE_ND="$COV `command -v rvs_make_nd`"
RVS_MAKE_CCF="$COV `command -v rvs_make_ccf`"


$RVS_READ_GRID --prefix $TEMPLPREF --templdb $PREFIX/files.db
$RVS_MAKE_INTERPOL --air --setup $BNAME --lambda0 $BLAM0 --lambda1 $BLAM1 --resol $BRESOL --step $BSTEP --templdb ${PREFIX}/files.db --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --fixed_fwhm --wavefile $WAVEFILE --nthreads 1
$RVS_READ_GRID --prefix $TEMPLPREF --templdb $PREFIX0/files.db
$RVS_MAKE_INTERPOL --air --setup $BNAME --lambda0 $BLAM0 --lambda1 $BLAM1 --resol $BRESOL --step $BSTEP --templdb ${PREFIX0}/files.db --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --fixed_fwhm --wavefile $WAVEFILE --nthreads 1

$RVS_MAKE_ND --prefix ${PREFIX}/ --setup $BNAME

Expand Down
7 changes: 4 additions & 3 deletions tests/scripts/make_templ_nn.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -e
DIR=`dirname $0`/../
PREFIX=$DIR//templ_data
PREFIX0=$DIR//templ_data
PREFIX=$DIR//templ_data_nn/
TEMPLPREF=$DIR/small_phoenix/
WAVEFILE=$DIR/small_phoenix/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits
BLAM0=3500
Expand All @@ -18,6 +19,6 @@ RVS_MAKE_ND="$COV `command -v rvs_train_nn_interpolator`"
RVS_MAKE_CCF="$COV `command -v rvs_make_ccf`"


$RVS_READ_GRID --prefix $TEMPLPREF --templdb $PREFIX/files.db
$RVS_MAKE_INTERPOL --air --setup $BNAME --lambda0 $BLAM0 --lambda1 $BLAM1 --resol $BRESOL --step $BSTEP --templdb ${PREFIX}/files.db --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --fixed_fwhm --wavefile $WAVEFILE --nthreads 1
$RVS_READ_GRID --prefix $TEMPLPREF --templdb $PREFIX0/files.db
$RVS_MAKE_INTERPOL --air --setup $BNAME --lambda0 $BLAM0 --lambda1 $BLAM1 --resol $BRESOL --step $BSTEP --templdb ${PREFIX0}/files.db --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --fixed_fwhm --wavefile $WAVEFILE --nthreads 1
$RVS_MAKE_ND --dir ${PREFIX}/ --pca_init --npc 10 --cpu --setup $BNAME
7 changes: 4 additions & 3 deletions tests/scripts/make_templ_regul.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -e
DIR=`dirname $0`/../
PREFIX=$DIR//templ_data
PREFIX0=$DIR/templ_data
PREFIX=$DIR/templ_data_regul
TEMPLPREF=$DIR/small_phoenix/
WAVEFILE=$DIR/small_phoenix/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits
BLAM0=3500
Expand All @@ -16,8 +17,8 @@ RVS_MAKE_INTERPOL="$COV `command -v rvs_make_interpol`"
RVS_REGULARIZE_GRID="$COV `command -v rvs_regularize_grid`"


$RVS_READ_GRID --prefix $TEMPLPREF --templdb $PREFIX/files.db
$RVS_MAKE_INTERPOL --air --setup $BNAME --lambda0 $BLAM0 --lambda1 $BLAM1 --resol $BRESOL --step $BSTEP --templdb ${PREFIX}/files.db --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --fixed_fwhm --wavefile $WAVEFILE --nthreads 1
$RVS_READ_GRID --prefix $TEMPLPREF --templdb $PREFIX0/files.db
$RVS_MAKE_INTERPOL --air --setup $BNAME --lambda0 $BLAM0 --lambda1 $BLAM1 --resol $BRESOL --step $BSTEP --templdb ${PREFIX0}/files.db --oprefix ${PREFIX}/ --templprefix $TEMPLPREF --fixed_fwhm --wavefile $WAVEFILE --nthreads 1

$RVS_REGULARIZE_GRID --input $PREFIX/specs_$BNAME.pkl --output $PREFIX/specs_$BNAME.pkl

5 changes: 3 additions & 2 deletions tests/test_01template_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def run_script(script):
def test_scripts():
run_script(path + '/scripts/make_templ_nn.sh')

run_script(path + '/scripts/make_templ.sh')
run_script(path + '/scripts/gen_test_templ.sh')
run_script(path + '/scripts/make_templ_aat_triang.sh')

run_script(path + '/scripts/make_templ_regul.sh')

run_script(path + '/scripts/gen_test_templ.sh')
run_script(path + '/scripts/gen_test_templ_grid.sh')

0 comments on commit 1b8fcb2

Please sign in to comment.