forked from deapplegate/wtgpipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadam_quicktools_reg_phys2wcs.sh
executable file
·29 lines (23 loc) · 1.07 KB
/
adam_quicktools_reg_phys2wcs.sh
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
#! /bin/bash -xv
#adam-does# this code changes the coordinates of region files from physical to fk5
#adam-predecessor# this code came from /nfs/slac/g/ki/ki18/anja/SUBARU/MACS0416-24/W-C-RC_2010-11-04/reg/wcs2phys.sh
#adam-call_example# ./adam_wcs2phys.sh /nfs/slac/g/ki/ki18/anja/SUBARU/MACS0416-24/W-C-RC/SCIENCE/autosuppression/ /nfs/slac/g/ki/ki18/anja/SUBARU/MACS0416-24/W-C-RC/SCIENCE/ OCF
#adam-comments# could be adapted to change other properties as well
regdir="/nfs/slac/g/ki/ki18/anja/SUBARU/MACS1226+21/W-C-RC_2010-02-12/SCIENCE/reg"
scidir="/nfs/slac/g/ki/ki18/anja/SUBARU/MACS1226+21/W-C-RC_2010-02-12/SCIENCE"
ending="OCF"
for file in $(ls -1 ${regdir}/SUPA011833[4-6]_*.reg)
do
base=`basename ${file}`
BASE_no_ext=`basename ${file} .reg`
ds9 ${scidir}/${BASE_no_ext}${ending}.fits &
sleep 5
xpaset -p ds9 lower
xpaset -p ds9 regions load ${file}
xpaset -p ds9 regions format ds9
xpaset -p ds9 regions system wcs
#xpaset -p ds9 regions skyformat sexagesimal
xpaset -p ds9 regions save ${regdir}/wcs_regs/${base}
xpaset -p ds9 regions delete all
done
xpaset -p ds9 exit