Usage of listconditions

Return to directory of Todd's CASA extensions

Compiles the mean weather, PWV and opacity values for the given scan number or scan list, or for a specified field. If a scan number is not provided, return average over the ms. The opacity is derived from the PWV using the atmospheric model in casa. See also plotPWV and plotweather. If you want to suppress the print messages, include the argument: verbose=False.

Usage:

au.listconditions(vis='', scan='', antenna='0', verbose=True, asdm='', byscan=False, vm=0, mymsmd='', field='')
  • scan: can be a single list: [1,2,3] or '1,2,3' or a single range: '1~4'. default='' means to average over all scans
  • byscan: if True, then it will return a dictionary with conditions per scan
  • field: if set, then use msmd.scansforfield to build the scan list to use
  • vm: a valueMapping structure can be passed in via this parameter, but this is obsoleted by the msmd tool in casa >= 4.1.0.
  • mymsmd: a local instance of an msmd tool for the specified vis can optionally be passed in with this parameter, but there is little gain to doing so.

Examples:

1. Example that averages the conditions over the whole track:

CASA <5>: au.listconditions('Band7multi_april22.ms')
Using antenna = DV04 to retrieve mean azimuth and elevation
Separation from sun = 143.884965 deg
Sun is below horizon (elev=-51.8 deg)
Average azimuth = -40.62, elevation = 65.82 degrees
Mean weather values for scan 4,5,8,9,11,13,15,16,18,20,22,24,25,27,29,31,33,34,36,38,39,40,43,44,46,48,50,51,53,55,57,59,60,62,64,66,68,69,71,73,74,75,78,79,81,83,85,86,88,90,92,94,95,97,99,101,103 (field Titan)
  Pressure = 555.42 mb
  Temperature = -5.16 C
  Dew point = -15.25 C
  Relative Humidity = 45.25 %
  Wind speed = 6.07 m/s
  Wind direction = -58.25 deg
Taking the median of 243 pwv measurements from all antennas = 1.186 mm
356.7 GHz zenith tau = 0.304 (dry=0.063, wet=0.241)
356.7 GHz tau toward source (at elevation=65.8) = 0.333
358.0 GHz zenith tau = 0.352 (dry=0.098, wet=0.254)
358.0 GHz tau toward source (at elevation=65.8) = 0.386
345.8 GHz zenith tau = 0.202 (dry=0.019, wet=0.183)
345.8 GHz tau toward source (at elevation=65.8) = 0.221
343.7 GHz zenith tau = 0.199 (dry=0.021, wet=0.178)
343.7 GHz tau toward source (at elevation=65.8) = 0.218
  Out[5]: 
{'azimuth': -40.617023418185134,
 'dewpoint': -15.250660956844706,
 'elevation': 65.818813519130373,
 'humidity': 45.250021404184416,
 'pressure': 555.42036601865493,
 'pwv': 1.1862064343944596,
 'solarangle': -143.88496471909014,
 'tau': 0.28980964511730983,
 'tauzenith': 0.26438020171869503,
 'temperature': -5.1609858911191413,
 'winddirection': -58.249246612969692,
 'windspeed': 6.0677804275458067}

2. Example using only a single scan:

CASA <8>: au.listconditions('Band7multi_april22.ms',scan=15)
Using antenna = DV04 to retrieve mean azimuth and elevation
Separation from sun = 130.540981 deg
Sun is below horizon (elev=-32.9 deg)
Average azimuth = 130.60, elevation = 79.43 degrees
Mean weather values for scan 15 (field ['J1037-295=QSO'])
  Pressure = 555.39 mb
  Temperature = -4.03 C
  Dew point = -14.01 C
  Relative Humidity = 45.82 %
  Wind speed = 4.80 m/s
  Wind direction = -74.41 deg
Taking the median of 9 pwv measurements from all antennas = 1.144 mm
356.7 GHz zenith tau = 0.293 (dry=0.062, wet=0.231)
356.7 GHz tau toward source (at elevation=79.4) = 0.298
358.0 GHz zenith tau = 0.340 (dry=0.097, wet=0.243)
358.0 GHz tau toward source (at elevation=79.4) = 0.346
345.8 GHz zenith tau = 0.194 (dry=0.019, wet=0.175)
345.8 GHz tau toward source (at elevation=79.4) = 0.197
343.7 GHz zenith tau = 0.191 (dry=0.021, wet=0.170)
343.7 GHz tau toward source (at elevation=79.4) = 0.195
  Out[8]: 
{'azimuth': 130.59726905356464,
 'dewpoint': -14.006197357177712,
 'elevation': 79.426776819001418,
 'humidity': 45.81649923324585,
 'pressure': 555.38724517822266,
 'pwv': 1.1444590266610239,
 'solarangle': -130.54098056252087,
 'tau': 0.25915498249311236,
 'tauzenith': 0.25475484454602387,
 'temperature': -4.0302566528320085,
 'winddirection': -74.412669349227087,
 'windspeed': 4.7999999821186066}

Example that returns a dictionary for each scan in the track:

