IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2014, 2:31:18 PM (12 years ago)
Author:
eugene
Message:

fix up sastest.sh to work with example smfs

File:
1 edited

Legend:

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

    r37192 r37207  
    1010macro mkfull
    1111  init.db
    12   # mkcatdir.cam
    13   mkcatdir.stk
     12  mkcatdir.cam
     13  # mkcatdir.stk
    1414end
    1515
     
    5050  exec rm -rf $catdir
    5151
    52   $expfile = sasdata/o5745g0620o.356996.cm.473458
    53   exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf
     52  list expfiles
     53    sasdata/o5745g0495o.356867.cm.982612
     54    sasdata/o5745g0507o.356882.cm.982626
     55    sasdata/o5745g0517o.356892.cm.982636
     56    sasdata/o5745g0527o.356909.cm.982650
     57  end
    5458
    55   # are these used to find the exposures in any way?
    56   $RA = 333.5
    57   $DEC = -5.0
     59  for i 0 $expfiles:n
     60    $expfile = $expfiles:$i
     61    exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf
    5862
    59   # a single exposure
    60   $expID = 1
    61   dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl) values ($expID, "o5745g0620o", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0})
    62   dbinsert chipRun (exp_id, chip_id) values ($expID, $expID)
    63   dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($expID, $expID, "testgroup", "38000M")
    64   dbinsert camProcessedExp (cam_id, path_base) values ($expID, "$expfile")
    65   dbinsert fakeRun (fake_id, cam_id) values ($expID, $expID)
    66   dbinsert warpRun (warp_id, fake_id) values ($expID, $expID)
    67   dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($expID, "skycell.0000.000", "XY00")
    68   dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("cam", "full", $expID, "$catdirbase")
     63    # are these used to find the exposures in any way?
     64    $RA = 333.9
     65    $DEC = -3.8
    6966
    70   # catdirs for the exposures
    71   dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged")
    72   dbinsert minidvodbProcessed (minidvodb_id, fault) values (1, 0)
    73  
    74   dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase")
    75   dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0)
     67    # a single exposure
     68    $expID = $i + 1
     69    substr $expfile 8 11 expname
     70
     71    dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl, dateobs) values ($expID, "$expname", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}, "2010/01/01 00:00:00")
     72    dbinsert chipRun (exp_id, chip_id) values ($expID, $expID)
     73    dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($expID, $expID, "testgroup", "38000M")
     74    dbinsert camProcessedExp (cam_id, path_base, fault) values ($expID, "$expfile", 0)
     75    dbinsert fakeRun (fake_id, cam_id) values ($expID, $expID)
     76    dbinsert warpRun (warp_id, fake_id) values ($expID, $expID)
     77    dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($expID, "skycell.0000.000", "XY00")
     78    dbinsert addRun (add_id, stage, state, stage_id, minidvodb_name) values ($expID, "cam", "full", $expID, "$catdirbase")
     79    dbinsert addProcessedExp (add_id, fault) values ($expID, 0)
     80   
     81    # catdirs for the exposures
     82    dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged")
     83    dbinsert minidvodbProcessed (minidvodb_id, fault) values (1, 0)
     84   
     85    dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase")
     86    dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0)
     87  end
     88
     89  echo relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update
     90  exec relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update
    7691end
    7792
Note: See TracChangeset for help on using the changeset viewer.