- Timestamp:
- Nov 3, 2015, 10:40:44 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/test/mksasdata.dvo (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/test/mksasdata.dvo
r39005 r39035 22 22 list expfiles -glob sasdata.v39/*.smf 23 23 list stkfiles -glob sasdata.v39/*skycal*.cmf 24 list wrpfiles -glob sasdata.v39/*ff*.cmf 24 list wrpfiles -glob sasdata.v39/*.wrp.*ff*.cmf 25 list diffiles -glob sasdata.v39/*.WS.dif.*.cmf 26 27 # fforce summary files are missing metadata from header. it is supplied 28 # by the ippTools / ippTasks / ippScripts in processing, so we need to 29 # supply it explicitly here: 30 list galfiles 31 sasdata.v39/RINGS.V3.skycell.1315.090.ff.40278.cmf 3942577 g.00000 32 sasdata.v39/RINGS.V3.skycell.1315.090.ff.40279.cmf 3942578 i.00000 33 sasdata.v39/RINGS.V3.skycell.1315.090.ff.40280.cmf 3942579 r.00000 34 sasdata.v39/RINGS.V3.skycell.1315.090.ff.40281.cmf 3942580 y.00000 35 sasdata.v39/RINGS.V3.skycell.1315.090.ff.40282.cmf 3942581 z.00000 36 end 25 37 26 38 $catdirbase = catdir.sas 27 39 $catdir = $OUTDIR/$catdirbase 28 40 41 $catdirbase_diff = catdir.sas.diff 42 $catdir_diff = $OUTDIR/$catdirbase_diff 43 29 44 macro mkfull 30 45 init.db 46 47 exec rm -rf $catdir 31 48 mkcatdir.cam 32 49 mkcatdir.stk … … 34 51 mkcal 35 52 53 exec rm -rf $catdir_diff 54 mkcatdir.dif 55 mkcal.dif 56 36 57 insert.cam 37 58 insert.wrp 38 59 insert.stk 60 insert.dif 39 61 insert.minis 40 62 end … … 45 67 insert.wrp 46 68 insert.stk 69 insert.dif 47 70 insert.minis 48 71 end … … 82 105 keyword im NAXIS2 Ny 83 106 coords im -p {$Nx/2} {$Ny/2} 84 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, "$mySkyCell")107 dbinsert skycell (radeg, decdeg, tess_id, skycell_id) values ($RA, $DEC, $TESS_ID, "$mySkyCell") 85 108 end 86 109 … … 130 153 for i 0 $wrpfiles:n 131 154 $wrpfile = $wrpfiles:$i 132 echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom -quick-airmass 133 exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom -quick-airmass 134 end 135 # exec addstar -D CATDIR $catdir -region {$RA-5.0} {$RA+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -resort 136 end 137 138 macro mkcal 155 echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom 156 exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $wrpfile -update -xrad -accept-astrom 157 end 158 159 # need to generate a sorted database before running loadgalphot 139 160 echo addstar -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -resort 140 161 exec addstar -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -resort 141 162 163 for i 0 $galfiles:n 164 list word -split $galfiles:$i 165 $cmffile = $word:0 166 $stkID = $word:1 167 $filter = $word:2 168 echo loadgalphot -D CATDIR $catdir -photcode GPC1.$filter.ForcedWarp -image-id $stkID $cmffile 169 exec loadgalphot -D CATDIR $catdir -photcode GPC1.$filter.ForcedWarp -image-id $stkID $cmffile 170 end 171 end 172 173 macro mkcal 142 174 # run relphot 143 175 # echo relphot -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -images g,r,i,z,y -update -boundary-tree tess.3pi.fits … … 147 179 echo relastro -v -D CATDIR $catdir -images -update-chips -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update 148 180 exec relastro -v -D CATDIR $catdir -images -update-chips -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update 181 182 echo dvolens -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update-objects -update 183 exec dvolens -D CATDIR $catdir -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update-objects -update 184 end 185 186 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 187 macro mkcatdir.dif 188 if ($0 != 1) 189 echo "mkcatdir.dif" 190 break 191 end 192 193 for i 0 $diffiles:n 194 $diffile = $diffiles:$i 195 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -accept-astrom 196 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -accept-astrom 197 # echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $stkfile -update -quick-airmass -D ZERO_POINT_OPTION CHIP_HEADER 198 end 199 end 200 201 macro mkcal.dif 202 echo addstar -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -resort 203 exec addstar -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -resort 204 205 # run relphot 206 echo relphot -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -averages -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN 207 exec relphot -D CATDIR $catdir_diff -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -averages -update -boundary-tree tess.3pi.fits -is-diff-db -statmode WT_MEAN 208 209 echo relastro -v -D CATDIR $catdir_diff -update-objects -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update -D RELASTRO_SRC_MEAS_TOOFEW 0 -D RELASTRO_SIGMA_LIM 0.05 -statmode WTMEAN 210 exec relastro -v -D CATDIR $catdir_diff -update-objects -region {$RA_FIELD-5.0} {$RA_FIELD+5.0} {$DEC_FIELD-5.0} {$DEC_FIELD+5.0} -update -D RELASTRO_SRC_MEAS_TOOFEW 0 -D RELASTRO_SIGMA_LIM 0.05 -statmode WTMEAN 149 211 end 150 212 … … 207 269 208 270 # a single exposure 209 $wrpID = $i + 1 271 $wrpID = $i + 100 210 272 211 273 # we have a single fullForceRun for each stack, so we can match fullForceRun ids to stackRun ids … … 213 275 dbinsert fullForceResult (ff_id, warp_id, software_ver, path_base) values ($stkID, $wrpID, "38000M", "$path_base") 214 276 215 dbinsert addRun (add_id, stage, state, stage_id, stage_extra1, minidvodb_name) values ($wrpID, "fullforce", "full", $ stkID, $wrpID, "catdirbase")277 dbinsert addRun (add_id, stage, state, stage_id, stage_extra1, minidvodb_name) values ($wrpID, "fullforce", "full", $wrpID, $wrpID, "$catdirbase") 216 278 217 279 if ($i > 10) last … … 256 318 end 257 319 320 macro insert.dif 321 if ($0 != 1) 322 echo "USAGE: insert.dif" 323 break 324 end 325 326 local difID skycell filter filename path_base 327 328 for i 0 $diffiles:n 329 $filename = $diffiles:$i 330 strlen $filename Nchar 331 substr $filename 0 {$Nchar - 4} path_base; # the database needs the path without the extension (.smf/.cmf) 332 333 $diffSkyfileID = `echo $filename | fields IMAGEID | prcol 2` 334 $skycell = "skycell.1315.090" 335 $filter = `echo $filename | fields FPA.FILTERID | prcol 2` 336 $mjd = `echo $filename | fields MJD-OBS | prcol 2` 337 338 $wrpID = $i 339 $stkID = $i + 10 340 341 $difID = $diffSkyfileID + 25 342 $addID = $difID + 100 343 344 dbinsert addRun (add_id, stage, state, stage_id, stage_extra1, minidvodb_name) values ($addID, "diff", "full", $difID, $diffSkyfileID, "$catdirbase_diff") 345 dbinsert addProcessedExp (add_id, fault) values ($addID, 0) 346 347 dbinsert diffRun (diff_id, tess_id, state, diff_mode, software_ver) values ($difID, $TESS_ID, "full", 2, "38000M") 348 dbinsert diffInputSkyfile (diff_id, warp1, stack2, diff_skyfile_id, tess_id, skycell_id) values ($difID, $wrpID, $stkID, $diffSkyfileID, $TESS_ID, $skycell ) 349 dbinsert diffSkyfile (diff_id, diff_skyfile_id, tess_id, skycell_id, path_base) values ($difID, $diffSkyfileID, $TESS_ID, $skycell, "$path_base") 350 end 351 end 352 258 353 macro insert.minis 259 354 # catdirs for the exposures … … 263 358 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase") 264 359 dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0) 360 361 # catdirs for the diffs 362 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase_diff", 2, "merged") 363 dbinsert minidvodbProcessed (minidvodb_id, fault) values (2, 0) 364 365 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (2, 2, "full", "$catdirbase_diff") 366 dbinsert mergedvodbProcessed (merge_id, fault) values (2, 0) 265 367 end 266 368
Note:
See TracChangeset
for help on using the changeset viewer.
