IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42030


Ignore:
Timestamp:
Feb 8, 2022, 8:09:51 PM (4 years ago)
Author:
eugene
Message:

adding option to select the smf by datagroup

Location:
branches/eam_branches/ipp-20211108/ippTests/ippCheck
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/ippTests/ippCheck/ippCheck

    r42024 r42030  
    229229  echo "   EG: ippCheck dvo  (expname) (label)"
    230230  echo "   EG: ippCheck smf  (outroot) (smf1) (smf2) [+plot]"
     231  echo "   EG: ippCheck smf.dgrp (outroot) (smf1) (smf2) [+plot]"
    231232  echo "   EG: ippCheck plot (expname)"
    232233  echo "   EG: ippCheck plot.glob (expglob) (outroot)"
     
    262263  end
    263264
     265  if ("$argv:0" == "smf.dgrp")
     266    smf.compare.by.datagroups $arglist
     267    exit 0
     268  end
     269
    264270  if ("$argv:0" == "plot")
    265271    plot.exposure.user $arglist
  • branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro

    r42024 r42030  
    55
    66module tap.pro
     7
     8macro smf.compare.by.datagroups
     9  $CAMERA = gpc1 
     10
     11  getargs +plot     BOOL  -var SAVEPLOT
     12  getargs -camera   VALUE -var CAMERA
     13
     14  if ($0 != 5)
     15    echo "USAGE: smf.compare.by.datagroups (output) (expname) (DG1) (DG2) [+plot] [-camera gpc2]"
     16    break
     17  end
     18
     19  local output expname dgrp1 dgrp2
     20  $output  = $1
     21  $expname = $2
     22  $dgrp1   = $3
     23  $dgrp2   = $4
     24
     25  get.camera.metadata.by.datagroup $CAMERA $expname $dgrp1
     26  $smffile = $camPath.smf     
     27  $smf1    = `neb-locate -p $smffile`
     28
     29  get.camera.metadata.by.datagroup $CAMERA $expname $dgrp2
     30  $smffile = $camPath.smf     
     31  $smf2    = `neb-locate -p $smffile`
     32
     33  smf.compare.all.extensions $output $smf1 $smf2
     34end
    735
    836macro smf.compare.all.extensions
     
    3765
    3866  ok ($ext0:n == $ext1:n) "same number of extensions"
     67  if ($ext0:n != $ext1:n)
     68    echo "impossible to continue with mismatched extensions"
     69    echo "smf1 : $smf1"
     70    echo "smf2 : $smf2"
     71    exit 3
     72  end
    3973
    4074  # track the number of chips for which the XYnn.hdr keys failed
     
    529563  histogram $1 $2 $hist:minVal $hist:maxVal $hist:delVal -range $3
    530564  $2[0] = 0; $2[-1] = 0
     565end
     566
     567macro get.camera.metadata.by.datagroup
     568 if ($0 != 4)
     569  echo "USAGE: get.camera.metadata.by.datagroup (camera) (expname) (data_group)"
     570  echo "EX:    get.camera.metadata.by.datagroup gpc1 o9322g0253o MOPS.dailytestset.20190516ops40745"
     571  echo "  sets camPath, chipID"
     572  break
     573 end
     574
     575 local dbname expname camlabel
     576 $dbname   = $1
     577 $expname  = $2
     578 $camdgrp  = $3
     579
     580# need to generically handle the question of which version / label
     581# this will be a problem for old exposures without a useful label (cleanup)
     582# instead of label, we could specify the cam_id (which we might know)
     583
     584 $command = camtool -dbname $dbname -processedexp -exp_name $expname -data_group $camdgrp
     585 
     586 queueload  myqueue -x "$command"
     587 queue2book myqueue mybook
     588 
     589 $camPath = NONE
     590 book npages mybook -var npages
     591 
     592 if ($npages < 1)
     593  echo "ERROR: missing exposure : $command"
     594  book delete mybook
     595  next
     596 end
     597 
     598 if ($npages > 1)
     599  echo "ERROR: too many exposures : $command"
     600  book delete mybook
     601  next
     602 end
     603 
     604 sprint pagename page.%03d 0
     605 book getword mybook $pagename path_base -var camPath
     606 book getword mybook $pagename chip_id   -var chipID
     607 book getword mybook $pagename cam_id    -var camID
     608 book delete mybook
    531609end
    532610
Note: See TracChangeset for help on using the changeset viewer.