Changeset 38888 for trunk/ippToPsps/test/mkgpc1data.dvo
- Timestamp:
- Oct 20, 2015, 2:07:03 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/test/mkgpc1data.dvo (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/test/mkgpc1data.dvo
r38850 r38888 12 12 # I'm setting the base filename without the .smf and add it in mkcatdir.* 13 13 14 # some global value for ease of access: 15 $SKYCELL = "skycell.1133.081" 16 $TESS_ID = "RINGS.V3" 17 14 18 # imagedata describes the full fake exposure set. the fields are 15 19 list imagedata 16 # exp_id stk_id filebase M_off date time 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 end 30 31 list warpdata 32 1 1 $OUTDIR/test.01 0.000 2010/01/01 01:00:00 33 2 1 $OUTDIR/test.02 -0.025 2010/01/01 02:00:00 34 3 1 $OUTDIR/test.03 0.025 2010/01/01 03:00:00 35 4 1 $OUTDIR/test.04 0.010 2010/01/01 04:00:00 36 5 2 $OUTDIR/test.05 0.000 2010/01/01 05:00:00 37 6 2 $OUTDIR/test.06 -0.025 2010/01/01 06:00:00 38 7 2 $OUTDIR/test.07 0.025 2010/01/01 07:00:00 39 8 2 $OUTDIR/test.08 0.010 2010/01/01 08:00:00 40 9 3 $OUTDIR/test.09 0.000 2010/01/01 09:00:00 41 10 3 $OUTDIR/test.10 -0.025 2010/01/01 10:00:00 42 11 3 $OUTDIR/test.11 0.025 2010/01/01 11:00:00 43 12 3 $OUTDIR/test.12 0.010 2010/01/01 12:00:00 20 # exp_id stk_id filebase M_off date time warpfile 21 1 1 $OUTDIR/test.01 0.000 2010/01/01 01:00:00 $OUTDIR/warp.01 22 2 1 $OUTDIR/test.02 -0.025 2010/01/01 02:00:00 $OUTDIR/warp.02 23 3 1 $OUTDIR/test.03 0.025 2010/01/01 03:00:00 $OUTDIR/warp.03 24 4 1 $OUTDIR/test.04 0.010 2010/01/01 04:00:00 $OUTDIR/warp.04 25 5 2 $OUTDIR/test.05 0.000 2010/01/01 05:00:00 $OUTDIR/warp.05 26 6 2 $OUTDIR/test.06 -0.025 2010/01/01 06:00:00 $OUTDIR/warp.06 27 7 2 $OUTDIR/test.07 0.025 2010/01/01 07:00:00 $OUTDIR/warp.07 28 8 2 $OUTDIR/test.08 0.010 2010/01/01 08:00:00 $OUTDIR/warp.08 29 9 3 $OUTDIR/test.09 0.000 2010/01/01 09:00:00 $OUTDIR/warp.09 30 10 3 $OUTDIR/test.10 -0.025 2010/01/01 10:00:00 $OUTDIR/warp.10 31 11 3 $OUTDIR/test.11 0.025 2010/01/01 11:00:00 $OUTDIR/warp.11 32 12 3 $OUTDIR/test.12 0.010 2010/01/01 12:00:00 $OUTDIR/warp.12 44 33 end 45 34 … … 55 44 mkcatdir.cam PS1_V5 PS1_V5 56 45 mkcatdir.stk PS1_V5 PS1_V5 46 mkcatdir.wrp PS1_V5_Lensing PS1_V5 57 47 insert.stack.set 58 48 end … … 68 58 $DEC = 20.0 69 59 70 break -auto off71 60 exec mkgpc1.sh delete $dbhost $dbname $dbuser $dbpass 72 break -auto on73 61 exec mkgpc1.sh create $dbhost $dbname $dbuser $dbpass 74 62 … … 77 65 # system-wide info 78 66 dbinsert ippToPspsFake (my_id) values (2) 79 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, "skycell.0000.000")67 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, $SKYCELL) 80 68 end 81 69 … … 163 151 164 152 mkinput $offset $rawfile 165 echo mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME - radec $RA $DEC -type $1 -imageID $ID -sourceID 0166 exec mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME - radec $RA $DEC -type $1 -imageID $ID -sourceID 0153 echo mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 0 154 exec mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 0 167 155 168 156 if ($i == 3) … … 238 226 239 227 mkinput $offset $rawfile 240 echo mkcmf -stack -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 - radec $RA $DEC -type $1 -imageID $ID -sourceID 1241 exec mkcmf -stack -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 - radec $RA $DEC -type $1 -imageID $ID -sourceID 1228 echo mkcmf -stack -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL 229 exec mkcmf -stack -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL 242 230 243 231 # add some required header keywords: 244 232 exec echo "HIERARCH FPA.ZP = 25. / Magnitude zero point" > tmp.hdr 245 exec echo "TESS_ID = 'RINGS.V3'" >> tmp.hdr246 exec echo "SKYCELL = 'skycell.1133.081'" >> tmp.hdr247 233 exec fits_insert $cmffile tmp.hdr 248 234 … … 273 259 end 274 260 261 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 262 macro mkcatdir.wrp 263 if ($0 != 3) 264 echo "mkcatdir.wrp (cmftype) (dvotype)" 265 break 266 end 267 268 # tapPLAN 4 269 270 mkdir $OUTDIR 271 272 local i catdir RA DEC ID rawfile cmffile offset 273 $catdir = $OUTDIR/catdir.wrp 274 exec rm -rf $catdir 275 276 $RA = 10.0 277 $DEC = 20.0 278 279 $TIMEFORMAT = mjd 280 $TIMEREF = 2001/01/01,00:00:00 281 282 for i 0 $imagedata:n 283 list word -split $imagedata:$i 284 $ID = $word:0 285 $rawfile = $word:2\.txt; # use the cam-stage rawfile 286 $cmffile = $word:6\.smf 287 $offset = $word:3 288 289 sprintf myDATE "%s" $word:4 290 sprintf myTIME "%s" $word:5 291 echo ctimes -abs $myDATE,$myTIME -var mjd 292 ctimes -abs $myDATE,$myTIME -var mjd 293 294 ## this is not generating photcodes recognized as stack by relphot 295 296 mkinput $offset $rawfile 297 echo mkcmf -forcedwarp -photcode SIMTEST.r.ForcedWarp $rawfile $cmffile -extroot SkyChip -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL 298 exec mkcmf -forcedwarp -photcode SIMTEST.r.ForcedWarp $rawfile $cmffile -extroot SkyChip -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL 299 300 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 301 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 302 end 303 304 echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 305 exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 306 307 if ($PARALLEL) 308 $hostname = `hostname` 309 exec rm -f $catdir/HostTable.dat 310 output $catdir/HostTable.dat 311 echo "# ID Hostname Catdir" 312 echo " 1 $hostname $catdir.p1" 313 echo " 2 $hostname $catdir.p2" 314 echo " 3 $hostname $catdir.p3" 315 output stdout 316 exec dvodist -out $catdir 317 end 318 319 # for i 0 $offset:n 320 # tapOK {abs(Mcal[$i] - Mcal[0] - $offset:$i) < 0.001} "Mcal $i" 321 # end 322 323 # tapDONE 324 end 325 275 326 macro insert.exp 276 327 if ($0 != 3) … … 296 347 dbinsert camProcessedExp (cam_id, path_base, fault) values ($myID, "$filename", 0) 297 348 dbinsert fakeRun (fake_id, cam_id) values ($myID, $myID) 298 dbinsert warpRun (warp_id, fake_id) values ($myID, $myID) 299 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($myID, "skycell.0000.000", "XY00") 349 dbinsert warpRun (warp_id, fake_id, tess_id) values ($myID, $myID, $TESS_ID) 350 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($myID, $SKYCELL, "XY00") 351 dbinsert warpImfile (warp_id, skycell_id, warp_skyfile_id) values ($myID, $SKYCELL, $myID) 300 352 301 353 dbinsert addRun (add_id, stage, state, stage_id, minidvodb_name) values ($myID, "cam", "full", $myID, "catdir.cam") 302 354 dbinsert addProcessedExp (add_id, fault) values ($myID, 0) 355 end 356 357 macro insert.wrp 358 if ($0 != 4) 359 echo "USAGE: insert.wrp (warpID) (stackID) (filename)" 360 break 361 end 362 363 local wrpID stkID filename 364 $wrpID = $1 365 $stkID = $2 366 $filename = $3 367 368 # a single exposure 369 echo $myDATE 370 echo $myTIME 371 372 dbinsert addRun (add_id, stage, state, stage_id, stage_extra1, minidvodb_name) values ($wrpID, "fullforce", "full", $stkID, $wrpID, "catdir.wrp") 373 374 # we have a single fullForceRun for each stack, so we can match fullForceRun ids to stackRun ids 375 dbinsert fullForceInput (ff_id, warp_id) values ($stkID, $wrpID) 376 dbinsert fullForceResult (ff_id, warp_id, software_ver, path_base) values ($stkID, $wrpID, "38000M", "$filename") 303 377 end 304 378 … … 310 384 end 311 385 312 local i stkID expID expfile stkfile386 local i stkID expID expfile wrpfile stkfile 313 387 314 388 $stkID = $1 315 389 $stkfile = $2 316 390 317 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "37500") 391 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, $SKYCELL, "g.00000", "37500") 392 393 # we have a single fullForceRun for each stack, so we can match fullForceRun ids to stackRun ids 394 dbinsert fullForceRun (ff_id, skycal_id) values ($stkID, $stkID) 318 395 319 396 $TIMEFORMAT = mjd … … 329 406 330 407 $expID = $tmp:0 331 $expfile = $tmp:2332 408 sprintf myDATE "%s" $tmp:4 333 409 sprintf myTIME "%s" $tmp:5 410 411 $expfile = $tmp:2 334 412 insert.exp $expID $expfile 413 414 $wrpfile = $tmp:6 415 insert.wrp $expID $stkID $wrpfile 416 335 417 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID) 336 418 … … 376 458 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (2, 2, "full", "catdir.stk") 377 459 dbinsert mergedvodbProcessed (merge_id, fault) values (2, 0) 460 461 # catdirs for the forced warps 462 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("catdir.wrp", 3, "merged") 463 dbinsert minidvodbProcessed (minidvodb_id, fault) values (3, 0) 464 465 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (3, 3, "full", "catdir.wrp") 466 dbinsert mergedvodbProcessed (merge_id, fault) values (3, 0) 378 467 end 379 468
Note:
See TracChangeset
for help on using the changeset viewer.
