IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 4, 2008, 2:30:59 PM (18 years ago)
Author:
eugene
Message:

adding flatcorr simtest suites, mods to allow camera and sequence to be supplied by user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/simtest.pro

    r19266 r19381  
    11## simtest.pro : automatic full-suite simulated IPP test : -*- sh -*-
    22
     3## there are four features which define a simtest run:
     4## the camera : any camera can be used, the sim... cameras are defined to be quick tests
     5## the sequence : this file defines the set of observations generated
     6## the auto : the automation file defines the sequence of analysis performed
     7## the recipe : the ppsim recipe defines the features which are included in the generate data
     8
     9## these are not completely independent: a certain sequence may be
     10## required to yield a sensible result for a specific auto, and a
     11## specific recipe may also be needed
     12
     13if ($?PPSIM_RECIPE == 0)
     14  $PPSIM_RECIPE = default
     15end
     16if ($?SIMTEST_CAMERA == 0)
     17  $SIMTEST_CAMERA = SIMTEST
     18end
     19if ($?SIMTEST_SEQUENCE == 0)
     20  $SIMTEST_SEQUENCE = simtest.basic.config
     21end
     22if ($?SIMTEST_AUTO == 0)
     23  $SIMTEST_AUTO = simtest.basic.auto
     24end
     25if ($?SIMTEST_THREADS == 0)
     26  $SIMTEST_THREADS = 0
     27end
     28
    329macro simtest
    4   if ($0 != 6)
    5     echo "USAGE: simtest (testroot) (dbname) (hostname) (threads) (init)"
    6     echo " if (init) == 0, just run the analysis tasks"
    7     echo " if (init) == 1, (re)create the database and (re)inject the images"
    8     echo " if (init) == 2, restart completely from scratch"
     30  if ($0 != 4)
     31    echo "USAGE: simtest (dbname) (hostname) (init)"
     32    echo " if (init) == run    : just run the analysis tasks"
     33    echo " if (init) == inject : (re)create the database and (re)inject the images"
     34    echo " if (init) == new    : restart completely from scratch"
     35    echo ""
     36    echo "there are additional options which may be specified by setting the following variable names:"
     37    echo "  PPSIM_RECIPE     : define the recipe to use when generating the fake data"
     38    echo "  SIMTEST_CAMERA   : define an alternate camera (otherwise uses entry in sequence file)"
     39    echo "  SIMTEST_SEQUENCE : define the set of observations generated (simtest.basic.config)"
     40    echo "  SIMTEST_AUTO     : define the analysis steps to perform (simtest.auto)"
     41    echo "  SIMTEST_THREADS  : set the number of threads for the processing node (0)"
    942    break
    1043  end
    1144
    12   $testroot = $1
    13   $dbname = $2
    14   $hostname = $3
    15   $threads = $4
     45  $dbname = $1
     46  $hostname = $2
     47  $init = $3
     48  if (("$init" != "run") && ("$init" != "inject") && ("$init" != "new"))
     49    echo "USAGE: simtest (dbname) (hostname) (init)"
     50    echo " if (init) == run    : just run the analysis tasks"
     51    echo " if (init) == inject : (re)create the database and (re)inject the images"
     52    echo " if (init) == new    : restart completely from scratch"
     53    break
     54  end   
    1655 
    17   if ($5 > 0)
     56  if (("$init" == "new") || ("$init" == "new")) 
    1857    # XXX this will fail and exit the script if the db does not exist or is old...
    1958    exec pxadmin -delete -dbname $dbname
     
    2261    exec pxadmin -create -dbname $dbname
    2362
    24     if ($5 == 2)
     63    if ("$init" == "new")
    2564      # the labels "wait" and "proc" are special names used in automate.pro
    26       exec ppSimSequence $MODULES:0/$testroot.config $testroot.mkimages $testroot.inject -path raw -workdir work -dbname $dbname -label wait -dvodb DVO -tess_id TESS
    27       # not ready for this yet
    28       # -ppsim_recipe FLATCORR
     65   
     66      $ppsim = "ppSimSequence $MODULES:0/$SIMTEST_SEQUENCE simtest.mkimages simtest.inject -path raw -workdir work -dbname $dbname -label wait -dvodb DVO -tess_id TESS"
     67      if ("$PPSIM_RECIPE" != "default")
     68         $ppsim = $ppsim -ppsim_recipe $PPSIM_RECIPE
     69      end
     70      $ppsim = $ppsim -camera $SIMTEST_CAMERA
    2971
    30       exec source $testroot.mkimages
     72      exec $ppsim
    3173
     74      exec source simtest.mkimages
     75
     76      ## XXX this will need to be optional as well
    3277      file TESS/Images.dat found
    3378      if ($found == 0)
     
    3782
    3883    exec chiptool -dbname $dbname -block -label wait
    39     exec source $testroot.inject
     84    exec source simtest.inject
    4085  end
    4186
     
    4590  module.tasks
    4691
    47   controller host add $hostname
     92  if ($SIMTEST_THREADS == 0)
     93    controller host add $hostname
     94  else
     95    controller host add $hostname -threads $SIMTEST_THREADS
     96  end
     97
    4898  add.database $dbname
    4999
    50   automate.load simtest.auto $dbname
     100  automate.load $SIMTEST_AUTO $SIMTEST_CAMERA $dbname
    51101  run
    52102end
    53103
    54104# XXX add a test function to pxadmin to check for db existence
     105
     106## currently defined options for sequence, etc:
     107
     108# sequence: simtest.basic.config, simtest.flatcorr.config
     109# auto: simtest.basic.auto, simtest.flatcorr.auto
     110
     111macro simtest.setup.flatcorr
     112  $PPSIM_RECIPE = FLATCORR
     113  $SIMTEST_SEQUENCE = simtest.flatcorr.config
     114  $SIMTEST_AUTO = simtest.flatcorr.auto
     115end
Note: See TracChangeset for help on using the changeset viewer.