Changeset 37246 for trunk/ippToPsps/test/mkgpc1data.dvo
- Timestamp:
- Aug 12, 2014, 4:10:18 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/test/mkgpc1data.dvo (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/test/mkgpc1data.dvo
r35753 r37246 15 15 # exp_id stack_id raw_file exp_file offset 16 16 list imagedata 17 1 1 $OUTDIR/test.01 0.000 18 2 1 $OUTDIR/test.02 -0.025 19 3 1 $OUTDIR/test.03 0.025 20 4 1 $OUTDIR/test.04 0.010 21 5 2 $OUTDIR/test.05 0.000 22 6 2 $OUTDIR/test.06 -0.025 23 7 2 $OUTDIR/test.07 0.025 24 8 2 $OUTDIR/test.08 0.010 25 9 3 $OUTDIR/test.09 0.000 26 10 3 $OUTDIR/test.10 -0.025 27 11 3 $OUTDIR/test.11 0.025 28 12 3 $OUTDIR/test.12 0.010 17 1 1 $OUTDIR/test.01 0.000 2010/01/01 01:00:00 18 2 1 $OUTDIR/test.02 -0.025 2010/01/01 02:00:00 19 3 1 $OUTDIR/test.03 0.025 2010/01/01 03:00:00 20 4 1 $OUTDIR/test.04 0.010 2010/01/01 04:00:00 21 5 2 $OUTDIR/test.05 0.000 2010/01/01 05:00:00 22 6 2 $OUTDIR/test.06 -0.025 2010/01/01 06:00:00 23 7 2 $OUTDIR/test.07 0.025 2010/01/01 07:00:00 24 8 2 $OUTDIR/test.08 0.010 2010/01/01 08:00:00 25 9 3 $OUTDIR/test.09 0.000 2010/01/01 09:00:00 26 10 3 $OUTDIR/test.10 -0.025 2010/01/01 10:00:00 27 11 3 $OUTDIR/test.11 0.025 2010/01/01 11:00:00 28 12 3 $OUTDIR/test.12 0.010 2010/01/01 12:00:00 29 29 end 30 30 … … 39 39 # mkcatdir.cam PS1_V3 PS1_V4 40 40 # mkcatdir.stk PS1_V3 PS1_V4 41 mkcatdir.cam PS1_V4 PS1_V4 42 mkcatdir.stk PS1_V4 PS1_V4 41 # mkcatdir.cam PS1_V4 PS1_V4 42 # mkcatdir.stk PS1_V4 PS1_V4 43 mkcatdir.cam PS1_V5 PS1_V5 44 mkcatdir.stk PS1_V5 PS1_V5 43 45 insert.stack.set 44 46 end … … 94 96 $offset = $word:3 95 97 96 ctimes -abs 2008/01/01,$i\:00:00 -var mjd 98 sprintf myDATE "%s" $word:4 99 sprintf myTIME "%s" $word:5 100 echo ctimes -abs $myDATE,$myTIME -var mjd 101 ctimes -abs $myDATE,$myTIME -var mjd 97 102 98 103 # XXX for a simple test of ippToPsps, i need to generate smf files with some correspondence to gpc1 exposure smfs … … 142 147 143 148 mkinput $offset $rawfile 144 exec mkcmf - no-noise -append $rawfile $cmffile -date 2008/1/1 -time $i\:00:00-radec $RA $DEC -type $1 -imageID $ID -sourceID 0149 exec mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -radec $RA $DEC -type $1 -imageID $ID -sourceID 0 145 150 146 151 # keywords which are read from image extension … … 203 208 end 204 209 205 if ( $i == 5)210 if (0 && ($i == 5)) 206 211 echo "NOTE: adding image $i 2x to DVO, but without detections : this simulates a failure in LAP dvo" 207 212 208 echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images209 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images213 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images 214 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images 210 215 end 211 216 212 if ( $i == 7)217 if (0 && ($i == 7)) 213 218 echo "NOTE: adding detections from image $i 2x to DVO, but with wrong photcode and duplicate image ID : this simulates a failure in LAP dvo" 214 echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J215 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J219 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J 220 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J 216 221 end 217 222 218 echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 219 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 220 end 223 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 224 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 225 end 226 227 echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 228 exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 221 229 222 230 if ($PARALLEL) … … 264 272 $offset = $word:2 265 273 274 ## this is not generating photcodes recognized as stack by relphot 275 266 276 mkinput $offset $rawfile 267 exec mkcmf $rawfile $cmffile -extname SkyChip -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1277 exec mkcmf -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extname SkyChip -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1 268 278 269 279 # add some required header keywords: 270 280 exec echo "HIERARCH FPA.ZP = 25. / Magnitude zero point" > tmp.hdr 281 exec echo "TESS_ID = 'RINGS.V3'" >> tmp.hdr 282 exec echo "SKYCELL = 'skycell.1133.081'" >> tmp.hdr 271 283 exec fits_insert $cmffile tmp.hdr 272 284 273 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 274 end 285 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 286 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 287 end 288 289 echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 290 exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 275 291 276 292 if ($PARALLEL) … … 308 324 309 325 # a single exposure 310 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl) values ($myID, "test.$myID", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}) 326 echo $myDATE 327 echo $myTIME 328 329 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl, dateobs) values ($myID, "test.$myID", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}, '$myDATE $myTIME') 311 330 dbinsert chipRun (exp_id, chip_id) values ($myID, $myID) 312 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", " testsoft")331 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", "38000M") 313 332 dbinsert camProcessedExp (cam_id, path_base, fault) values ($myID, "$filename", 0) 314 333 dbinsert fakeRun (fake_id, cam_id) values ($myID, $myID) … … 332 351 $stkfile = $2 333 352 334 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft") 353 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "37500") 354 355 $TIMEFORMAT = mjd 356 $TIMEREF = 2001/01/01,00:00:00 357 358 $mjdsum = 0.0 359 $Nstk = 0 335 360 336 361 for i 0 $imagedata:n … … 341 366 $expID = $tmp:0 342 367 $expfile = $tmp:2 368 sprintf myDATE "%s" $tmp:4 369 sprintf myTIME "%s" $tmp:5 343 370 insert.exp $expID $expfile 344 371 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID) 345 end 346 dbinsert stackSumSkyfile (stack_id) values ($stkID) 347 dbinsert skycalRun (skycal_id, stack_id) values ($stkID, $stkID) 372 373 echo ctimes -abs $myDATE,$myTIME -var mjd 374 ctimes -abs $myDATE,$myTIME -var mjd 375 $mjdsum += $mjd 376 $Nstk ++ 377 end 378 $mjd = $mjdsum / $Nstk 379 380 dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd) 381 dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID) 348 382 dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile") 349 383
Note:
See TracChangeset
for help on using the changeset viewer.
