@@ -404,15 +404,33 @@ def ptatest(self, tests=None):
404
404
testdir = os .path .abspath (pjoin (self .testdir , testname ))
405
405
os .makedirs (pjoin (testdir , f"output_pta" ), exist_ok = True )
406
406
log = pjoin (testdir , f"output_pta" , "stdouterr.log" )
407
- cmd = [f"""time python -m pybind_nisar.workflows.point_target_info \
408
- input_ { dataname } / { workflowdata [ dataname ][ 0 ] } 512 256 256 \
409
- --fs-bw-ratio 2 --mlobe-nulls 2 --search-null > output_pta/pta.json""" ]
407
+ cmd = [f"""time point_target_analysis.py -i input_ { dataname } /rslc_ree17.h5 \
408
+ -f 'A' -p 'HH' -c 3.177 -54.58 0 --fs-bw-ratio 2 --mlobe-nulls 2 \
409
+ --search-null --num-lobes 10 --num- search-pix 6 -o output_pta/pta.json""" ]
410
410
try :
411
411
self .distribrun (testdir , cmd , logfile = log , dataname = dataname , nisarimg = True ,
412
412
loghdlrname = f'wftest.{ os .path .basename (testdir )} ' )
413
413
except subprocess .CalledProcessError as e :
414
414
raise RuntimeError (f"CalTool point target analyzer tool test { testname } failed" ) from e
415
415
416
+ def beamformtest (self , tests = None ):
417
+ if tests is None :
418
+ tests = workflowtests ['beamform' ].items ()
419
+ for testname , dataname in tests :
420
+ print (f"\n Running CalTool beamformer test { testname } \n " )
421
+ testdir = os .path .abspath (pjoin (self .testdir , testname ))
422
+ os .makedirs (pjoin (testdir , f"output_beamform" ), exist_ok = True )
423
+ log = pjoin (testdir , f"output_beamform" , "stdouterr.log" )
424
+ for btype , copt in [("tx" , "" ), ("rx" , f"-c input_{ dataname [0 ]} /{ dataname [3 ]} " )]:
425
+ cmd = [f"""time beamform_{ btype } .py -i input_{ dataname [0 ]} /{ dataname [1 ]} \
426
+ -a input_{ dataname [0 ]} /{ dataname [2 ]} { copt } \
427
+ -o output_beamform/beamform_{ btype } _output.txt""" ]
428
+ try :
429
+ self .distribrun (testdir , cmd , logfile = log , dataname = dataname [0 ], nisarimg = True ,
430
+ loghdlrname = f"wftest.{ os .path .basename (testdir )} " )
431
+ except subprocess .CalledProcessError as e :
432
+ raise RuntimeError (f"CalTool beamformer tool test { testname } failed" ) from e
433
+
416
434
def mintests (self ):
417
435
"""
418
436
Only run first test from each workflow
@@ -423,6 +441,7 @@ def mintests(self):
423
441
self .insartest (tests = list (workflowtests ['insar' ].items ())[:1 ])
424
442
self .noisesttest (tests = list (workflowtests ['noisest' ].items ())[:1 ])
425
443
self .ptatest (tests = list (workflowtests ['pta' ].items ())[:1 ])
444
+ self .beamformtest (tests = list (workflowtests ['beamform' ].items ())[:1 ])
426
445
427
446
def workflowqa (self , wfname , testname ):
428
447
"""
0 commit comments