Skip to content

Commit

Permalink
Merge pull request #182 from SgmAstro/jk_implement
Browse files Browse the repository at this point in the history
Jk implement
  • Loading branch information
michaelJwilson authored May 11, 2022
2 parents 9a6f212 + 71cd0eb commit 5d2f173
Show file tree
Hide file tree
Showing 28 changed files with 713 additions and 339 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ logs/*.log
bin/*~
bin/test.sh
bin/*.log
bin/custom
bin/custom
.ipynb_checkpoints/
__pycache__/
bin/__pycache__/
bin/deprecated/
*.pyc
Empty file added __init__.py
Empty file.
133 changes: 0 additions & 133 deletions bin/gama_pipeline

This file was deleted.

10 changes: 3 additions & 7 deletions bin/gold_d8_pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,18 @@ else
echo 'SURVEY SET TO BE '$SURVEY
fi

if [[ $SURVEY = 'gama' ]]
then
declare -a FIELDS=('G9' 'G12' 'G15')
else
declare -a FIELDS=('R1' 'R2' 'R8' 'R9' 'R10' 'R17')
fi

export PATH=$HOME/.conda/envs/lumfn/bin/:$CODE_ROOT/bin/:$PATH
export PYTHONPATH=$CODE_ROOT:$PYTHONPATH

mapfile -t FIELDS < $CODE_ROOT/data/$SURVEY'_fields.txt'

echo
echo 'Environment:'
echo
echo 'Code: '$CODE_ROOT
echo 'Gold output dir.: '$GOLD_DIR
echo 'Randoms output dir: '$RANDOMS_DIR
echo 'Fields: '${FIELDS[@]}

cd $CODE_ROOT

Expand Down
2 changes: 1 addition & 1 deletion bin/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def pipeline(args, use_sbatch=False, reset=False, nooverwrite=False, dryrun=True
if __name__ == '__main__':
# --log
# Sbatch: python3 pipeline.py --survey gama --use_sbatch --queue cosma --reset
# Head: python3 pipeline.py --survey desi
# Head: python3 pipeline.py --survey desi --dryrun
#
# Note: use sinfo to see available nodes to each queue.
#
Expand Down
22 changes: 0 additions & 22 deletions cori2cosma

This file was deleted.

8 changes: 8 additions & 0 deletions data/desi_fields.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
R1
R2
R8
R9
R10
R17


3 changes: 3 additions & 0 deletions data/gama_fields.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
G9
G12
G15
8 changes: 4 additions & 4 deletions ddp_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from tmr_ecorr import tmr_ecorr, tmr_q
from abs_mag import abs_mag
from data.ke_params import *
from survey import survey_specifics
from findfile import findfile
from findfile import findfile, fetch_header
from config import Configuration


parser = argparse.ArgumentParser(description='Gen kE DDP limit curves')
parser.add_argument('--log', help='Create a log file of stdout.', action='store_true')
parser.add_argument('--nooverwrite', help='Do not overwrite outputs if on disk', action='store_true')
Expand Down Expand Up @@ -45,8 +45,8 @@
gmrs_0p0 = np.array([0.158, 0.298, 0.419, 0.553, 0.708, 0.796, 0.960])

# bright and faint limits.
limits = survey_specifics(survey)
rlims = [limits['rmax'], limits['rlim']]
rlims = [fetch_header(ftype='gold', name='RMAX', survey=survey),\
fetch_header(ftype='gold', name='RLIM', survey=survey)]

root = os.environ['GOLD_DIR'] + f'/ddrp_limits/'

Expand Down
30 changes: 30 additions & 0 deletions deprecated/cori2cosma
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

export SURVEY=desi

export PATH=$CODE_ROOT:$PATH
export RANDOMS_DIR=$CSCRATCH/norberg/GAMA4/randoms/

echo $CODE_ROOT
echo $RANDOMS_DIR

# python3 gen_gold.py --survey desi --dryrun
# python3 gen_gold.py --survey desi

mapfile -t FIELDS < $CODE_ROOT/data/$SURVEY'_fields.txt'

for FIELD in ${FIELDS[@]}
do
echo 'Running: '$FIELD

# python3 randoms.py --survey desi --field $FIELD --dryrun
# python3 randoms.py --survey desi --field $FIELD
done

echo ${1:-1}@login5.cosma.dur.ac.uk:/cosma/home/durham/${1:-1}/data/GAMA4/
echo ${1:-1}@login5.cosma.dur.ac.uk:/cosma/home/durham/${1:-1}/data/GAMA4/randoms/

# scp -i ~/.ssh/id_rsa $CSCRATCH/norberg/GAMA4/desi_gold_dryrun.fits $CSCRATCH/norberg/GAMA4/desi_gold.fits ${1:-1}@login5.cosma.dur.ac.uk:/cosma/home/durham/${1:-1}/data/GAMA4/

scp -i ~/.ssh/id_rsa $RANDOMS_DIR/randoms_R*_0_dryrun.fits $RANDOMS_DIR/randoms_R*_0.fits $RANDOMS_DIR/randoms_R*_x8_0.fits ${1:-1}@login5.cosma.dur.ac.uk:/cosma/home/durham/${1:-1}/data/GAMA4/randoms/

10 changes: 0 additions & 10 deletions desi_fields.py

This file was deleted.

Loading

0 comments on commit 5d2f173

Please sign in to comment.