-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_processCcd_each_field_jobarray.sl
52 lines (40 loc) · 1.49 KB
/
run_processCcd_each_field_jobarray.sl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash -l
#SBATCH -p shared
#SBATCH -n 4
#SBATCH --mem=8GB
#SBATCH -t 04:00:00
#SBATCH -J wiynrun_project
#SBATCH -L project
#SBATCH -C haswell
#SBATCH --array=0-81
export OMP_NUM_THREADS=4
# module swap pgi gcc
# Set up LSST environment for WIYN+WHIC
# LSST Stack Conda installed maintained by Heather Kelly
# Twinkles Hack Weeek version
source /global/common/cori/contrib/lsst/lsstDM/setupStack-12_1.sh
# obs_lsstSim 12.1 + one commit
setup -j -r /global/homes/w/wmwv/local/lsst/obs_file
setup -j -r /global/homes/w/wmwv/local/lsst/meas_base
# Overwrite the catalog location to get the 2MASS catalogs.
export ASTROMETRY_NET_DATA_DIR=/project/projectdirs/m1727/cat/2MASS
# WIYN=${HOME}/tmp
WIYN=/global/project/projectdirs/lsst/wmwv/test/
REPO=${WIYN}/test_dr1
# Here's how we construct this in theory, but we have to already
# know it to determine things like how many jobs to request in the array.
#SNARR = `find $REPO/raw -name "*_?_*_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].lsst.fits" -exec basename {} \; | cut -f 1 -d _ | sort | uniq > field.list`
SNARR=(`cat field.list`)
snname=${SNARR[$SLURM_ARRAY_TASK_ID]}
echo "snname: $snname"
IMAGES=`find $REPO/raw -name "${snname}_?_*_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].lsst.fits" -exec basename {} \;`
# echo $IMAGES[*]
for imfile in ${IMAGES[*]}; do
processCcd.py ${REPO} \
-j 4 \
--id filename=$imfile \
--output ${REPO} \
-C processCcd.config \
--clobber-config \
--clobber-version
done