Example on NERSCΒΆ
First, create your Obiwan directory and copy/link the legacy survey data:
mkdir -p ${CSCRATCH}/Obiwan/dr9/data/
cp /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/ccds-annotated-* ${CSCRATCH}/Obiwan/dr9/data/
cp /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/survey-* ${CSCRATCH}/Obiwan/dr9/data/
ln -s /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/calib/ ${CSCRATCH}/Obiwan/dr9/data/
ln -s /global/cfs/cdirs/cosmo/work/legacysurvey/dr9m/images/ ${CSCRATCH}/Obiwan/dr9/data/
Next, clone the Obiwan repo and pull the docker image (see Building):
cd
git clone https://github.com/adematti/obiwan.git
shifterimg -v pull adematti/obiwan:DR9
Note
Obiwan executable is in the Docker image. In the following we just use bin.
Generate randoms file (see Pre-processing):
cd obiwan/bin
shifter --volume ${HOME}:/homedir/ --image=adematti/obiwan:DR9 /bin/bash
source legacypipe-env.sh
python preprocess.py --do randoms
Create run list, taking into account legacypipe versions used for bricks in $LEGACYPIPE_SURVEY_DIR/north/ (see Running):
python /src/obiwan/py/obiwan/scripts/runlist.py --outdir $LEGACYPIPE_SURVEY_DIR/north/ --brick bricklist.txt --write-list runlist.txt --modules legacypipe
Then run Obiwan (see Running):
srun -n 2 shifter --module=mpich-cle6 --volume ${HOME}:/homedir/ --image=adematti/obiwan:DR9 ./mpi_runbricks.sh
Enter your shifter image, check everything ran, match and plot the comparison (see Post-processing):
shifter --volume ${HOME}:/homedir/ --image=adematti/obiwan:DR9 /bin/bash
cd ${HOME}/obiwan/bin
python /src/obiwan/py/obiwan/scripts/check.py --outdir $CSCRATCH/Obiwan/dr9/test --brick bricklist_400N-EBV.txt
python /src/obiwan/py/obiwan/scripts/match.py --cat-dir $CSCRATCH/Obiwan/dr9/test/merged --outdir $CSCRATCH/Obiwan/dr9/test --plot-hist plots/hist.png
You can also merge catalogs, plot cpu and memory usage, image cutouts:
python /src/obiwan/py/obiwan/scripts/merge.py --filetype randoms tractor --cat-dir $CSCRATCH/Obiwan/dr9/test/merged --outdir $CSCRATCH/Obiwan/dr9/test
python /src/obiwan/py/obiwan/scripts/resources.py --outdir $CSCRATCH/Obiwan/dr9/test --plot-fn plots/resources-summary.png
python /src/obiwan/py/obiwan/scripts/cutout.py --outdir $CSCRATCH/Obiwan/dr9/test --plot-fn "plots/cutout_%(brickname)s-%(icut)d.png" --ncuts 2