IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2023, 12:11:27 PM (3 years ago)
Author:
eugene
Message:

merge from eam_branches/ipp-20220316. add fpcamera, add option in ppSim to define reference catalog, add allow-multiple-definition in gcc, simtest improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/simtest.pro

    r28767 r42385  
    6666  if (("$init" == "new") || ("$init" == "inject")) 
    6767    # 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
    6869    exec pxadmin -delete -dbname $dbname
    6970
    7071    # XXX this gives warnings if the db exists...
     72    # XXX this step is too dangerous and was eliminated
    7173    exec pxadmin -create -dbname $dbname
    7274
     
    7476      # the labels "wait" and "proc" are special names used in automate.pro
    7577   
    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"
    7782      if ("$PPSIM_RECIPE" != "default")
    7883         $ppsim = $ppsim -ppsim_recipe $PPSIM_RECIPE
     
    101106  module automate.pro
    102107
    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
    106115
    107116  if ($SIMTEST_THREADS == 0)
     
    115124  automate.load $SIMTEST_AUTO $SIMTEST_CAMERA $dbname
    116125
    117   tasks.revert.off
     126  # tasks.revert.off
    118127
    119128  run
     
    159168  $SIMTEST_AUTO = simtest.flatcorr.auto
    160169end
     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
     183macro 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
     210end
     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:
     213macro 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
     234end
     235
Note: See TracChangeset for help on using the changeset viewer.