- Timestamp:
- Jul 31, 2014, 2:35:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo
r35097 r37163 4 4 5 5 if (not($?VERBOSE)) set VERBOSE = 0 6 if (not($?PARALLEL)) set PARALLEL = 0 6 7 7 $OUTDIR = sas 128 $OUTDIR = sasdata 8 9 9 10 macro mkfull 10 11 init.db 11 mkcatdir 12 # mkcatdir.cam 13 mkcatdir.stk 12 14 end 13 15 … … 18 20 $dbpass = dvo 19 21 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 22 # are these used to find the exposures in any way? 23 $RA = 333.5 24 $DEC = -5.0 28 25 29 26 break -auto off … … 40 37 41 38 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 42 macro mkcatdir 39 macro mkcatdir.cam 43 40 if ($0 != 1) 44 41 echo "mkcatdir" … … 49 46 50 47 local catdir 51 $catdirbase = catdir.sas 1248 $catdirbase = catdir.sas.cam 52 49 $catdir = $OUTDIR/$catdirbase 53 50 exec rm -rf $catdir 54 51 55 $expfile = sas 12.test.psps/o5745g0620o.356996.cm.47345852 $expfile = sasdata/o5745g0620o.356996.cm.473458 56 53 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $expfile.smf 57 54 58 55 # are these used to find the exposures in any way? 59 $RA = 333. 860 $DEC = 1.656 $RA = 333.5 57 $DEC = -5.0 61 58 62 59 # a single exposure … … 71 68 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("cam", "full", $expID, "$catdirbase") 72 69 73 # a single stack74 $stkfile = sas12.test.psps/RINGS.V3.skycell.1225.070.stk.1032983.skycal.4053175 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf76 77 $stkID = 178 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft")79 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID)80 dbinsert stackSumSkyfile (stack_id) values ($stkID)81 dbinsert skycalRun (skycal_id, stack_id) values ($stkID, $stkID)82 dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile")83 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("skycal", "full", $stkID, "$catdirbase")84 85 70 # catdirs for the exposures 86 71 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged") … … 89 74 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase") 90 75 dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0) 76 end 77 78 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 79 macro mkcatdir.stk 80 if ($0 != 1) 81 echo "mkcatdir" 82 break 83 end 84 85 mkdir $OUTDIR 86 87 local catdir 88 $catdirbase = catdir.sas.stk 89 $catdir = $OUTDIR/$catdirbase 90 exec rm -rf $catdir 91 92 # are these used to find the exposures in any way? 93 $RA = 333.5 94 $DEC = -5.0 95 96 $TIMEFORMAT = mjd 97 $TIMEREF = 2001/01/01,00:00:00 98 ctimes -abs 2010/01/01,00:00:00 -var mjd 99 100 # a single stack 101 $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960 102 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf 103 104 # echo relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update 105 # exec relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update 106 107 break -auto off 108 $tmpline = `echo $stkfile.cmf | fields IMAGEID` 109 list words -split $tmpline 110 $stkID = $words:1 111 break -auto on 112 113 $expID = 1 114 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft") 115 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID) 116 dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd) 117 dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID) 118 dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile") 119 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("skycal", "full", $stkID, "$catdirbase") 91 120 92 121 # catdirs for the stack
Note:
See TracChangeset
for help on using the changeset viewer.
