Changeset 42385 for trunk/ippTasks/simtest.pro
- Timestamp:
- Feb 8, 2023, 12:11:27 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/simtest.pro (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/simtest.pro
r28767 r42385 66 66 if (("$init" == "new") || ("$init" == "inject")) 67 67 # XXX this will fail and exit the script if the db does not exist or is old... 68 # XXX this step is too dangerous and was eliminated 68 69 exec pxadmin -delete -dbname $dbname 69 70 70 71 # XXX this gives warnings if the db exists... 72 # XXX this step is too dangerous and was eliminated 71 73 exec pxadmin -create -dbname $dbname 72 74 … … 74 76 # the labels "wait" and "proc" are special names used in automate.pro 75 77 76 $ppsim = "ppSimSequence $MODULES:0/$SIMTEST_SEQUENCE simtest.mkimages simtest.inject -path $SIMTEST_RAWDIR -workdir $SIMTEST_WORKDIR -dbname $dbname -label wait -dvodb DVO -tess_id TESS" 78 # make a reference database 79 mkref refcat 10 80 81 $ppsim = "ppSimSequence $SIMTEST_SEQUENCE simtest.mkimages simtest.inject -path $SIMTEST_RAWDIR -workdir $SIMTEST_WORKDIR -dbname $dbname -label wait -dvodb DVO -tess_id TESS -refcat refcat.catdir" 77 82 if ("$PPSIM_RECIPE" != "default") 78 83 $ppsim = $ppsim -ppsim_recipe $PPSIM_RECIPE … … 101 106 module automate.pro 102 107 103 module.tasks 104 105 add.label proc 108 module chip.pro 109 module camera.pro 110 module register.pro 111 # module.tasks 112 113 # XXX consolidate design of label / state / ?? for processing sequences 114 add.label simtest 106 115 107 116 if ($SIMTEST_THREADS == 0) … … 115 124 automate.load $SIMTEST_AUTO $SIMTEST_CAMERA $dbname 116 125 117 tasks.revert.off126 # tasks.revert.off 118 127 119 128 run … … 159 168 $SIMTEST_AUTO = simtest.flatcorr.auto 160 169 end 170 171 # basic options for the these images (filter, location, obstype) 172 $BaseOptions = -type OBJECT -filter r -skymags 20.86 -ra 270.70 -dec -23.70 -pa 0.0 173 $BaseOptions = $BaseOptions -Df PSASTRO:DVO.GETSTAR.MAX.RHO 50000.0 174 $BaseOptions = $BaseOptions -nx 2500 -ny 2500 175 176 # options for the reference image 177 $RefOptions = $BaseOptions -exptime 100.0 -seeing 1.0 178 $RefOptions = $RefOptions -D PSF.MODEL PS_MODEL_GAUSS 179 $RefOptions = $RefOptions -Df STARS.SIGMA.LIM 0.5 180 $RefOptions = $RefOptions -Db PSF.CONVOLVE T 181 182 # create a reference database of fake stars to be used by ppSim below 183 macro mkref 184 if ($0 != 3) 185 echo "mkref (refbase) (density)" 186 break 187 end 188 189 local refbase 190 $refbase = $1 191 192 exec rm -rf $refbase.catdir 193 exec rm -f $refbase.fits 194 195 $RefOptions = $RefOptions -Df STARS.DENSITY $2 196 197 # create an image with fake sources and insert the resulting cmf file into a dvodb 198 $RefConfig = -camera SIMTEST -recipe PPSIM STACKTEST.MAKE -D PSASTRO:PSASTRO.CATDIR $refbase.catdir 199 200 exec ppSim $RefOptions $RefConfig $refbase 201 202 file synth.photcodes found 203 if (not($found)) 204 echo "making photcodes file" 205 mkphotcodes synth.photcodes 206 end 207 208 exec addstar -D CAMERA simtest -D CATDIR $refbase.catdir -accept-astrom -photcode SYNTH.r -D PHOTCODE_FILE synth.photcodes $refbase.cmf -quick-airmass 209 exec relphot -averages -D CATDIR $refbase.catdir -update -region 260 280 -33 -13 210 end 211 212 # if we run this test as a stand-alone program somewhere, we may need to create a local copy of the photcode file: 213 macro mkphotcodes 214 if ($0 != 2) 215 echo "USAGE: mkphotcodes (filename)" 216 break 217 end 218 219 exec /bin/rm -f $1 220 output $1 221 echo "# airmass color astrometry mag photom astrom mask photom mask" 222 echo "# code name type zero slope offset c1 c2 slope zero equiv sys scale scale sys poor bad poor bad" 223 echo " 1 g_SYNTH sec 0.000 0.000 0.000 1 3 0.0000 0 21 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 224 echo " 2 r_SYNTH sec 0.000 0.000 0.000 2 3 0.0000 0 22 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 225 echo " 3 i_SYNTH sec 0.000 0.000 0.000 2 3 0.0000 0 23 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 226 echo " 4 z_SYNTH sec 0.000 0.000 0.000 3 4 0.0000 0 24 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 227 echo " 5 y_SYNTH sec 0.000 0.000 0.000 4 5 0.0000 0 25 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 228 echo " 3001 SYNTH.g ref 0.000 0.000 0.000 - - 0.0000 0 1 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 229 echo " 3002 SYNTH.r ref 0.000 0.000 0.000 - - 0.0000 0 2 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 230 echo " 3003 SYNTH.i ref 0.000 0.000 0.000 - - 0.0000 0 3 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 231 echo " 3004 SYNTH.z ref 0.000 0.000 0.000 - - 0.0000 0 4 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 232 echo " 3005 SYNTH.y ref 0.000 0.000 0.000 - - 0.0000 0 5 0.000 0.000 0.000 0.000 0x0000 0x0000 0x0000 0x0000" 233 output stdout 234 end 235
Note:
See TracChangeset
for help on using the changeset viewer.
