Usage for getBaselineLengths

Return to directory of Todd's CASA extensions

Determines the baseline lengths for the specified ms and returns a list of tuples with the first value being the baseline string and the second value being the baseline length in meters. If the length parameter is given, it instead returns the maximum number of antennas in a subarray configuration where all baselines are less than this value and the corresponding list of antenna names. See also getBaselineStats and getuvrange.

Usage

au.getBaselineLengths(msFile, sort=True, length=None, rigorous=False, 
                   subarraySize=0, percentile=None, field='', azimuth=None, 
                   elevation=None, uvrange='', config=None, debug=False, 
                   unflagged=False, flaggedFraction=1.0, flagStats=None,
                   antenna=[], histogram=False, nbins=None, linear=True, 
                   plotfile=None, frequency=None)
  • msFile: the measurement set to examine (if config = None)
  • length= find the subarray with the most antennas for which the longest baseline is less than this value (in meters)
  • percentile = compute and then use the length corresponding to this percentile of the baseline lengths for the configuration.
  • sort=True will return the list sorted by baseline length
  • sort=False will return the list sorted by antenna names
  • rigorous=Performs a full analysis of all possible combinations of N-1 antennas, then N-2, etc. until it find one that meets the length criterion. Fast for ACA, but slow for >=32 antennas!
  • subarraySize: in the option rigorous, this number of antennas tells it where to start its checks, which greatly speeds up the calculation. Start with a low number and work your way up.
  • field: if not blank, then find the first integration on the specified field ID, get its az&el and compute the projected baseline length
  • azimuth,elevation: if field=='', and these are both set (in degrees), then compute the projected baseline length toward this direction
  • uvrange: a string range in meters: '5~40'; or in klambda: '5~50klambda' or '5~50kl'. If present, then compute the number of baselines within the specified range, and the equivalent number of antennas.
  • config: the configuration file to use instead of a visibility dataset
  • unflagged: if True, then only include baselines between unflagged antennas
  • flaggedFraction: 0..1.0, used by the unflagged option
  • flagStats: a 'report0' dictionary, previously returned by the af tool; if not specified, then it will be computed; used by the unflagged option
  • antenna: restrict to a single antenna or list of antennas (names)
  • histogram: if True, then produce a histogram
  • nbins: number of bins in histogram, default = automatic
  • linear: if True, use linear bins along x-axis, default = log
  • plotfile: name of plotfile to produce, or True for automatic naming
  • frequency: used with uvrange parameter if klambda units are specified; if not present, then run medianFrequencyOfIntent on the msFile

Examples

0. Simple example of unprojected baselines (and not showing the list returned):
CASA <2>: a=au.getBaselineLengths('uid___A002_X62f759_X4eb.ms')
Found 28 baselines
Unprojected lengths:  min=9.200365, max=48.949567

1. Example of projected baselines toward a field (not showing the list returned)
CASA <3>: a=au.getBaselineLengths('uid___A002_X62f759_X4eb.ms',field='M100')
Using scan =  6
Azim = -31.140 deg   Elev = 45.770 deg
Found 28 baselines
Projected lengths toward the source:  min=9.149135, max=39.098148

2. Simple example (showing the list returned)
CASA <4>: au.getBaselineLengths('uid___A002_X62f759_X4eb.ms')
Found 28 baselines
Unprojected lengths:  min=9.200365, max=48.949567
  Out[4]:
[('CM02-CM05', 9.2003646423310474),
 ('CM02-CM08', 12.347311585088249),
 ('CM04-CM06', 13.279695671278885),
 ('CM05-CM08', 14.177086901465964),
 ('CM08-CM09', 15.265578288394366),
 ('CM06-CM12', 16.589074631188602),
 ('CM07-CM12', 17.708648037844881),
 ('CM02-CM12', 20.110772191535006),
 ('CM07-CM09', 21.632844046062946),
 ('CM02-CM09', 21.688414411837666),
 ('CM02-CM06', 24.193008044691371),
 ('CM04-CM05', 25.187511435896134),
 ('CM02-CM07', 25.371415895689395),
 ('CM05-CM06', 26.635201034785741),
 ('CM02-CM04', 27.457504928316069),
 ('CM05-CM12', 27.629645651457704),
 ('CM05-CM09', 27.911814559858755),
 ('CM04-CM12', 28.479447537942814),
 ('CM07-CM08', 29.601898123098394),
 ('CM08-CM12', 30.733015010583696),
 ('CM09-CM12', 31.565523104996302),
 ('CM06-CM07', 34.038017188454802),
 ('CM05-CM07', 34.568446934295039),
 ('CM06-CM08', 36.519826776937201),
 ('CM04-CM08', 38.407957729469388),
 ('CM06-CM09', 43.225776655415146),
 ('CM04-CM07', 44.725337838664778),
 ('CM04-CM09', 48.949567296880893)]

3. Example with the length parameter:
CASA : au.getBaselineLengths('makeimage.alma.out10.ms',length=100)
  Out[6]: (6, ['A00', 'A01', 'A05', 'A06', 'A10', 'A11'])

4. Example with the length and rigorous parameters:
CASA : au.getBaselineLengths('makeimage.aca_cycle1.ms',length=21.2,rigorous=True)
Testing 9 configurations with 8 antennas
   smallest maximum baseline length = 30.09m
Testing 36 configurations with 7 antennas
   smallest maximum baseline length = 29.95m
Testing 84 configurations with 6 antennas
   smallest maximum baseline length = 22.67m
Testing 126 configurations with 5 antennas
Found a subarray that met the criterion on the 10th try (7.9%)
  Out[10]: (5, ('A00', 'A01', 'A02', 'A05', 'A06'))

-- ToddHunter - 2011-11-21
Topic revision: r17 - 2015-02-05, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback