IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38836


Ignore:
Timestamp:
Oct 10, 2015, 12:29:55 PM (11 years ago)
Author:
eugene
Message:

make tests a bit more robust (exit on failures); add bits for FW tests

Location:
trunk/ippToPsps/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/test/fulltest.sh

    r38823 r38836  
    157157  # XXX this command will blow away an existing database!!
    158158  mysql -h localhost -u dvo -pdvo -e "create database if not exists ipptopsps_test" || exit 3
    159   mysql -h localhost -u dvo -pdvo ipptopsps_test < $IPPTOPSPS_DATA/ippToPspsDbSchema.sql || exit 2
     159  mysql -h localhost -u dvo -pdvo ipptopsps_test < $IPPTOPSPS_DATA/ippToPspsDbSchema.sql || exit 3
     160  echo " ---- init ipptopsps_test: done ----"
    160161endif
    161162
     
    211212  echo "2000-01-01 00:00:00.0  " >> initbatch.dat # trange_start
    212213  echo "2020-01-01 00:00:00.0  " >> initbatch.dat # trange_end
    213   cat initbatch.dat | ippjython queue.py -test edit
    214   if ($status) exit
     214  ippjython queue.py -test edit < initbatch.dat
     215  if ($status) exit 1
    215216
    216217  echo ""
     
    219220  rm -rf $OUTDIR/IN
    220221  ippjython loader.py -test initbatch init -simtest < /dev/null
    221   if ($status) exit
     222  if ($status) exit 1
    222223endif
    223224
     
    259260  echo "2000-01-01 00:00:00.0 " >> cambatch.dat # trange_start
    260261  echo "2020-01-01 00:00:00.0 " >> cambatch.dat # trange_end
    261   cat cambatch.dat | ippjython queue.py -test edit -simtest
    262   if ($status) exit
     262  ippjython queue.py -test edit -simtest < cambatch.dat
     263  if ($status) exit 1
    263264endif
    264265
     
    312313  echo "2000-01-01 00:00:00.0 " >> stackbatch.dat # trange_start
    313314  echo "2020-01-01 00:00:00.0 " >> stackbatch.dat # trange_end
    314   cat stackbatch.dat | ippjython queue.py -test edit -simtest
     315  ippjython queue.py -test edit -simtest < stackbatch.dat
    315316  if ($status) exit
    316317endif
     
    368369  echo "2000-01-01 00:00:00.0 " >> objectbatch.dat # trange_start
    369370  echo "2020-01-01 00:00:00.0 " >> objectbatch.dat # trange_end
    370   cat objectbatch.dat | ippjython queue.py -test edit once -simtest
     371  ippjython queue.py -test edit once -simtest < objectbatch.dat
    371372  if ($status) exit
    372373endif
  • trunk/ippToPsps/test/mkgpc1data.dvo

    r38823 r38836  
    1313
    1414# imagedata describes the full fake exposure set.  the fields are
    15 # exp_id stack_id raw_file exp_file offset
    1615list imagedata
     16# exp_id filebase         M_off date       time
     17   1     $OUTDIR/test.01  0.000 2010/01/01 01:00:00
     18   2     $OUTDIR/test.02 -0.025 2010/01/01 02:00:00
     19   3     $OUTDIR/test.03  0.025 2010/01/01 03:00:00
     20   4     $OUTDIR/test.04  0.010 2010/01/01 04:00:00
     21   5     $OUTDIR/test.05  0.000 2010/01/01 05:00:00
     22   6     $OUTDIR/test.06 -0.025 2010/01/01 06:00:00
     23   7     $OUTDIR/test.07  0.025 2010/01/01 07:00:00
     24   8     $OUTDIR/test.08  0.010 2010/01/01 08:00:00
     25   9     $OUTDIR/test.09  0.000 2010/01/01 09:00:00
     26  10     $OUTDIR/test.10 -0.025 2010/01/01 10:00:00
     27  11     $OUTDIR/test.11  0.025 2010/01/01 11:00:00
     28  12     $OUTDIR/test.12  0.010 2010/01/01 12:00:00
     29end
     30
     31list warpdata
    1732 1 1 $OUTDIR/test.01  0.000 2010/01/01 01:00:00
    1833 2 1 $OUTDIR/test.02 -0.025 2010/01/01 02:00:00
     
    3045
    3146list stackdata
    32  1 $OUTDIR/stack.01 0.010
    33  2 $OUTDIR/stack.02 0.020
    34  3 $OUTDIR/stack.03 0.030
     47# stk_id filename         M_off
     48  1      $OUTDIR/stack.01 0.010
     49  2      $OUTDIR/stack.02 0.020
     50  3      $OUTDIR/stack.03 0.030
    3551end
    3652 
    3753macro mkfull
    3854  init.db
    39   # mkcatdir.cam PS1_V3 PS1_V4
    40   # mkcatdir.stk PS1_V3 PS1_V4
    41   # mkcatdir.cam PS1_V4 PS1_V4
    42   # mkcatdir.stk PS1_V4 PS1_V4
    4355  mkcatdir.cam PS1_V5 PS1_V5
    4456  mkcatdir.stk PS1_V5 PS1_V5
     
    92104    list word -split $imagedata:$i
    93105    $ID = $word:0
    94     $rawfile = $word:2\.txt
    95     $cmffile = $word:2\.smf
    96     $offset = $word:3
    97 
    98     sprintf myDATE "%s" $word:4
    99     sprintf myTIME "%s" $word:5
     106    $rawfile = $word:1\.txt
     107    $cmffile = $word:1\.smf
     108    $offset = $word:2
     109
     110    sprintf myDATE "%s" $word:3
     111    sprintf myTIME "%s" $word:4
    100112    echo ctimes -abs $myDATE,$myTIME -var mjd
    101113    ctimes -abs $myDATE,$myTIME -var mjd
    102114
    103     # XXX for a simple test of ippToPsps, i need to generate smf files with some correspondence to gpc1 exposure smfs
     115    # XXX for a simple test of ippToPsps, i need to generate smf files
     116    # with some correspondence to gpc1 exposure smfs
     117
    104118    # this means:
    105119    # 1) a PHU with some basic header data
    106120    # 2) add extensions with EXTNAME of XYnn
     121
     122    # NOTE: mkcmf does not populate a PHU, so we have to fake it
    107123
    108124    # create an empty header and populate with the desired keywords
     
    150166    exec mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -radec $RA $DEC -type $1 -imageID $ID -sourceID 0
    151167
    152     # keywords which are read from image extension
    153     # MSKY_MN
    154     # MSKY_SIG
    155     # FSATUR
    156     # FLIMIT
    157     # CERROR
    158     # ZPT_OBS
    159     # NASTRO
    160     # NASTRO
    161     # CNAXIS1
    162     # CNAXIS2
    163     # FWHM_MAJ
    164     # FWHM_MIN
    165     # ANGLE
    166     # IQ_FW1
    167     # IQ_FW2
    168     # IQ_FW1
    169     # IQ_FW2
    170     # APMIFIT
    171     # DAPMIFIT
    172     # DETECTOR
    173     # IMAGEID
    174     # DETREND.MASK
    175     # DETREND.DARK
    176     # DETREND.FLAT
    177     # ZPT_OBS
    178     # CTYPE1
    179     # CTYPE2
    180     # CRVAL1
    181     # CRVAL2
    182     # CRPIX1
    183     # CRPIX2
    184     # CDELT1
    185     # CDELT2
    186     # PC001001
    187     # PC001002
    188     # PC002001
    189     # PC002002
    190     # NPLYTERM
    191     # PCA1X3Y0
    192     # PCA1X2Y1
    193     # PCA1X1Y2
    194     # PCA1X0Y3
    195     # PCA1X2Y0
    196     # PCA1X1Y1
    197     # PCA1X0Y2
    198     # PCA2X3Y0
    199     # PCA2X2Y1
    200     # PCA2X1Y2
    201     # PCA2X0Y3
    202     # PCA2X2Y0
    203     # PCA2X1Y1
    204     # PCA2X0Y2
    205 
    206168    if ($i == 3)
    207169      echo "NOTE: not adding image $i to DVO : this simulates images with poor astrometry"
     
    210172
    211173    if (0 && ($i == 5))
    212       echo "NOTE: adding image $i 2x to DVO, but without detections : this simulates a failure in LAP dvo"
     174      echo "NOTE: adding image $i 2x to DVO, but without detections : this simulates a failure in dvo contruction"
    213175
    214176      echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images
     
    217179
    218180    if (0 && ($i == 7))
    219       echo "NOTE: adding detections from image $i 2x to DVO, but with wrong photcode and duplicate image ID : this simulates a failure in LAP dvo"
     181      echo "NOTE: adding detections from image $i 2x to DVO, but with wrong photcode and duplicate image ID : this simulates a failure in dvo construction"
    220182      echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J
    221183      exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J
Note: See TracChangeset for help on using the changeset viewer.