Changeset 42120
- Timestamp:
- Mar 17, 2022, 7:09:13 AM (4 years ago)
- Location:
- tags/ipp-ops-20220303-rc/ippTests/ippCheck
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
cammask.pro (modified) (5 diffs)
-
camstats.pro (modified) (4 diffs)
-
diffmask.pro (modified) (1 diff)
-
ippCheck (modified) (2 diffs)
-
warpmask.pro (modified) (1 diff)
-
warpstats.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-ops-20220303-rc/ippTests/ippCheck
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/eam_branches/ipp-20211108/ippTests/ippCheck merged eligible /trunk/ippTests/ippCheck merged eligible /branches/IPP-308_move_backups_folder/ippTests/ippCheck 40969-40970 /branches/czw_branch/20160809/ippTests/ippCheck 39651-39924 /branches/czw_branch/20170908/ippTests/ippCheck 40128-40486 /branches/eam_branches/ipp-20191011/ippTests/ippCheck 40935-41170 /branches/eam_branches/ipp-dev-20210817/ippTests/ippCheck 41797-41890 /branches/ipp-259_genericise_backups/ippTests/ippCheck 40910-40966 /tags/ipp-ps1-20210510/ippTests/ippCheck 41576-41704 /tags/ipp-ps1-20210708/ippTests/ippCheck 41709-41749
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
tags/ipp-ops-20220303-rc/ippTests/ippCheck/cammask.pro
r42031 r42120 52 52 $smfreal = `neb-locate -p $smffile` 53 53 54 # sets the list chipName:0 - chipName:n based on chipRun 54 55 get.chip.metadata $dbname $chipID 56 57 # set the list camMask:0 - camMask:n based on nebulous listing 58 # some cam-stage masks may be missing, these are set to NONE 59 # the number of entries in both lists is the same (chipName:n) 55 60 get.chip.mask.files $camPath 56 61 62 # read in the PHU header 63 rd PHU $smfreal 64 65 # set the list chipNseq:0 - chipNseq:n based on smf entries. 66 # Some chips may be missing from the smf, these are set to -1 67 # $chipNseq:n = $chipName:n 68 get.chip.smf.Nseq $smfreal 69 57 70 for i 0 $camMask:n 58 echo $chipName:$i $c amMask:$i71 echo $chipName:$i $chipNseq:$i $camMask:$i 59 72 end 60 73 … … 65 78 if ($table:Ny == 0) 66 79 echo "ERROR: no reference sources found in $refsrcs" 80 81 # generate an empty output file 82 $OUT_FIELDS = 83 foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM 84 $OUT_FIELDS = $OUT_FIELDS $field\_out 85 create -empty $field\_out 86 end 87 88 sprintf output "%s/%s.%s.cam.stf" $OUTDIR $expname $OUTVERSION 89 write -fits DATA $output $OUT_FIELDS 90 91 # save this name for warp and diff analysis, if desired 92 $CAMSOURCE = $output 93 67 94 break 68 95 end … … 71 98 set Nref = ramp(Rref) 72 99 73 # read in the PHU header 74 rd PHU $smfreal 75 76 # create the chipName list from the smffile and calculate the index numbers. 77 # NOTE: if a chip is missing from the smf, this may be inconsistent with chipMask:n 78 # XXX for now, we fail is this happens 79 list chipsRaw -x "ftable -list $smfreal | grep -n hdr | prcol 1 | sed s/.hdr//" 80 for i 0 $chipsRaw:n 81 list word -splitbychar : $chipsRaw:$i 82 $chipNseq:$i = $word:0 - 3; # this number depends on the number of leading tables 83 if ("$chipName:$i" != "$word:1") 84 echo "ERROR: missing chip from smffile: " $chipName:$i 85 break 86 end 87 end 88 89 # delete any existing output vectors 90 foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM 91 delete -q $field\_out 92 end 100 # delete any existing output vectors 101 foreach field $SMF_FIELDS_CAM $REF_FIELDS_CAM $XTR_FIELDS_CAM 102 delete -q $field\_out 103 end 93 104 94 105 # find matching entries in smf file 95 106 for i 0 $chipName:n 107 ## echo $chipName:$i $chipNseq:$i $camMask:$i 108 109 if ($chipNseq:$i < 0) continue 110 96 111 get.chip.detect.stats $chipName:$i $chipNseq:$i 97 get.chip.mask.stats $camMask:$i 112 113 if ("$camMask:$i" == "NONE") 114 # if the mask files are missing, all are masked or unmasked? 115 set Q1ref_onchp = zero(Xref_onchp) + 1.0 116 else 117 get.chip.mask.stats $camMask:$i 118 end 98 119 99 120 foreach field $SMF_FIELDS_CAM … … 241 262 242 263 # get the full list from nebulous (faster than getting each one at a time) 243 list tmpName -x "neb-ls $pathbase.%.mk.fits"264 list tmpName -x "neb-ls -c $pathbase.%.mk.fits" 244 265 245 266 # the list of masks might not match the list of chips 267 # mark missing cam-stage masks with NONE 246 268 $j = 0 269 echo "chipName:n $chipName:n" 247 270 for i 0 $chipName:n 271 # if we get to the end of the list, assign the missing entries to NONE 272 if ($j >= $tmpName:n) 273 $camMask:$i = NONE 274 continue 275 end 248 276 list word -splitbychar . $tmpName:$j 249 277 $Nch = $word:n - 3 … … 254 282 end 255 283 $camMask:$i = $tmpName:$j 256 if ($VERBOSE) echo "found chipMask $camMask:$i "284 if ($VERBOSE) echo "found chipMask $camMask:$i ($chipName:$i) : $i $j $chipName:n $tmpName:n" 257 285 if ($COPYMASKS) exec neb-copy $camMask:$i $OUTDIR 258 286 $j ++ 259 end 260 $camMask:n = $chipName:n 287 if ($j >= $tmpName:n) last 288 end 289 $camMask:n = $tmpName:n 290 end 291 292 # get the file names of the chip mask files. 293 # these are actually the masks from the camera stage which 294 # has the dynamic masking applied 295 macro get.chip.smf.Nseq 296 if ($0 != 2) 297 echo "USAGE: get.camera.smf.Nseq (smffile)" 298 echo " sets chipNseq:0 - chipNseq:n" 299 break 300 end 301 302 local i j smffile 303 $smffile = $1 304 305 # identify the chips in the smffile and calculate the index numbers. 306 # NOTE: if a chip is missing from the smf, set Nseq to -1 307 list chipsRaw -x "ftable -list $smfreal | grep -n hdr | prcol 1 | sed s/.hdr//" 308 309 $j = 0 310 for i 0 $chipName:n 311 # if we get to the end of the list, assign the missing entries to NONE 312 if ($j >= $chipsRaw:n) 313 $chipNseq:$i = -1 314 continue 315 end 316 list word -splitbychar : $chipsRaw:$j 317 $myNseq = $word:0 - 3; # this number depends on the number of leading tables 318 $mychip = $word:1 319 if ($mychip != $chipName:$i) 320 $chipNseq:$i = -1 321 continue 322 end 323 $chipNseq:$i = $myNseq 324 if ($VERBOSE) echo "found chip entry $chipNseq:$i ($chipName:$i) : $i $j $chipName:n $chipsRaw:n" 325 $j ++ 326 end 327 $chipNseq:n = $chipName:n 261 328 end 262 329 -
tags/ipp-ops-20220303-rc/ippTests/ippCheck/camstats.pro
r41981 r42120 38 38 # results in magFound, fracFound, numFound 39 39 calc.camstats 40 if ( $i== 0)40 if (numTotal_sum?[] == 0) 41 41 set numTotal_sum = numTotal 42 42 set numFound_sum = numFound … … 57 57 end 58 58 59 set numTotal = numTotal_sum 60 set numFound = numFound_sum 61 set numPoss = numPoss_sum 62 set numGood = numGood_sum 63 delete numTotal_sum numFound_sum numPoss_sum numGood_sum 59 if (numTotal_sum?[] == 0) 60 calc.camstats 61 else 62 set numTotal = numTotal_sum 63 set numFound = numFound_sum 64 set numPoss = numPoss_sum 65 set numGood = numGood_sum 66 delete numTotal_sum numFound_sum numPoss_sum numGood_sum 67 end 64 68 65 69 set fracFound = (numTotal > 0) ? numFound / numTotal : zero(numTotal) … … 79 83 $BST2 = -tickpad 0.2 -xpad 3.5 -labelpadx 3.0 -ypad 0.5 -labelpady 0.0 +ypad 4.5 +labelpady 4.0 -labels 1001 80 84 81 section aM 0.00 0.66 0.65 0.33 82 section aR 0.00 0.33 0.65 0.33 83 section aD 0.00 0.00 0.65 0.33 84 85 section bM 0.65 0.66 0.35 0.33 86 section bR 0.65 0.33 0.35 0.33 87 section bD 0.65 0.00 0.35 0.33 85 section aM 0.00 0.66 0.65 0.33; label -x mag -y "&sd&h mag" 86 section aR 0.00 0.33 0.65 0.33; label -x mag -y "&sd&h R.A." 87 section aD 0.00 0.00 0.65 0.33; label -x mag -y "&sd&h Dec" 88 89 section bM 0.65 0.66 0.35 0.33; label -x mag -y "&sd&h mag" 90 section bR 0.65 0.33 0.35 0.33; label -x mag -y "&sd&h R.A." 91 section bD 0.65 0.00 0.35 0.33; label -x mag -y "&sd&h Dec" 92 93 if (RA_PSF?[] == 0) 94 echo "no sources in datafile" 95 return 96 end 88 97 89 98 set dR = 3600*(RA_PSF - Rref)*dcos(Dref) … … 256 265 $Mdel = 0.25 257 266 267 if (Mref_out?[] == 0) 268 create magBin $Mmin $Mmax $Mdel 269 set numTotal = zero(magBin) 270 set numFound = zero(magBin) 271 set numPoss = zero(magBin) 272 set numGood = zero(magBin) 273 return 274 end 275 258 276 delete -q magBin numTotal numPoss numFound numGood 259 277 for mag $Mmin $Mmax $Mdel -
tags/ipp-ops-20220303-rc/ippTests/ippCheck/diffmask.pro
r41941 r42120 51 51 # load the reference source table 52 52 # how to choose the name of the filter? 53 data $refsrcs; 53 data $refsrcs 54 55 # first check if the FITS table has any entries 56 read -fits DATA -sizes 57 if ($table:Ny == 0) 58 echo "WARNING: empty reference table $refsrcs" 59 60 $OUT_FIELDS = 61 foreach field $SMF_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF 62 $OUT_FIELDS = $OUT_FIELDS $field\_out 63 create -empty $field\_out 64 end 65 66 sprintf output "%s/%s.%s.dif.stf" $OUTDIR $expname $OUTVERSION 67 write -fits DATA $output $OUT_FIELDS 68 return 69 end 70 54 71 if ($USE_CAMSOURCE) 55 72 read -fits DATA Rref_out Dref_out Mref_out -
tags/ipp-ops-20220303-rc/ippTests/ippCheck/ippCheck
r42058 r42120 59 59 getargs -no-warp BOOL -var SKIP_WARP 60 60 getargs -no-diff BOOL -var SKIP_DIFF 61 getargs - do-plots BOOL -var DO_PLOTS;61 getargs -no-plots BOOL -var SKIP_PLOTS; 62 62 getargs -use-refs BOOL -var USE_REFSOURCE 63 63 getargs -camera VALUE -var CAMERA; … … 97 97 end 98 98 99 if ( $DO_PLOTS) plot.exposure.real $expname99 if (not($SKIP_PLOTS)) plot.exposure.real $expname 100 100 end 101 101 -
tags/ipp-ops-20220303-rc/ippTests/ippCheck/warpmask.pro
r41941 r42120 44 44 # NOTE: Mref is chosen to match filter for this exposure 45 45 data $refsrcs ; 46 47 # first check if the FITS table has any entries 48 read -fits DATA -sizes 49 if ($table:Ny == 0) 50 echo "WARNING: empty reference table $refsrcs" 51 52 # generate empty output vectors for output file 53 $OUT_FIELDS = 54 foreach field $REF_FIELDS_WRP $XTR_FIELDS_WRP 55 $OUT_FIELDS = $OUT_FIELDS $field\_out 56 create -empty $field\_out 57 end 58 59 sprintf output "%s/%s.%s.wrp.stf" $OUTDIR $expname $OUTVERSION 60 write -fits DATA $output $OUT_FIELDS 61 62 return 63 end 64 46 65 if ($USE_CAMSOURCE) 47 66 read -fits DATA Rref_out Dref_out Mref_out -
tags/ipp-ops-20220303-rc/ippTests/ippCheck/warpstats.pro
r41941 r42120 24 24 # results in magFound, fracFound, numFound 25 25 calc.warpstats 26 if ( $i== 0)26 if (numTotal_sum?[] == 0) 27 27 set numTotal_sum = numTotal 28 28 set numPoss_sum = numPoss … … 39 39 end 40 40 41 set numTotal = numTotal_sum 42 set numPoss = numPoss_sum 43 delete numTotal_sum numPoss_sum 41 if (numTotal_sum?[] == 0) 42 # generate vectors for empty inputs 43 calc.warpstats 44 else 45 set numTotal = numTotal_sum 46 set numPoss = numPoss_sum 47 delete numTotal_sum numPoss_sum 48 end 44 49 45 50 set fracPoss = (numTotal > 0) ? numPoss / numTotal : zero(numTotal) … … 89 94 $Mdel = 0.25 90 95 96 if (Mref_out?[] == 0) 97 create magBin $Mmin $Mmax $Mdel 98 set numTotal = zero(magBin) 99 set numPoss = zero(magBin) 100 return 101 end 102 91 103 delete -q magBin numTotal numPoss 92 104 for mag $Mmin $Mmax $Mdel
Note:
See TracChangeset
for help on using the changeset viewer.
