- Timestamp:
- Jun 27, 2018, 3:31:55 PM (8 years ago)
- Location:
- branches/czw_branch/20170908
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippToPsps/test/mkgpc1data.dvo (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20170908
- Property svn:mergeinfo changed
-
branches/czw_branch/20170908/ippToPsps/test/mkgpc1data.dvo
r39165 r40483 17 17 $RA = 10.0 18 18 $DEC = 20.0 19 $SKYCELL = "skycell.1133.081" 20 $TESS_ID = "RINGS.V3" 21 $BAD_PSFQF_FRAC = 0.2 19 $SKYCELL = skycell.1133.081 20 $TESS_ID = RINGS.V3 21 $BAD_PSFQF_FRAC = 0.0 22 $ADDNOISE = "-no-noise" 23 24 # a note on double quotes and TESS_ID: 25 # since the variables TESS_ID and SKYCELL are used below to construct the list, their values should NOT be wrapped in double quotes 26 # or those double quotes are embedded in the strings in the list 27 # when TESS_ID and SKYCELL appear in mysql commands as values they need to be protected with double quotes so mysql does not 28 # interpret them as db table fields 22 29 23 30 # imagedata describes the full fake exposure set. the fields are 24 31 list imagedata 25 # exp_id stk_id filebase M_off date time warpfilefilter difffile26 1 1 $OUTDIR/test. 01 0.000 2010/01/01 01:00:00 $OUTDIR/warp.01 g $OUTDIR/diff.0127 2 1 $OUTDIR/test. 02 -0.025 2010/01/01 02:00:00 $OUTDIR/warp.02 g $OUTDIR/diff.0228 3 1 $OUTDIR/test. 03 0.025 2010/01/01 03:00:00 $OUTDIR/warp.03 g $OUTDIR/diff.0329 4 1 $OUTDIR/test. 04 0.010 2010/01/01 04:00:00 $OUTDIR/warp.04 g $OUTDIR/diff.0430 5 2 $OUTDIR/test. 05 0.000 2010/01/01 05:00:00 $OUTDIR/warp.05 g $OUTDIR/diff.0531 6 2 $OUTDIR/test. 06 -0.025 2010/01/01 06:00:00 $OUTDIR/warp.06 g $OUTDIR/diff.0632 7 2 $OUTDIR/test. 07 0.025 2010/01/01 07:00:00 $OUTDIR/warp.07 g $OUTDIR/diff.0733 8 2 $OUTDIR/test. 08 0.010 2010/01/01 08:00:00 $OUTDIR/warp.08 g $OUTDIR/diff.0834 9 3 $OUTDIR/test. 09 0.000 2010/01/01 09:00:00 $OUTDIR/warp.09 g $OUTDIR/diff.0935 10 3 $OUTDIR/test. 10 -0.025 2010/01/01 10:00:00 $OUTDIR/warp.10 g $OUTDIR/diff.1036 11 3 $OUTDIR/test. 11 0.025 2010/01/01 11:00:00 $OUTDIR/warp.11 g $OUTDIR/diff.1137 12 3 $OUTDIR/test. 12 0.010 2010/01/01 12:00:00 $OUTDIR/warp.12 g $OUTDIR/diff.1238 13 4 $OUTDIR/test. 13 -0.025 2010/01/02 01:00:00 $OUTDIR/warp.13 r $OUTDIR/diff.1339 14 4 $OUTDIR/test. 14 0.025 2010/01/02 02:00:00 $OUTDIR/warp.14 r $OUTDIR/diff.1440 15 4 $OUTDIR/test. 15 0.010 2010/01/02 03:00:00 $OUTDIR/warp.15 r $OUTDIR/diff.1541 16 4 $OUTDIR/test. 16 0.000 2010/01/02 04:00:00 $OUTDIR/warp.16 r $OUTDIR/diff.1642 17 5 $OUTDIR/test. 17 -0.025 2010/01/02 05:00:00 $OUTDIR/warp.17 r $OUTDIR/diff.1743 18 5 $OUTDIR/test. 18 0.025 2010/01/02 06:00:00 $OUTDIR/warp.18 r $OUTDIR/diff.1844 19 5 $OUTDIR/test. 19 0.010 2010/01/02 07:00:00 $OUTDIR/warp.19 r $OUTDIR/diff.1945 20 5 $OUTDIR/test. 20 0.000 2010/01/02 08:00:00 $OUTDIR/warp.20 r $OUTDIR/diff.2046 21 6 $OUTDIR/test. 21 -0.025 2010/01/02 09:00:00 $OUTDIR/warp.21 r $OUTDIR/diff.2147 22 6 $OUTDIR/test. 22 0.025 2010/01/02 10:00:00 $OUTDIR/warp.22 r $OUTDIR/diff.2248 23 6 $OUTDIR/test. 23 0.010 2010/01/02 11:00:00 $OUTDIR/warp.23 r $OUTDIR/diff.2349 24 6 $OUTDIR/test. 24 -0.020 2010/01/02 12:00:00 $OUTDIR/warp.24 r $OUTDIR/diff.2432 # exp_id stk_id filebase M_off date time warpfile filter difffile 33 1 1 $OUTDIR/test.cam 0.000 2010/01/01 01:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 34 2 1 $OUTDIR/test.cam -0.025 2010/01/01 02:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 35 3 1 $OUTDIR/test.cam 0.025 2010/01/01 03:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 36 4 1 $OUTDIR/test.cam 0.010 2010/01/01 04:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 37 5 2 $OUTDIR/test.cam 0.000 2010/01/01 05:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 38 6 2 $OUTDIR/test.cam -0.025 2010/01/01 06:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 39 7 2 $OUTDIR/test.cam 0.025 2010/01/01 07:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 40 8 2 $OUTDIR/test.cam 0.010 2010/01/01 08:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 41 9 3 $OUTDIR/test.cam 0.000 2010/01/01 09:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 42 10 3 $OUTDIR/test.cam -0.025 2010/01/01 10:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 43 11 3 $OUTDIR/test.cam 0.025 2010/01/01 11:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 44 12 3 $OUTDIR/test.cam 0.010 2010/01/01 12:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp g $OUTDIR/$TESS_ID.$SKYCELL.diff 45 13 4 $OUTDIR/test.cam -0.025 2010/01/02 01:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 46 14 4 $OUTDIR/test.cam 0.025 2010/01/02 02:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 47 15 4 $OUTDIR/test.cam 0.010 2010/01/02 03:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 48 16 4 $OUTDIR/test.cam 0.000 2010/01/02 04:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 49 17 5 $OUTDIR/test.cam -0.025 2010/01/02 05:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 50 18 5 $OUTDIR/test.cam 0.025 2010/01/02 06:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 51 19 5 $OUTDIR/test.cam 0.010 2010/01/02 07:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 52 20 5 $OUTDIR/test.cam 0.000 2010/01/02 08:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 53 21 6 $OUTDIR/test.cam -0.025 2010/01/02 09:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 54 22 6 $OUTDIR/test.cam 0.025 2010/01/02 10:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 55 23 6 $OUTDIR/test.cam 0.010 2010/01/02 11:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 56 24 6 $OUTDIR/test.cam -0.020 2010/01/02 12:00:00 $OUTDIR/$TESS_ID.$SKYCELL.wrp r $OUTDIR/$TESS_ID.$SKYCELL.diff 50 57 end 51 58 52 59 list stackdata 53 # stk_id sky_id filename M_off filter forcedgalaxy54 1 1 $OUTDIR/ stack.01 0.010 g $OUTDIR/fgal.0155 2 2 $OUTDIR/ stack.02 0.020 g $OUTDIR/fgal.0256 3 3 $OUTDIR/ stack.03 0.030 g $OUTDIR/fgal.0357 4 1 $OUTDIR/ stack.04 0.025 r $OUTDIR/fgal.0458 5 2 $OUTDIR/ stack.05 0.035 r $OUTDIR/fgal.0559 6 3 $OUTDIR/ stack.06 0.045 r $OUTDIR/fgal.0660 # stk_id sky_id filename M_off filter forcedgalaxy 61 1 1 $OUTDIR/$TESS_ID.$SKYCELL.stk 0.010 g $OUTDIR/$TESS_ID.$SKYCELL.fgal 62 2 2 $OUTDIR/$TESS_ID.$SKYCELL.stk 0.020 g $OUTDIR/$TESS_ID.$SKYCELL.fgal 63 3 3 $OUTDIR/$TESS_ID.$SKYCELL.stk 0.030 g $OUTDIR/$TESS_ID.$SKYCELL.fgal 64 4 1 $OUTDIR/$TESS_ID.$SKYCELL.stk 0.025 r $OUTDIR/$TESS_ID.$SKYCELL.fgal 65 5 2 $OUTDIR/$TESS_ID.$SKYCELL.stk 0.035 r $OUTDIR/$TESS_ID.$SKYCELL.fgal 66 6 3 $OUTDIR/$TESS_ID.$SKYCELL.stk 0.045 r $OUTDIR/$TESS_ID.$SKYCELL.fgal 60 67 end 61 68 … … 67 74 mkcatdir.dif PS1_DV5 PS1_V5 68 75 insert.stack.set 76 77 exec rm -rf testdata/catdir.mrg 78 exec dvomerge -matched-tables testdata/catdir.cam into testdata/catdir.mrg 79 exec dvomerge -matched-tables testdata/catdir.stk into testdata/catdir.mrg 80 exec dvomerge -matched-tables testdata/catdir.wrp into testdata/catdir.mrg 81 82 # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -averages -boundary-tree tess.3pi.fits 83 exec relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -images g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits -cloud-limit 0.1 69 84 end 70 85 … … 75 90 $dbuser = dvo 76 91 $dbpass = dvo 77 # $dbuser = czw 78 # $dbpass = czw 79 92 93 $gscfile = `gconfig GSCFILE` 94 if ("$gscfile" == "not found") 95 echo "problem with dvo / ptolemy configuration. check ~/.ptolemyrc" 96 break 97 end 98 80 99 exec mkgpc1.sh delete $dbhost $dbname $dbuser $dbpass 81 100 exec mkgpc1.sh create $dbhost $dbname $dbuser $dbpass … … 85 104 # system-wide info 86 105 dbinsert ippToPspsFake (my_id) values (2) 87 dbinsert skycell (radeg, decdeg, tess_id, skycell_id) values ($RA, $DEC, $TESS_ID, $SKYCELL)106 dbinsert skycell (radeg, decdeg, tess_id, skycell_id) values ($RA, $DEC, "$TESS_ID", "$SKYCELL") 88 107 end 89 108 … … 110 129 $ID = $word:0 111 130 $stkID = $word:1 112 $rawfile = $word:2\.txt113 $cmffile = $word:2\.smf131 sprintf rawfile "%s.%02d.txt" $word:2 $ID 132 sprintf cmffile "%s.%02d.smf" $word:2 $ID 114 133 $offset = $word:3 115 134 sprintf myDATE "%s" $word:4 … … 172 191 173 192 mkinput $offset $rawfile 174 echo mkcmf -photcode SIMTEST.$filter.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 0175 exec mkcmf -photcode SIMTEST.$filter.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 0193 echo mkcmf -photcode SIMTEST.$filter.Chip $ADDNOISE -append $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 0 -coords 194 exec mkcmf -photcode SIMTEST.$filter.Chip $ADDNOISE -append $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 0 -coords 176 195 177 196 if ($i == 3) … … 198 217 199 218 if ($SMALLTEST) 200 echo relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update201 exec relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update202 203 echo relastro -v -D CATDIR $catdir - images -update-chips -region 8 12 18 22 -update -apply-offsets204 exec relastro -v -D CATDIR $catdir - images -update-chips -region 8 12 18 22 -update -apply-offsets219 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update 220 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update 221 222 echo relastro -v -D CATDIR $catdir -D CAMERA simtest -images -update-chips -update-all-cameras -region 8 12 18 22 -update -apply-offsets 223 exec relastro -v -D CATDIR $catdir -D CAMERA simtest -images -update-chips -update-all-cameras -region 8 12 18 22 -update -apply-offsets 205 224 else 206 echo relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update207 exec relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update225 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 226 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 208 227 end 209 228 … … 246 265 $stkID = $word:0 247 266 $skyID = $word:1 248 $rawfile = $word:2\.txt249 $cmffile = $word:2\.cmf267 sprintf rawfile "%s.%02d.txt" $word:2 $stkID 268 sprintf cmffile "%s.%02d.cmf" $word:2 $stkID 250 269 $offset = $word:3 251 270 $filter = $word:4 … … 255 274 256 275 mkinput $offset $rawfile 257 echo mkcmf -stack -photcode SIMTEST.$filter.SkyChip $ rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL258 exec mkcmf -stack -photcode SIMTEST.$filter.SkyChip $ rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL276 echo mkcmf -stack -photcode SIMTEST.$filter.SkyChip $ADDNOISE $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL -coords 277 exec mkcmf -stack -photcode SIMTEST.$filter.SkyChip $ADDNOISE $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL -coords 259 278 260 279 # add some required header keywords: … … 267 286 268 287 if ($SMALLTEST) 269 echo relphot -D CATDIR $catdir - region 8 12 18 22 -averages -update270 exec relphot -D CATDIR $catdir - region 8 12 18 22 -averages -update288 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -averages -update 289 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -averages -update 271 290 else 272 echo relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update273 exec relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update291 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 292 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 274 293 end 275 294 … … 315 334 $ID = $word:0 316 335 $stkID = $word:1 317 $rawfile = $word:2\.txt; # use the cam-stage rawfile318 $cmffile = $word:6\.cmf336 sprintf rawfile "%s.%02d.txt" $word:2 $ID; # use the cam-stage rawfile 337 sprintf cmffile "%s.%02d.smf" $word:6 $ID 319 338 $offset = $word:3 320 339 sprintf myDATE "%s" $word:4 … … 330 349 331 350 mkinput $offset $rawfile 332 echo mkcmf -forcedwarp -photcode SIMTEST.$filter.ForcedWarp $ rawfile $cmffile -extroot SkyChip -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 2 -tess_id $TESS_ID -skycell $SKYCELL -bad-psfqf-frac $BAD_PSFQF_FRAC333 exec mkcmf -forcedwarp -photcode SIMTEST.$filter.ForcedWarp $ rawfile $cmffile -extroot SkyChip -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 2 -tess_id $TESS_ID -skycell $SKYCELL -bad-psfqf-frac $BAD_PSFQF_FRAC351 echo mkcmf -forcedwarp -photcode SIMTEST.$filter.ForcedWarp $ADDNOISE $rawfile $cmffile -extroot SkyChip -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 2 -tess_id $TESS_ID -skycell $SKYCELL -bad-psfqf-frac $BAD_PSFQF_FRAC -coords 352 exec mkcmf -forcedwarp -photcode SIMTEST.$filter.ForcedWarp $ADDNOISE $rawfile $cmffile -extroot SkyChip -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $ID -sourceID 2 -tess_id $TESS_ID -skycell $SKYCELL -bad-psfqf-frac $BAD_PSFQF_FRAC -coords 334 353 335 354 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -xrad … … 341 360 list word -split $stackdata:$i 342 361 $stkID = $word:0 343 $rawfile = $word:2\.txt344 $cmffile = $word:5\.cmf362 sprintf rawfile "%s.%02d.txt" $word:2 $stkID 363 sprintf cmffile "%s.%02d.smf" $word:5 $stkID 345 364 $offset = $word:3 346 365 $filter = $word:4 … … 349 368 if ($SMALLTEST && ($stkID != 1) && ($stkID != 4)) continue 350 369 351 echo mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $ rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL352 exec mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $ rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL353 354 echo loadgalphot -D CATDIR $catdir - photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile355 exec loadgalphot -D CATDIR $catdir - photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile370 echo mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $ADDNOISE $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL -coords 371 exec mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $ADDNOISE $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL -coords 372 373 echo loadgalphot -D CATDIR $catdir -D CAMERA simtest -photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile 374 exec loadgalphot -D CATDIR $catdir -D CAMERA simtest -photcode SIMTEST.$filter.ForcedWarp -image-id $stkID $cmffile 356 375 end 357 376 358 377 if ($SMALLTEST) 359 echo relphot -D CATDIR $catdir - region 8 12 18 22 -averages -update360 exec relphot -D CATDIR $catdir - region 8 12 18 22 -averages -update378 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -averages -update 379 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -averages -update 361 380 else 362 echo relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update363 exec relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update364 end 365 366 echo dvolens -D CATDIR $catdir - region 8 12 18 22 -update-objects -update367 exec dvolens -D CATDIR $catdir - region 8 12 18 22 -update-objects -update381 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 382 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 383 end 384 385 echo dvolens -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -update-objects -update 386 exec dvolens -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -update-objects -update 368 387 369 388 if ($PARALLEL) … … 406 425 dbinsert camProcessedExp (cam_id, path_base, fault) values ($myID, "$filename", 0) 407 426 dbinsert fakeRun (fake_id, cam_id) values ($myID, $myID) 408 dbinsert warpRun (warp_id, fake_id, tess_id, state) values ($myID, $myID, $TESS_ID, "full")409 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($myID, $SKYCELL, "XY00")410 dbinsert warpImfile (warp_id, skycell_id, warp_skyfile_id) values ($myID, $SKYCELL, $myID)427 dbinsert warpRun (warp_id, fake_id, tess_id, state) values ($myID, $myID, "$TESS_ID", "full") 428 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($myID, "$SKYCELL", "XY00") 429 dbinsert warpImfile (warp_id, skycell_id, warp_skyfile_id) values ($myID, "$SKYCELL", $myID) 411 430 412 431 dbinsert addRun (add_id, stage, state, stage_id, minidvodb_name) values ($myID, "cam", "full", $myID, "catdir.cam") … … 452 471 $skycalID = $stkID + 20 453 472 454 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, $SKYCELL, "$filter.00000", "37500")473 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "$SKYCELL", "$filter.00000", "37500") 455 474 456 475 # we have a single fullForceRun for each stack, so we can match fullForceRun ids to stackRun ids … … 520 539 $ID = $word:0 521 540 $stkID = $word:1 522 $rawfile = $word:2\.txt523 $cmffile = $word:8\.cmf524 $invfile = $word:8\.inv.cmf541 sprintf rawfile "%s.%02d.txt" $word:2 $stkID 542 sprintf cmffile "%s.%02d.smf" $word:8 $stkID 543 sprintf invfile "%s.%02d.inv.smf" $word:8 $stkID 525 544 $offset = $word:3 526 545 sprintf myDATE "%s" $word:4 … … 535 554 mkinput $offset $rawfile 536 555 $diff_skyfile_id = $ID + 25 537 echo mkcmf -diff -photcode SIMTEST.$filter.SkyChip -no-noise -extroot SkyChip $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC538 exec mkcmf -diff -photcode SIMTEST.$filter.SkyChip -no-noise -extroot SkyChip $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC539 540 echo mkcmf -diff -photcode SIMTEST.$filter.SkyChip -no-noise -extroot SkyChip $rawfile $invfile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC541 exec mkcmf -diff -photcode SIMTEST.$filter.SkyChip -no-noise -extroot SkyChip $rawfile $invfile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC556 echo mkcmf -diff -photcode SIMTEST.$filter.SkyChip $ADDNOISE -extroot SkyChip $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC -coords 557 exec mkcmf -diff -photcode SIMTEST.$filter.SkyChip $ADDNOISE -extroot SkyChip $rawfile $cmffile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC -coords 558 559 echo mkcmf -diff -photcode SIMTEST.$filter.SkyChip $ADDNOISE -extroot SkyChip $rawfile $invfile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC -coords 560 exec mkcmf -diff -photcode SIMTEST.$filter.SkyChip $ADDNOISE -extroot SkyChip $rawfile $invfile -date $myDATE -time $myTIME -mjd $mjd -radec $RA $DEC -type $1 -imageID $diff_skyfile_id -sourceID 36 -bad-psfqf-frac $BAD_PSFQF_FRAC -coords 542 561 543 562 insert.dif $ID $ID $stkID $word:8 … … 557 576 end 558 577 if ($SMALLTEST) 559 echo relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN560 exec relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN578 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN 579 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -nloop 0 -D STAR_TOOFEW 0 -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN 561 580 else 562 echo relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update563 exec relphot -D CATDIR $catdir - region 8 12 18 22 -images g,r,i,z,y -update581 echo relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 582 exec relphot -D CATDIR $catdir -D CAMERA simtest -region 8 12 18 22 -images g,r,i,z,y -update 564 583 end 565 584 … … 592 611 $stkID = $word:0 593 612 $skyID = $word:1 594 $cmffile = $word:2613 sprintf cmffile "%s.%02d.cmf" $word:2 $stkID 595 614 $filter = $word:4 596 615 … … 652 671 dbinsert addProcessedExp (add_id, fault) values ($addID, 0) 653 672 654 dbinsert diffRun (diff_id, tess_id, state, diff_mode, software_ver) values ($difID, $TESS_ID, "full", 2, "38000M")655 dbinsert diffInputSkyfile (diff_id, warp1, stack2, diff_skyfile_id, tess_id, skycell_id) values ($difID, $wrpID, $stkID, $diffSkyfileID, $TESS_ID, $SKYCELL)656 dbinsert diffSkyfile (diff_id, skycell_id, path_base) values ($difID, $SKYCELL, "$filename")673 dbinsert diffRun (diff_id, tess_id, state, diff_mode, software_ver) values ($difID, "$TESS_ID", "full", 2, "38000M") 674 dbinsert diffInputSkyfile (diff_id, warp1, stack2, diff_skyfile_id, tess_id, skycell_id) values ($difID, $wrpID, $stkID, $diffSkyfileID, "$TESS_ID", "$SKYCELL" ) 675 dbinsert diffSkyfile (diff_id, skycell_id, path_base) values ($difID, "$SKYCELL", "$filename") 657 676 end 658 677 … … 669 688 exec rm -f $output 670 689 671 local i j 690 local i j ra dec 672 691 output $output 673 692 for i 10 1024 100 674 693 for j 10 1024 100 675 fprintf " %6.1f %6.1f %7.3f" $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 694 $ra = 10.0 + $i*0.25/3600 695 $dec = 20.0 + $j*0.25/3600 696 fprintf " %10.6f %10.6f %7.3f %6.1f %6.1f %7.3f" $ra $dec {10.0 + $1 + 2.5*($i + $j)/1000.0} $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 676 697 end 677 698 end 678 699 # XXX add 2 duplicate detections 679 700 $i = 110; $j = 210 680 fprintf " %6.1f %6.1f %7.3f" $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 701 # fprintf " %10.6f %10.6f %7.3f %6.1f %6.1f %7.3f" $ra $dec {10.0 + $1 + 2.5*($i + $j)/1000.0} $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 702 # fprintf " %6.1f %6.1f %7.3f" $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 681 703 $i = 210; $j = 110 682 fprintf " %6.1f %6.1f %7.3f" $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 704 # fprintf " %10.6f %10.6f %7.3f %6.1f %6.1f %7.3f" $ra $dec {10.0 + $1 + 2.5*($i + $j)/1000.0} $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 705 # fprintf " %6.1f %6.1f %7.3f" $i $j {-15.0 + $1 + 2.5*($i + $j)/1000.0} 683 706 output stdout 707 end 708 709 macro check.mags 710 711 # NOTE: relphot refuses to set the warp averages if there is no boundary tree: otherwise it cannot choose the correct subset of measurements 712 # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -averages -boundary-tree tess.3pi.fits 713 # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -images g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits 714 715 catdir testdata/catdir.mrg 716 skyregion 8 12 18 22 717 avextract ra dec g:psf:chp g:kron:chp g:psf:stk g:psf:wrp 718 719 set dg:psf:chp:stk = g:psf:chp - g:psf:stk 720 set dg:psf:chp:wrp = g:psf:chp - g:psf:wrp 721 lim g:psf:chp dg:psf:chp:stk; clear; box; plot g:psf:chp dg:psf:chp:stk -c blue -pt 7; plot g:psf:chp dg:psf:chp:wrp -c red -pt 2 722 723 # for i 0 10 724 # echo ra[$i] dec[$i] g:psf:chp[$i] g:kron:chp[$i] g:psf:stk[$i] g:psf:wrp[$i] 725 # end 726 end 727 728 macro check.mags.meas 729 730 # NOTE: relphot refuses to set the warp averages if there is no boundary tree: otherwise it cannot choose the correct subset of measurements 731 # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -averages -boundary-tree tess.3pi.fits 732 # relphot -D CATDIR testdata/catdir.mrg -D CAMERA simtest -region 8 12 18 22 -update -vv -images g,r -reset -reset-zpts -D STAR_TOOFEW 0 -boundary-tree tess.3pi.fits 733 734 catdir testdata/catdir.mrg 735 skyregion 8 12 18 22 736 737 mextract ra dec mag:rel:psf mag:rel:kron mag:ave:psf mag:ave:kron photcode 738 set dM:psf = mag:ave:psf - mag:rel:psf 739 lim -n 0 mag:ave:psf dM:psf; clear; box; plot mag:ave:psf dM:psf 740 741 set dM:kron = mag:ave:kron - mag:rel:kron 742 lim -n 1 mag:ave:kron dM:kron; clear; box; plot mag:ave:kron dM:kron 684 743 end 685 744
Note:
See TracChangeset
for help on using the changeset viewer.
