This is a modest change to mwa_pb. At present, the zenith angle and azimuth arrays must have two dimensions (i.e. assuming that you want to make a primary beam image). Often you just want the primary beam for a list of locations. The following generalise the code so that an arbitrary number of dimensions can be used. I've located one function that will fail with this change (plotVisResponse) and made sure that it fails with a proper error.
I've tested this code for some basic use cases without any issues.
Before merging, can someone please double-check my first change to primary_beam.py (the swapaxes on) I think it's equivalent to the two cases it replaces, but it would be good for someone to double-check.
This is a modest change to mwa_pb. At present, the zenith angle and azimuth arrays must have two dimensions (i.e. assuming that you want to make a primary beam image). Often you just want the primary beam for a list of locations. The following generalise the code so that an arbitrary number of dimensions can be used. I've located one function that will fail with this change (plotVisResponse) and made sure that it fails with a proper error.
I've tested this code for some basic use cases without any issues.
Before merging, can someone please double-check my first change to primary_beam.py (the swapaxes on) I think it's equivalent to the two cases it replaces, but it would be good for someone to double-check.