IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2014, 2:35:47 PM (12 years ago)
Author:
eugene
Message:

updating sas test code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140717/ippToPsps/test/mksasdata.dvo

    r35097 r37163  
    44
    55if (not($?VERBOSE)) set VERBOSE = 0
     6if (not($?PARALLEL)) set PARALLEL = 0
    67
    7 $OUTDIR = sas12
     8$OUTDIR = sasdata
    89
    910macro mkfull
    1011  init.db
    11   mkcatdir
     12  # mkcatdir.cam
     13  mkcatdir.stk
    1214end
    1315
     
    1820  $dbpass = dvo
    1921
    20   # exposure center
    21   $RA = 333.8
    22   $DEC = 1.6
    23 
    24   # stack center
    25   # XXX the selected stack centers come from the input exposures, so I should use a gpc1 db with stacks associated with real exposures
    26   $RA = 331.6
    27   $DEC = -6.0
     22  # are these used to find the exposures in any way?
     23  $RA = 333.5
     24  $DEC = -5.0
    2825
    2926  break -auto off
     
    4037
    4138# create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp
    42 macro mkcatdir
     39macro mkcatdir.cam
    4340  if ($0 != 1)
    4441    echo "mkcatdir"
     
    4946
    5047  local catdir
    51   $catdirbase = catdir.sas12
     48  $catdirbase = catdir.sas.cam
    5249  $catdir = $OUTDIR/$catdirbase
    5350  exec rm -rf $catdir
    5451
    55   $expfile = sas12.test.psps/o5745g0620o.356996.cm.473458
     52  $expfile = sasdata/o5745g0620o.356996.cm.473458
    5653  exec addstar -D CAMERA gpc1 -D CATDIR $catdir $expfile.smf
    5754
    5855  # are these used to find the exposures in any way?
    59   $RA = 333.8
    60   $DEC = 1.6
     56  $RA = 333.5
     57  $DEC = -5.0
    6158
    6259  # a single exposure
     
    7168  dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("cam", "full", $expID, "$catdirbase")
    7269
    73   # a single stack
    74   $stkfile = sas12.test.psps/RINGS.V3.skycell.1225.070.stk.1032983.skycal.40531
    75   exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf
    76 
    77   $stkID = 1
    78   dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft")
    79   dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID)
    80   dbinsert stackSumSkyfile (stack_id) values ($stkID)
    81   dbinsert skycalRun (skycal_id, stack_id) values ($stkID, $stkID)
    82   dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile")
    83   dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("skycal", "full", $stkID, "$catdirbase")
    84 
    8570  # catdirs for the exposures
    8671  dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged")
     
    8974  dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase")
    9075  dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0)
     76end
     77
     78# create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp
     79macro mkcatdir.stk
     80  if ($0 != 1)
     81    echo "mkcatdir"
     82    break
     83  end
     84
     85  mkdir $OUTDIR
     86
     87  local catdir
     88  $catdirbase = catdir.sas.stk
     89  $catdir = $OUTDIR/$catdirbase
     90  exec rm -rf $catdir
     91
     92  # are these used to find the exposures in any way?
     93  $RA = 333.5
     94  $DEC = -5.0
     95
     96  $TIMEFORMAT = mjd
     97  $TIMEREF = 2001/01/01,00:00:00
     98  ctimes -abs 2010/01/01,00:00:00 -var mjd
     99
     100  # a single stack
     101  $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960
     102  exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf
     103
     104  # echo relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
     105  # exec relphot -D CATDIR $catdir -region {$RA-5} {$RA+5} {$DEC-5} {$DEC+5} -images g,r,i,z,y -update
     106
     107  break -auto off
     108  $tmpline = `echo $stkfile.cmf | fields IMAGEID`
     109  list words -split $tmpline
     110  $stkID = $words:1
     111  break -auto on
     112
     113  $expID = 1
     114  dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft")
     115  dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID)
     116  dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd)
     117  dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID)
     118  dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile")
     119  dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("skycal", "full", $stkID, "$catdirbase")
    91120
    92121  # catdirs for the stack
Note: See TracChangeset for help on using the changeset viewer.