getWeather

Return to directory of Todd's CASA extensions

Queries the WEATHER and ANTENNA tables of an .ms by scan number or list of scan numbers and returns a summary of values. See also getWeatherFromASDM and getWeatherFromAIV.

Usage:

au.getWeather(vis, scan='', antenna='0', verbose=False, vm=0, mymsmd='', debug=False, obsid=0)
Inputs:
  • vis: measurement set
  • scan: scan (integer or comma-delimited string) or list of scans
  • antenna: single ID (integer or string) or single name
  • vm: a ValueMapping object (only relevant for CASA < 4.1)
  • mymsmd: an msmd object
  • obsid: optional (see below)
Returns:
  • a dictionary of mean values of: angleToSun, pressure, temperature, humidity, dew point, wind speed, wind direction, azimuth, elevation, solarangle, solarelev, solarazim.
  • an array of science data timestamps in MJD seconds (not weather data times!)
  • zero, or the ValueMapping object
Note:
  • If the sun is below the horizon, the solarangle value returned is negated.
  • If run in casa 4.4 or 4.5, and a concatenated measurement set is used, then the obsid must be specified for the desired scan, due to a change in msmd. This behavior is fixed in casa 4.6.
  • If run in casa < 4.1.0, this function needs to run ValueMapping, unless a ValueMapping object is passed via the vm argument. Otherwise it will run msmd.open, unless an msmd tool is passed via the mymsmd argument.

Example:

CASA <6>: au.getWeather('uid___A002_X99c183_X25b6.ms')
  Out[6]:
[{'azimuth': 136.04996474815229,
  'dewpoint': -19.292022758856238,
  'elevation': 51.440154765691119,
  'humidity': 27.255731458663941,
  'pressure': 556.39904632568357,
  'readings': 200,
  'scan': array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17], dtype=int32),
  'solarangle': -82.92546132092811,
  'solarazim': 135.79239921184373,
  'solarelev': -31.484996459343055,
  'temperature': -2.9368869018554462,
  'winddirection': 118.1515287755427,
  'windspeed': 4.4835000061988834},
 array([  4.92819471e+09,   4.92819472e+09,   4.92819472e+09, ...,
         4.92819721e+09,   4.92819721e+09,   4.92819721e+09]),
 0]

-- ToddHunter - 2016-01-30

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > GetWeather
Topic revision: 2016-01-30, 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