Skip to content
Snippets Groups Projects
Commit 722dd633 authored by Jan David Mol's avatar Jan David Mol
Browse files

bug 1362: added tests for station (tied-array) beam forming

parent c70810d6
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ from LOFAR.LogValidators import NoErrors ...@@ -7,6 +7,7 @@ from LOFAR.LogValidators import NoErrors
from LOFAR.Locations import Locations from LOFAR.Locations import Locations
from LOFAR.Partitions import PartitionPsets from LOFAR.Partitions import PartitionPsets
from LOFAR import Logger from LOFAR import Logger
from random import sample
parsetFile = "RTCP-validate.parset" parsetFile = "RTCP-validate.parset"
...@@ -92,6 +93,11 @@ if __name__ == "__main__": ...@@ -92,6 +93,11 @@ if __name__ == "__main__":
action = "store_true", action = "store_true",
default = False, default = False,
help = "run tests for varying number of beams and stations" ) help = "run tests for varying number of beams and stations" )
testgroup.add_option( "--tabrun",
dest = "tabrun",
action = "store_true",
default = False,
help = "run tests for merging stations" )
parser.add_option_group( testgroup ) parser.add_option_group( testgroup )
# parse arguments # parse arguments
...@@ -192,3 +198,19 @@ if __name__ == "__main__": ...@@ -192,3 +198,19 @@ if __name__ == "__main__":
if not testParset( p, [NoErrors()] ): if not testParset( p, [NoErrors()] ):
sys.exit(1) sys.exit(1)
if run_all or options.tabrun:
# max nr stations
nrStations = len(PartitionPsets[options.partition])
for nrTabStations in xrange(2,nrStations+1):
p = initParset( "%d merged stations" % (nrTabStations,) )
p.setNrStations( nrStations )
allStationNames = p.parset.stations
# combine random stations
tabList = sample( allStationNames,nrTabStations )
p.parset["Observation.Beamformer[0].stationList"] = ",".join(tabList)
if not testParset( p, [NoErrors()] ):
sys.exit(1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment