Skip to content

Commit

Permalink
Merge pull request #67 from LSSTDESC/dev
Browse files Browse the repository at this point in the history
add BayeSN
  • Loading branch information
heather999 authored Sep 8, 2022
2 parents dd1746b + 94104b8 commit b9c5b74
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dev-deploy:
- dev
tags: [cori]
script:
- bash conda/build-nersc.sh w_2022_10
- bash conda/set-symlinks.sh dev


Expand Down
8 changes: 8 additions & 0 deletions conda/build-nersc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,16 @@ pip install --no-cache-dir -r ./piplist.txt

conda clean -y -a

# Install bayeSN
git clone https://github.com/bayesn/bayesn-public

python -m compileall $curBuildDir

# Hard-coding this for now for building at NERSC
export PYSYN_CDBS=/global/cfs/cdirs/lsst/groups/TD/SOFTWARE/bayeSN/synphot/grp/redcat/trds
#python $curBuildDir/bayesn-public/fit_sn.py --model T21 --metafile $curBuildDir/bayesn-public/demo_lcs/meta/T21_demo_meta.txt --filters griz --opt $curBuildDir/bayesn-public/demo_lcs/Foundation_DR1/Foundation_DR1_ASASSN-16cs.txt .
python $curBuildDir/bayesn-public/fit_sn.py --model T21 --fittmax 5 --metafile $curBuildDir/bayesn-public/demo_lcs/meta/T21_demo_meta.txt --filters griz --opt $curBuildDir/bayesn-public/demo_lcs/Foundation_DR1/Foundation_DR1_ASASSN-16cs.txt $TMPDIR

# Skipping this for now - they files are downloaded to the user's astropy cache
# Will revisit if it becomes an issue: https://docs.astropy.org/en/stable/utils/data.html
# Force data files to be dowloaded during installation
Expand Down
3 changes: 3 additions & 0 deletions conda/packlist.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
astroplan
celerite
cmdstan
cmdstanpy
coloredlogs
emcee
extinction
f90nml
firecrown
george
gwpy
ipdb
Expand Down
1 change: 1 addition & 0 deletions conda/piplist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gwemlightcurves
lenstronomy
pysynphot==0.9.14
snmachine
17 changes: 14 additions & 3 deletions nersc/setup_td_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,24 @@ do
esac
done

# Check to see if this setup script has already been run in this shell
if [ $TD ]
then
echo "td_env is already set up"
exit 0
fi

export TD=/global/cfs/cdirs/lsst/groups/TD
export TD_ALERTS=${TD}/ALERTS
export TD_DIA=${TD}/DIA
export TD_SL=${TD}/SL
export TD_SN=${TD}/SN
export TD_SOFTWARE=${TD}/SOFTWARE
export TD_PUBLIC=/global/cfs/cdirs/lsst/www/DESC_TD_PUBLIC

export VERSION_LIBPYTHON=3.8

export PYSYN_CDBS=${TD_SOFTWARE}/bayeSN/synphot/grp/redcat/trds

export VERSION_LIBPYTHON=3.8

Expand Down Expand Up @@ -108,9 +119,6 @@ then
export GSL_DIR=$DESC_TD_INSTALL/conda/envs/$LSST_CONDA_ENV_NAME
export CFITSIO_DIR=$DESC_TD_INSTALL/conda/envs/$LSST_CONDA_ENV_NAME

#export GSL_DIR=$CONDA_PREFIX
#export CFITSIO_DIR=$CONDA_PREFIX

export PYTHONPATH=$PYTHONPATH:$DESC_TD_INSTALL

# SLURM_JOB_ID is set only on compute nodes
Expand Down Expand Up @@ -153,6 +161,9 @@ export SNANA_DEBUG="$SNANA_LSST_USERS/kessler/debug"
export SNANA_SETUP_COMMAND="source $TD/setup_td_dev.sh"
export SNANA_IMAGE_DOCKER="lsstdesc/td-env:dev"

# Add env var to point to bayeSN install
export BAYESN_INSTALL=$DESC_TD_INSTALL/bayesn-public


export PATH=$PATH:${SNANA_DIR}/bin:${SNANA_DIR}/util:${PIPPIN_DIR}

Expand Down

0 comments on commit b9c5b74

Please sign in to comment.