- Timestamp:
- Sep 19, 2014, 4:05:27 PM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippToPsps/test (modified) (1 prop)
-
ippToPsps/test/mksasdata.dvo (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/ippToPsps/test
- Property svn:ignore
-
old new 1 1 testdata 2 2 sas12 3 logs 4 initbatch.dat 5 ipptopsps_pv2_logs 6 cambatch.dat 7 tmp.hdr 8 stackbatch.dat 9 objectbatch.dat
-
- Property svn:ignore
-
branches/eam_branches/ps2-tc3-20130727/ippToPsps/test/mksasdata.dvo
r35097 r37403 4 4 5 5 if (not($?VERBOSE)) set VERBOSE = 0 6 if (not($?PARALLEL)) set PARALLEL = 0 6 7 7 $OUTDIR = sas12 8 $OUTDIR = sasdata 9 10 if (not($?KEEPDVO)) set KEEPDVO = 0 11 12 list expfiles 13 sasdata/o5745g0495o.356867.cm.982612 14 sasdata/o5745g0507o.356882.cm.982626 15 sasdata/o5745g0517o.356892.cm.982636 16 sasdata/o5745g0527o.356909.cm.982650 17 end 8 18 9 19 macro mkfull 10 20 init.db 11 mkcatdir 21 mkcatdir.cam 22 mkcatdir.stk 23 mkcal 24 mkgpc1.cam 25 mkgpc1.stk 12 26 end 13 27 … … 18 32 $dbpass = dvo 19 33 20 # exposure center 21 $RA = 333.8 22 $DEC = 1.6 23 24 # stack center 25 # XXX the selected stack centers come from the input exposures, so I should use a gpc1 db with stacks associated with real exposures 26 $RA = 331.6 27 $DEC = -6.0 34 # are these used to find the exposures in any way? 35 # center of the test skycell 36 $RA = 333.5 37 $DEC = -5.0 28 38 29 39 break -auto off … … 36 46 # system-wide info 37 47 dbinsert ippToPspsFake (my_id) values (2) 38 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, "skycell. 0000.000")48 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, "skycell.1225.070") 39 49 end 40 50 41 51 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 42 macro mkcatdir 52 macro mkcatdir.cam 43 53 if ($0 != 1) 44 54 echo "mkcatdir" … … 49 59 50 60 local catdir 51 $catdirbase = catdir.sas12 61 $catdirbase = catdir.sas.cam 62 $catdir = $OUTDIR/$catdirbase 63 64 exec rm -rf $catdir 65 66 for i 0 $expfiles:n 67 $expfile = $expfiles:$i 68 69 exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf -update 70 end 71 exec addstar -D CATDIR $catdir -region 330 340 -10 0 -resort 72 end 73 74 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 75 macro mkcatdir.stk 76 if ($0 != 1) 77 echo "mkcatdir" 78 break 79 end 80 81 mkdir $OUTDIR 82 83 local catdir 84 $catdirbase = catdir.sas.stk 52 85 $catdir = $OUTDIR/$catdirbase 53 86 exec rm -rf $catdir 54 87 55 $expfile = sas12.test.psps/o5745g0620o.356996.cm.473458 56 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $expfile.smf 88 # a single stack 89 $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960 90 exec addstar -D CAMERA gpc1 -D CATFORMAT PS1_V5 -D CATDIR $catdir $stkfile.cmf 91 end 57 92 58 # are these used to find the exposures in any way? 59 $RA = 333.8 60 $DEC = 1.6 93 macro mkcal 61 94 62 # a single exposure 63 $expID = 1 64 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl) values ($expID, "o5745g0620o", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}) 65 dbinsert chipRun (exp_id, chip_id) values ($expID, $expID) 66 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($expID, $expID, "testgroup", "testsoft") 67 dbinsert camProcessedExp (cam_id, path_base) values ($expID, "$expfile") 68 dbinsert fakeRun (fake_id, cam_id) values ($expID, $expID) 69 dbinsert warpRun (warp_id, fake_id) values ($expID, $expID) 70 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($expID, "skycell.0000.000", "XY00") 71 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("cam", "full", $expID, "$catdirbase") 95 local catdir 96 $catdir = $OUTDIR/catdir.sas.cam 97 98 # merge the cam and stk databases together: 99 exec dvomerge $OUTDIR/catdir.sas.stk into $catdir 100 101 # run relphot 102 echo relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update -boundary-tree tess.3pi.fits 103 exec relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update -boundary-tree tess.3pi.fits 104 105 echo relastro -v -D CATDIR $catdir -images -update-chips -region 330 340 -10 0 -update 106 exec relastro -v -D CATDIR $catdir -images -update-chips -region 330 340 -10 0 -update 107 end 108 109 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 110 macro mkgpc1.cam 111 if ($0 != 1) 112 echo "mkgpc1.cam" 113 break 114 end 115 116 local catdirbase 117 $catdirbase = catdir.sas.cam 118 119 for i 0 $expfiles:n 120 $expfile = $expfiles:$i 121 122 # are these used to find the exposures in any way? 123 $RA = 333.9 124 $DEC = -3.8 125 126 # a single exposure 127 $expID = $i + 1 128 substr $expfile 8 11 expname 129 130 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl, dateobs) values ($expID, "$expname", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}, "2010/01/01 00:00:00") 131 dbinsert chipRun (exp_id, chip_id) values ($expID, $expID) 132 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($expID, $expID, "testgroup", "38000M") 133 dbinsert camProcessedExp (cam_id, path_base, fault) values ($expID, "$expfile", 0) 134 dbinsert fakeRun (fake_id, cam_id) values ($expID, $expID) 135 dbinsert warpRun (warp_id, fake_id) values ($expID, $expID) 136 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($expID, "skycell.1225.070", "XY00") 137 dbinsert addRun (add_id, stage, state, stage_id, minidvodb_name) values ($expID, "cam", "full", $expID, "$catdirbase") 138 dbinsert addProcessedExp (add_id, fault) values ($expID, 0) 139 140 # catdirs for the exposures 141 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged") 142 dbinsert minidvodbProcessed (minidvodb_id, fault) values (1, 0) 143 144 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase") 145 dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0) 146 end 147 end 148 149 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 150 macro mkgpc1.stk 151 if ($0 != 1) 152 echo "mkgpc1.stk" 153 break 154 end 155 156 local catdirbase 157 $catdirbase = catdir.sas.cam 158 159 $TIMEFORMAT = mjd 160 $TIMEREF = 2001/01/01,00:00:00 161 ctimes -abs 2010/01/01,00:00:00 -var mjd 72 162 73 163 # a single stack 74 $stkfile = sas12.test.psps/RINGS.V3.skycell.1225.070.stk.1032983.skycal.40531 75 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf 164 $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960 76 165 77 $stkID = 1 78 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft") 166 break -auto off 167 $tmpline = `echo $stkfile.cmf | fields IMAGEID` 168 list words -split $tmpline 169 $stkID = $words:1 170 break -auto on 171 172 $expID = 1 173 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.1225.070", "i.00000", "37500M") 79 174 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID) 80 dbinsert stackSumSkyfile (stack_id ) values ($stkID)81 dbinsert skycalRun (sky cal_id, stack_id) values ($stkID, $stkID)175 dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd) 176 dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID) 82 177 dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile") 83 178 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("skycal", "full", $stkID, "$catdirbase") 84 85 # catdirs for the exposures86 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged")87 dbinsert minidvodbProcessed (minidvodb_id, fault) values (1, 0)88 89 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase")90 dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0)91 179 92 180 # catdirs for the stack
Note:
See TracChangeset
for help on using the changeset viewer.
