IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 12, 2014, 4:10:18 PM (12 years ago)
Author:
eugene
Message:

merge changes from branches/eam_branches/ipp-20140717

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/test/mkgpc1data.dvo

    r35753 r37246  
    1515# exp_id stack_id raw_file exp_file offset
    1616list imagedata
    17  1 1 $OUTDIR/test.01  0.000
    18  2 1 $OUTDIR/test.02 -0.025
    19  3 1 $OUTDIR/test.03  0.025
    20  4 1 $OUTDIR/test.04  0.010
    21  5 2 $OUTDIR/test.05  0.000
    22  6 2 $OUTDIR/test.06 -0.025
    23  7 2 $OUTDIR/test.07  0.025
    24  8 2 $OUTDIR/test.08  0.010
    25  9 3 $OUTDIR/test.09  0.000
    26 10 3 $OUTDIR/test.10 -0.025
    27 11 3 $OUTDIR/test.11  0.025
    28 12 3 $OUTDIR/test.12  0.010
     17 1 1 $OUTDIR/test.01  0.000 2010/01/01 01:00:00
     18 2 1 $OUTDIR/test.02 -0.025 2010/01/01 02:00:00
     19 3 1 $OUTDIR/test.03  0.025 2010/01/01 03:00:00
     20 4 1 $OUTDIR/test.04  0.010 2010/01/01 04:00:00
     21 5 2 $OUTDIR/test.05  0.000 2010/01/01 05:00:00
     22 6 2 $OUTDIR/test.06 -0.025 2010/01/01 06:00:00
     23 7 2 $OUTDIR/test.07  0.025 2010/01/01 07:00:00
     24 8 2 $OUTDIR/test.08  0.010 2010/01/01 08:00:00
     25 9 3 $OUTDIR/test.09  0.000 2010/01/01 09:00:00
     2610 3 $OUTDIR/test.10 -0.025 2010/01/01 10:00:00
     2711 3 $OUTDIR/test.11  0.025 2010/01/01 11:00:00
     2812 3 $OUTDIR/test.12  0.010 2010/01/01 12:00:00
    2929end
    3030
     
    3939  # mkcatdir.cam PS1_V3 PS1_V4
    4040  # mkcatdir.stk PS1_V3 PS1_V4
    41   mkcatdir.cam PS1_V4 PS1_V4
    42   mkcatdir.stk PS1_V4 PS1_V4
     41  # mkcatdir.cam PS1_V4 PS1_V4
     42  # mkcatdir.stk PS1_V4 PS1_V4
     43  mkcatdir.cam PS1_V5 PS1_V5
     44  mkcatdir.stk PS1_V5 PS1_V5
    4345  insert.stack.set
    4446end
     
    9496    $offset = $word:3
    9597
    96     ctimes -abs 2008/01/01,$i\:00:00 -var mjd
     98    sprintf myDATE "%s" $word:4
     99    sprintf myTIME "%s" $word:5
     100    echo ctimes -abs $myDATE,$myTIME -var mjd
     101    ctimes -abs $myDATE,$myTIME -var mjd
    97102
    98103    # XXX for a simple test of ippToPsps, i need to generate smf files with some correspondence to gpc1 exposure smfs
     
    142147
    143148    mkinput $offset $rawfile
    144     exec mkcmf -no-noise -append $rawfile $cmffile -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 0
     149    exec mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -radec $RA $DEC -type $1 -imageID $ID -sourceID 0
    145150
    146151    # keywords which are read from image extension
     
    203208    end
    204209
    205     if ($i == 5)
     210    if (0 && ($i == 5))
    206211      echo "NOTE: adding image $i 2x to DVO, but without detections : this simulates a failure in LAP dvo"
    207212
    208       echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images
    209       exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images
     213      echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images
     214      exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images
    210215    end
    211216
    212     if ($i == 7)
     217    if (0 && ($i == 7))
    213218      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"
    214       echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J
    215       exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J
     219      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
     220      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
    216221    end
    217222
    218     echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
    219     exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
    220   end
     223    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
     224    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
     225  end
     226
     227  echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
     228  exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
    221229
    222230  if ($PARALLEL)
     
    264272    $offset = $word:2
    265273
     274    ## this is not generating photcodes recognized as stack by relphot
     275
    266276    mkinput $offset $rawfile
    267     exec mkcmf $rawfile $cmffile -extname SkyChip -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1
     277    exec mkcmf -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extname SkyChip -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1
    268278
    269279    # add some required header keywords:
    270280    exec echo "HIERARCH FPA.ZP =          25. / Magnitude zero point" > tmp.hdr
     281    exec echo "TESS_ID = 'RINGS.V3'" >> tmp.hdr
     282    exec echo "SKYCELL = 'skycell.1133.081'" >> tmp.hdr
    271283    exec fits_insert $cmffile tmp.hdr
    272284
    273     exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
    274   end
     285    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
     286    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass
     287  end
     288
     289  echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
     290  exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update
    275291
    276292  if ($PARALLEL)
     
    308324
    309325  # a single exposure
    310   dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl) values ($myID, "test.$myID", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0})
     326  echo $myDATE
     327  echo $myTIME
     328
     329  dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl, dateobs) values ($myID, "test.$myID", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}, '$myDATE $myTIME')
    311330  dbinsert chipRun (exp_id, chip_id) values ($myID, $myID)
    312   dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", "testsoft")
     331  dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", "38000M")
    313332  dbinsert camProcessedExp (cam_id, path_base, fault) values ($myID, "$filename", 0)
    314333  dbinsert fakeRun (fake_id, cam_id) values ($myID, $myID)
     
    332351  $stkfile = $2
    333352
    334   dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft")
     353  dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "37500")
     354
     355  $TIMEFORMAT = mjd
     356  $TIMEREF = 2001/01/01,00:00:00
     357
     358  $mjdsum = 0.0
     359  $Nstk = 0
    335360
    336361  for i 0 $imagedata:n
     
    341366    $expID = $tmp:0
    342367    $expfile = $tmp:2
     368    sprintf myDATE "%s" $tmp:4
     369    sprintf myTIME "%s" $tmp:5
    343370    insert.exp $expID $expfile
    344371    dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID)
    345   end
    346   dbinsert stackSumSkyfile (stack_id) values ($stkID)
    347   dbinsert skycalRun (skycal_id, stack_id) values ($stkID, $stkID)
     372
     373    echo ctimes -abs $myDATE,$myTIME -var mjd
     374         ctimes -abs $myDATE,$myTIME -var mjd
     375    $mjdsum += $mjd
     376    $Nstk ++
     377  end
     378  $mjd = $mjdsum / $Nstk
     379
     380  dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd)
     381  dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID)
    348382  dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile")
    349383 
Note: See TracChangeset for help on using the changeset viewer.