CASA <3>: a = au.listconditions('Antcont_Northall.ms',byscan=T,scan='',verbose=F)
Scans =  [ 9 13 17 21 25 26 30 34 38 42 43 47 51 52 56 60 64 68]
{9: {'azimuth': -84.099053220100217,
     'dewpoint': 0.0,
     'elevation': 67.843030864615272,
     'humidity': 18.712093651294708,
     'pressure': 557.5275936126709,
     'scan': 9,
     'solarangle': -120.35607709894731,
     'solarazim': 275.55309616291754,
     'solarelev': -52.512765368084104,
     'temperature': -3.6937831878661882,
     'winddirection': 289.49760928342732,
     'windspeed': 4.4812500178813934},
 13: {'azimuth': -86.029196569699266,
      'dewpoint': nan,
      'elevation': 64.732151578896662,
      'humidity': nan,
      'pressure': nan,
      'scan': 13,
      'solarangle': -120.20943829831093,
      'solarazim': 274.65661135806027,
      'solarelev': -55.476137768983342,
      'temperature': nan,
      'winddirection': nan,
      'windspeed': nan},
 17: {'azimuth': -87.684140661268358,
      'dewpoint': nan,
      'elevation': 61.618298568772822,
      'humidity': nan,
      'pressure': nan,
      'scan': 17,
      'solarangle': -121.14110089185365,
      'solarazim': 273.3832014950782,
      'solarelev': -59.5200018378926,
      'temperature': nan,
      'winddirection': nan,
      'windspeed': nan},
 21: {'azimuth': -89.185838574190939,
      'dewpoint': 0.0,
      'elevation': 58.421516907576262,
      'humidity': 18.632593631744385,
      'pressure': 557.54171943664551,
      'scan': 21,
      'solarangle': -120.32061005968778,
      'solarazim': 272.59311617911561,
      'solarelev': -61.891200600048307,
      'temperature': -3.0417531967162859,
      'winddirection': 285.82387661274595,
      'windspeed': 5.7062499970197678},
 25: {'azimuth': -90.516749283098818,
      'dewpoint': nan,
      'elevation': 55.298748917173306,
      'humidity': nan,
      'pressure': nan,
      'scan': 25,
      'solarangle': -119.90469257488495,
      'solarazim': 271.64936117428664,
      'solarelev': -64.594408994965193,
      'temperature': nan,
      'winddirection': nan,
      'windspeed': nan},
 26: {'azimuth': 89.36099650773572,
      'dewpoint': 0.0,
      'elevation': 58.02572266966002,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 26,
      'solarangle': 114.22644092627873,
      'solarazim': 296.39393717226096,
      'solarelev': 4.0663030843841197,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 30: {'azimuth': 87.879498418545111,
      'dewpoint': 0.0,
      'elevation': 61.222400056289295,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 30,
      'solarangle': 114.08286408529098,
      'solarazim': 295.0320298168208,
      'solarelev': 1.3196579429949482,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 34: {'azimuth': 86.233507662772666,
      'dewpoint': 0.0,
      'elevation': 64.370593599536235,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 34,
      'solarangle': -115.00551633257814,
      'solarazim': 293.31174882003597,
      'solarelev': -2.4098932404045827,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 38: {'azimuth': 84.269239155181594,
      'dewpoint': 0.0,
      'elevation': 67.590041414643551,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 38,
      'solarangle': -114.19697659072361,
      'solarazim': 292.35041070044764,
      'solarelev': -4.629652733799384,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 42: {'azimuth': 81.948467648699875,
      'dewpoint': 0.0,
      'elevation': 70.71478284292651,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 42,
      'solarangle': -113.78678695201059,
      'solarazim': 291.29283523804679,
      'solarelev': -7.1624772651650188,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 43: {'azimuth': -72.081472217072516,
      'dewpoint': 0.0,
      'elevation': 78.480307342661902,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 43,
      'solarangle': -114.0848967987876,
      'solarazim': 281.80391794440743,
      'solarelev': -35.546586027758991,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 47: {'azimuth': -77.036326675805626,
      'dewpoint': 0.0,
      'elevation': 75.441249250530234,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 47,
      'solarangle': -113.93963948361258,
      'solarazim': 280.97478805991159,
      'solarelev': -38.490960145105063,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 51: {'azimuth': -80.494676844873453,
      'dewpoint': 0.0,
      'elevation': 72.349116616012878,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 51,
      'solarangle': -114.85998765988647,
      'solarazim': 279.87101624935519,
      'solarelev': -42.510583555836646,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 52: {'azimuth': -95.827814429989886,
      'dewpoint': 0.0,
      'elevation': 40.682764616972648,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 52,
      'solarangle': -106.69571363615307,
      'solarazim': 275.49860481083698,
      'solarelev': -65.649024971415855,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 56: {'azimuth': -96.892012548441983,
      'dewpoint': 0.0,
      'elevation': 37.499035516174125,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 56,
      'solarangle': -106.47312420952557,
      'solarazim': 274.87232783230434,
      'solarelev': -68.611298639263012,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 60: {'azimuth': -97.936011125114874,
      'dewpoint': 0.0,
      'elevation': 34.349485275107561,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 60,
      'solarangle': -107.45812724264597,
      'solarazim': 274.0212356956165,
      'solarelev': -72.790584157021513,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 64: {'azimuth': -99.006371521489044,
      'dewpoint': 0.0,
      'elevation': 31.116932659563258,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 64,
      'solarangle': -106.65817728991948,
      'solarazim': 273.54958516784643,
      'solarelev': -75.229308560695216,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459},
 68: {'azimuth': -100.0544531917793,
      'dewpoint': 0.0,
      'elevation': 27.969077952327719,
      'humidity': 18.63463020324707,
      'pressure': 557.52769215901696,
      'scan': 68,
      'solarangle': -106.2522481485256,
      'solarazim': 273.0405315810824,
      'solarelev': -77.998356090265744,
      'temperature': -3.3128332932790143,
      'winddirection': 286.76962578868199,
      'windspeed': 5.2325520937641459}}

-- Main.ToddHunter - 2011-10-07
Topic revision: r8 - 2014-10-13, 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