Return to directory of Todd's CASA extensions

Gets the positions of the weather stations in an ASDM. See also getWeatherStationNamesFromASDM and getWeatherStationPositions to operate on a measurement set.


au.getWeatherStationPositionsFromASDM(asdm, prefix=['WSTB', 'METEO', 'OSF'], 
          returnDeltaHeights=False, returnClosestPads=False, 
          returnNearbyPads=False, radius=100)
  • prefix: restrict the weather stations to those whose names begin with one of these strings
  • returnDeltaHeights: if True, return a dictionary where the values are the height (in meters) referenced to the highest station in the ASDM
  • returnClosestPads: if True, return a dictionary where the values are the names of the closest occupied pad, its antenna, and the distance (in meters)
  • returnNearbyPads: if True, return a dictionary where the values are the list of nearby pads and antennas
  • radius: used to determine what is nearby for returnNearbyPads
  • a dictionary keyed by station name


CASA <2>: au.getWeatherStationPositionsFromASDM('uid___A002_Xa9f45b_X20aa')
{'METEO130': array([ 2223475.563, -5440619.   , -2481822.808]),
 'METEO201': array([ 2227439.932, -5439610.409, -2479448.395]),
 'METEO309': array([ 2228315.666, -5437662.052, -2483309.656]),
 'METEO410': array([ 2222809.827, -5441745.2  , -2479646.503]),
 'WSTB1': array([ 2225264., -5440257., -2481099.]),
 'WSTB2': array([ 2225264., -5440257., -2481099.])}
CASA <6>: au.getWeatherStationPositionsFromASDM('uid___A002_Xaba3d8_X7',returnDeltaHeights=True)
({'Meteo129': -38.525934373959899,
  'Meteo130': -34.621744849719107,
  'Meteo201': -439.77198670525104,
  'Meteo309': -298.23978886380792,
  'Meteo410': -145.153708871454,
  'MeteoCentral': -2.1569628715515137,
  'MeteoItinerant': -2131.9707716507837,
  'MeteoTB2': 0.0},

CASA <7>: au.getWeatherStationPositionsFromASDM('uid___A002_Xaba3d8_X7',returnClosestPads=True)
{'Meteo129': {'closestAntenna': 'DV19',
              'closestOccupiedPad': 'A116',
              'distance': 736.36368366284034},
 'Meteo130': {'closestAntenna': 'DV09',
              'closestOccupiedPad': 'A130',
              'distance': 65.219102342882437},
 'Meteo201': {'closestAntenna': 'DA65',
              'closestOccupiedPad': 'W201',
              'distance': 59.017091996022195},
 'Meteo309': {'closestAntenna': 'DA49',
              'closestOccupiedPad': 'S305',
              'distance': 2762.691733376701},
 'Meteo410': {'closestAntenna': 'DA63',
              'closestOccupiedPad': 'P411',
              'distance': 1590.1511208370628},
 'MeteoCentral': {'closestAntenna': 'DV25',
                  'closestOccupiedPad': 'A083',
                  'distance': 76.059366402039515},
 'MeteoItinerant': {'closestAntenna': 'DA65',
                    'closestOccupiedPad': 'W201',
                    'distance': 16588.25692847668},
 'MeteoTB2': {'closestAntenna': 'DV13',
              'closestOccupiedPad': 'A106',
              'distance': 10.994296865593874}}

CASA <8>: au.getWeatherStationPositionsFromASDM('uid___A002_Xaba3d8_X7',returnNearbyPads=True)
{'Meteo129': {'nearbyAntennas': [], 'nearbyPads': []},
 'Meteo130': {'nearbyAntennas': ['DV09'], 'nearbyPads': ['A130']},
 'Meteo201': {'nearbyAntennas': ['DA65'], 'nearbyPads': ['W201']},
 'Meteo309': {'nearbyAntennas': [], 'nearbyPads': []},
 'Meteo410': {'nearbyAntennas': [], 'nearbyPads': []},
 'MeteoCentral': {'nearbyAntennas': ['DV25'], 'nearbyPads': ['A083']},
 'MeteoItinerant': {'nearbyAntennas': [], 'nearbyPads': []},
 'MeteoTB2': {'nearbyAntennas': ['DV13'], 'nearbyPads': ['A106']}}

-- ToddHunter - 2015-09-15
Topic revision: r2 - 2015-10-17, 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