IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41719 for trunk/tools


Ignore:
Timestamp:
Jul 14, 2021, 10:00:13 AM (5 years ago)
Author:
eugene
Message:

fix minor bugs, update output names for consistency

Location:
trunk/tools/eam/teleff
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/teleff/cammask.pro

    r41717 r41719  
    22
    33$VERBOSE    = 1       
    4 $COPYMASKS  = 1
     4$COPYMASKS  = 0
    55$OUTDIR     = .
    66$OUTVERSION = XXX
     
    6565 end
    6666
     67  # delete any existing output vectors
     68  foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM
     69    delete -q $field\_out
     70  end
     71
    6772 # find matching entries in smf file
    6873 for i 0 $chipName:n
     
    7075   get.chip.mask.stats $camMask:$i
    7176
    72    foreach field SMF_FIELDS_CAM
     77   foreach field $SMF_FIELDS_CAM
    7378     concat $field\_found $field\_out
    7479     delete $field\_found
    7580   end
    76    foreach field REF_FIELDS_CAM $XTR_FIELDS_CAM
     81   foreach field $REF_FIELDS_CAM $XTR_FIELDS_CAM
    7782     concat $field\_onchp $field\_out
    7883     delete $field\_onchp
     
    8186
    8287 $OUT_FIELDS =
    83  foreach field $SMP_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM
     88 foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM
    8489   $OUT_FIELDS = $OUT_FIELDS $field\_out
    8590 end
     
    309314
    310315
    311 ####
     316#### this test macro generates the match table without measuring the mask fraction
     317#### XXX the output formats are not consistent with the above version
    312318
    313319macro get.camera.matches
  • trunk/tools/eam/teleff/diffmask.pro

    r41717 r41719  
    22
    33$VERBOSE    = 1       
    4 $COPYMASKS  = 1
     4$COPYMASKS  = 0
    55$OUTDIR     = .
    6 $OUTVERSION = XXX
     6if (not($?OUTVERSION))
     7  $OUTVERSION = XXX
     8end
    79
    810$DIFF_MODE_WW = 1
     
    5254  if ($VERBOSE) echo "loaded Rref[] sources from reference $refsrcs"
    5355
     56  # delete any existing output vectors
     57  foreach field $SMF_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF
     58    delete -q $field\_out
     59  end
     60
    5461  # find matching entries in cmf files and measure mask fraction
    5562  for i 0 $diffMask:n
     
    6774    end
    6875
    69    foreach field SMF_FIELDS_DIF
     76   foreach field $SMF_FIELDS_DIF
    7077     concat $field\_found $field\_out
    7178     delete $field\_found
    7279   end
    73    foreach field REF_FIELDS_DIF $XTR_FIELDS_DIF
     80   foreach field $REF_FIELDS_DIF $XTR_FIELDS_DIF
    7481     concat $field\_onchp $field\_out
    7582     delete $field\_onchp
     
    7885
    7986  $OUT_FIELDS =
    80   foreach field $SMP_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF
     87  foreach field $SMF_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF
    8188    $OUT_FIELDS = $OUT_FIELDS $field\_out
    8289  end
    8390
    84   sprintf output "%s/%s.%s.diff.stf" $OUTDIR $expname $OUTVERSION
     91  sprintf output "%s/%s.%s.dif.stf" $OUTDIR $expname $OUTVERSION
    8592  write -fits DATA $output $OUT_FIELDS
    8693end
     
    128135
    129136  # generate a subset of sources which are within the boundaries of the skycell
    130   set keep = (XrefS >= 0) && (XrefS <= $NAXIS1) && (YrefS >= 0) && (YrefS <= $NAXIS2)
     137  set keep = (Xref_tmp >= 0) && (Xref_tmp <= $NAXIS1) && (Yref_tmp >= 0) && (Yref_tmp <= $NAXIS2)
    131138  foreach field $REF_FIELDS_DIF Nref Xref Yref
    132139    subset $field\_onchp = $field\_tmp if keep
     
    201208 for i 0 $diffPath:n
    202209   sprintf filename "%s.mask.fits" $diffPath:$i
     210   break -auto off   
    203211   $diffMask:$i = `neb-locate -p $filename`
    204    if ($COPYMASKS) exec neb-copy $filename $OUTDIR
     212   break -auto on
     213   if ("$diffMask:$i" == "")
     214     echo "skipping $filename"
     215   else
     216     if ($COPYMASKS) exec neb-copy $filename $OUTDIR
     217   end
    205218
    206219   sprintf filename "%s.cmf" $diffPath:$i
     
    274287 
    275288 if ($npages < 1)
    276   echo "ERROR: missing exposure : $command"
     289  # try the template versoin
    277290  book delete mybook
    278   next
     291 
     292  $command = difftool -dbname $dbname -listrun -exp_name $expname -warp_id $warpID -diff_mode $diffMode -template
     293 
     294  queueload  myqueue -x "$command"
     295  queue2book myqueue mybook
     296 
     297  book npages mybook -var npages
     298 
     299  if ($npages < 1)
     300   echo "ERROR: missing exposure : $command"
     301   book delete mybook
     302   return
     303  end
    279304 end
    280305 
     
    282307  echo "ERROR: too many exposures : $command"
    283308  book delete mybook
    284   next
     309  return
    285310 end
    286311 
  • trunk/tools/eam/teleff/teleff.pro

    r41718 r41719  
    3333  get.diff.eff       gpc1 $expname $warpID           $REFSOURCE
    3434
    35   break
     35  return
    3636
    3737  $KAPA = kapa -noX
     
    6666  # this sample has ~1900 known asteroids covering 375 sq deg. we should expect ~ 35 asteroids per exposure
    6767
     68  # mpcorb_predict trange mpc/mpcorb_extended.59396.dat 59375.2 59375.8 190 250 -10 20 trange.59375.fits
     69  # this area covers exposures o9375g0060o - o9375g0341o (visit 1) and later visits
     70
    6871  # use a larger match radius for the asteroids
    6972  $MATCH_RADIUS = 3.0
     
    7679  get.diff.eff       gpc1 $expname $warpID           $REFSOURCE
    7780
    78   break
     81  return
    7982
    8083  $KAPA = kapa -noX
  • trunk/tools/eam/teleff/truth.pro

    r41718 r41719  
    7676
    7777 # the DVO truth file is specific to the exposure
    78  sprintf REFSOURCE "%s/%s.dvo.fits" $OUTDIR $expname
     78 sprintf REFSOURCE "%s/%s.DVO.fits" $OUTDIR $expname
    7979 write -fits DATA $REFSOURCE Rref Dref Mref
    8080end
     
    120120 
    121121 # mpcorb_predict generates a FITS table specific to the exposure with fields (Rref, Dref, Mref)
    122  sprintf REFSOURCE "%s/%s.mpc.fits" $OUTDIR $expname
     122 sprintf REFSOURCE "%s/%s.MPC.fits" $OUTDIR $expname
    123123 echo mpcorb_predict moment $mpcfile $MJD $Rmin $Rmax $Dmin $Dmax $REFSOURCE
    124124 exec mpcorb_predict moment $mpcfile $MJD $Rmin $Rmax $Dmin $Dmax $REFSOURCE
  • trunk/tools/eam/teleff/warpmask.pro

    r41717 r41719  
    22
    33$VERBOSE    = 1       
    4 $COPYMASKS  = 1
     4$COPYMASKS  = 0
    55$OUTDIR     = .
    66$OUTVERSION = XXX
     
    4646  if ($VERBOSE) echo "loaded Rref[] sources from reference $refsrcs"
    4747
     48  # delete any existing output vectors
     49  foreach field $REF_FIELDS_WRP $XTR_FIELDS_WRP
     50    delete -q $field\_out
     51  end
     52
    4853  # find matching entries in smf file
    4954  for i 0 $warpMask:n
    5055    get.warp.mask.stats $warpMask:$i
    5156
    52     foreach field REF_FIELDS_WRP $XTR_FIELDS_WRP
     57    foreach field $REF_FIELDS_WRP $XTR_FIELDS_WRP
    5358      concat $field\_onchp $field\_out
    5459      delete $field\_onchp
     
    6166  end
    6267
    63   sprintf output "%s/%s.%s.%s.warp.stf" $OUTDIR $expname $skycell:$i $OUTVERSION
     68  sprintf output "%s/%s.%s.wrp.stf" $OUTDIR $expname $OUTVERSION
    6469  write -fits DATA $output $OUT_FIELDS
    6570end
Note: See TracChangeset for help on using the changeset viewer.