- Timestamp:
- Feb 24, 2022, 2:36:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro
r42056 r42058 180 180 get.camera.metadata.by.datagroup $CAMERA $expname $dgrp2; $smfBase2 = $camPath 181 181 182 tap.plan $NTESTS_CMF 183 182 184 $options = 183 185 setargs +plot BOOL $SAVEPLOT … … 185 187 echo smf.compare.all.extensions $output $smfBase1.smf $smfBase2.smf $options 186 188 smf.compare.all.extensions $output $smfBase1.smf $smfBase2.smf $options 189 tap.done 187 190 end 188 191 … … 223 226 end 224 227 228 tap.plan {$npages1 * $NTESTS_CMF} 229 225 230 for i 0 $npages1 226 231 book getpage warpBook1 $i -var mypage1 … … 238 243 echo smf.compare.all.extensions $output.$skycellID $cmfBase1.cmf $cmfBase2.cmf $options 239 244 smf.compare.all.extensions $output.$skycellID $cmfBase1.cmf $cmfBase2.cmf $options 240 end 241 242 book delete warpBook1 243 book delete warpBook2 245 end 246 247 book delete warpBook1 248 book delete warpBook2 249 250 tap.done 244 251 end 245 252 … … 279 286 end 280 287 288 tap.plan {2 * $npages1 * $NTESTS_CMF} 289 281 290 for i 0 $npages1 282 291 book getpage diffBook1 $i -var mypage1 … … 299 308 echo smf.compare.all.extensions $output.$skycellID.inv $cmfBase1.inv.cmf $cmfBase2.inv.cmf $options 300 309 smf.compare.all.extensions $output.$skycellID.inv $cmfBase1.inv.cmf $cmfBase2.inv.cmf $options 310 else 311 tap.skip $NTESTS_CMF 301 312 end 302 313 end … … 329 340 if ("$smf1" == "") 330 341 echo "ERROR: missing smf/cmf file : $smfFile1" 342 tap.skip $NTESTS_CMF 331 343 next 332 344 end 333 345 if ("$smf2" == "") 334 346 echo "ERROR: missing smf/cmf file : $smfFile2" 347 tap.skip $NTESTS_CMF 335 348 next 336 349 end … … 338 351 dirname $outroot -var mydir 339 352 mkdir $mydir 340 341 # XXX this number depends on the schema of the smfs and the camera (gpc1 vs gpc2)342 # XXX can we calculate the number of tests based on the number of smf extensions?343 # plan 3125344 ## XXX if smf.compare.all.extensions is called by an external function, we probably need a different plan,345 ## or we need to call 'plan' at the outer level?346 plan $NTESTS_CMF347 348 # Load psfField definitions. These variables are set by the349 # (init.camera, init.warp, init.diff) macros defined in .ippcheckrc.350 # These are called by init.stage351 smf.compare.parse.book $PSF_FIELDS psfFields352 smf.compare.parse.book $PSF_KEYS psfKeys353 smf.compare.parse.book $HDR_KEYS hdrKeys354 353 355 354 # does the smf have the right number of extensions? … … 381 380 if ($Next2 == -1) 382 381 echo "not ok : missing extenion $ext0:$Next1" 382 # XXX add a tap.skip here? 383 383 next 384 384 end 385 385 386 ok ($ext0:$Next1 == $ext1:$Next2) "matching ext names"386 # tap.ok ($ext0:$Next1 == $ext1:$Next2) "matching ext names" 387 387 $extname = $ext0:$Next1 388 388 # NOTE: analysis below uses ext sequence number (i,j) … … 398 398 echo "##### comparison results in $outroot.$extname.keys #####" 399 399 exec ippCheckKeys $smf1 $Next1 $smf2 $Next2 >& $outroot.$extname.keys 400 smf.compare.keys $outroot.$extname.keys hdrKeys 400 smf.compare.keys $outroot.$extname.keys hdrKeys; # TAP: 1 401 401 if ($NfailKeys) set NfailHdr = $NfailHdr + 1 402 402 end … … 408 408 echo "##### comparison results in $outroot.$extname.keys #####" 409 409 exec ippCheckKeys $smf1 $Next1 $smf2 $Next2 >& $outroot.$extname.keys 410 smf.compare.keys $outroot.$extname.keys psfKeys 410 smf.compare.keys $outroot.$extname.keys psfKeys; # TAP: 1 411 411 if ($NfailKeys) set NfailPsf = $NfailPsf + 1 412 412 … … 414 414 echo "##### comparison results in $outroot.$extname.txt #####" 415 415 smf.compare.onechip $outroot.$extname $smf1 {$Next1-1} $smf2 {$Next2-1}; # Note smf.compare.onechip counts from 0 = first extension 416 # TAP: 2 + Nfields 416 417 end 417 418 … … 422 423 echo "##### comparison results in $outroot.$extname.keys #####" 423 424 exec ippCheckKeys $smf1 $Next1 $smf2 $Next2 >& $outroot.$extname.keys 424 smf.compare.keys $outroot.$extname.keys hdrKeys 425 smf.compare.keys $outroot.$extname.keys hdrKeys; # TAP: 1 425 426 if ($NfailKeys) set NfailHdr = $NfailHdr + 1 426 427 end … … 432 433 echo "##### comparison results in $outroot.$extname.keys #####" 433 434 exec ippCheckKeys $smf1 $Next1 $smf2 $Next2 >& $outroot.$extname.keys 434 smf.compare.keys $outroot.$extname.keys psfKeys 435 smf.compare.keys $outroot.$extname.keys psfKeys; # TAP: 1 435 436 if ($NfailKeys) set NfailPsf = $NfailPsf + 1 436 437 … … 440 441 end 441 442 end 442 ok ($NfailHdr == 0) "$NfailHdr HDR headers failed comparison" 443 ok ($NfailPsf == 0) "$NfailPsf PSF headers failed comparison" 444 445 done 443 tap.ok ($NfailHdr == 0) "$NfailHdr HDR headers failed comparison" ; # TAP: each file 444 tap.ok ($NfailPsf == 0) "$NfailPsf PSF headers failed comparison" ; # TAP: each file 446 445 end 447 446 … … 474 473 $smf2_has_data = ($tfields:n > 0) && ($table:Ny > 0) 475 474 476 ok ($smf1_has_data == $smf2_has_data) "tables both have (or both lack) data"475 tap.ok ($smf1_has_data == $smf2_has_data) "tables both have (or both lack) data" ; # TAP: each chip 477 476 if (not($smf1_has_data) || not($smf2_has_data)) 478 477 echo "no data in tables $smf1 $ext1 or $smf2 $ext2, skipping" 479 478 # I should account for the number of skipped tests 479 local Nfields 480 book npages psfFields -var Nfields 481 tap.skip {$Nfields + 1} 480 482 return 481 483 end … … 554 556 # 555 557 output $output.txt 556 echo " $N1_keep & $N1_miss vs $N2_keep & $N2_miss"558 echo "PSF FIELDS: $N1_keep & $N1_miss vs $N2_keep & $N2_miss" 557 559 output stdout 558 559 # positional consistency:560 set dX = X_PSF_$v1 - Xm_$v2561 set dY = Y_PSF_$v1 - Ym_$v2562 563 # add a test here?564 # XXX this test is equivalent to tests of the fields below565 # but cannot be as finely controlled566 # vstat -q dX567 # ok ($SIGMA < 0.1) "X position stdev $SIGMA < 0.1"568 # vstat -q dY569 # ok ($SIGMA < 0.1) "Y position stdev $SIGMA < 0.1"570 560 end 571 561 … … 596 586 end 597 587 598 ok ($NfailFieldsPSF == 0) "$NfailFieldsPSF fields failed comparison" 599 588 tap.ok ($NfailFieldsPSF == 0) "$NfailFieldsPSF fields failed comparison"; # TAP: each chip 600 589 end 601 590 … … 715 704 fprintf "%24s : $PASS : SKIP" $field 716 705 output stdout 706 tap.skip 1 717 707 return 718 708 end … … 728 718 if ($hist:minVal < $minGood) set PASS = 0 729 719 if ($hist:maxVal > $maxGood) set PASS = 0 720 if (isinf($hist:maxVal)) set PASS = 0 721 if (isinf($hist:minVal)) set PASS = 0 730 722 731 723 # save the summary line to be written to a file by the calling function … … 734 726 output stdout 735 727 736 ok ($PASS) "PSF table field $field comparison"728 tap.ok ($PASS) "PSF table field $field comparison"; # TAP: each field 737 729 end 738 730 … … 796 788 $NfailKeys ++ 797 789 end 798 ok ($NfailKeys == 0) "$NfailKeys keys failed comparison"790 tap.ok ($NfailKeys == 0) "$NfailKeys keys failed comparison" ; # TAP: called 2x per chip 799 791 end 800 792
Note:
See TracChangeset
for help on using the changeset viewer.
