Opened 14 years ago

Closed 14 years ago

#178 closed enhancement (fixed)

Implementation of opacity model

Reported by: Max Voronkov Owned by: Max Voronkov
Priority: normal Milestone: ASAP 3.0
Component: General Version: 2.0
Severity: normal Keywords:
Cc:

Description

Convert miriad's opacity model to be able to use within ASAP. Main stages of work:

  • Write a C++ class/classes doing the math
  • made it available via a separate method in python (prefer the same format of the output as returned by skydip processing method)
  • available in the opacity method to make the corrections automatically

As the required weather data may be missing, the code should be able to use either user specified parameters or the standard atmosphere.

Change History (4)

comment:1 Changed 14 years ago by Malte Marquarding

Milestone: ASAP 2.4ASAP 3.0
Type: taskenhancement

comment:2 Changed 14 years ago by Max Voronkov

I have written a C++ class (called STAtmosphere) implementing atmospheric opacity model and exposed it to python. At this stage it calculates just opacity, but can be extended to calculate blank sky temperature (i.e. sky component of Tsys) and extra path due to refraction to match the capability of the MIRIAD model. There are methods to calculate both zenith opacity and the opacity at some elevation. The latter is more accurate than 1/sin(El) model, because it takes the anomalous refraction into account. There are also methods to get opacities for a bulk of frequencies. The code is now in a reasonably debugged state and the numbers produced look very similar to what MIRIAD's opplt task gives.

import asap,math
atm = asap._asap.atmosphere()
freq=[40e9,41e9,42e9,43e9,44e9,45e9]
atm.set_weather(313,101300,1.0)
atm.set_observatory_elevation(900.)
atm.zenith_opacities(freq)
atm.opacities(freq,math.pi/4)

Malte, could you take care of the end-user python side of things? I used SI units throughout the C++ class, but the end-user may prefer hectopascals for pressure, percents for humidity, etc.

comment:3 Changed 14 years ago by Max Voronkov

Just a few words on interpretation of the atmospheric pressure. It can be defined as both pressure at the mean sea level and pressure at the observatory level. The latter is used directly in the model which does not depend on the observatory elevation (but it is assumed quite implicitly that the scale heights and lapse rate are the same regardless of the observatory elevation).

The class allows to set observatory elevation which is only used if the pressure is given at the mean sea level. Otherwise set it to zero, regardless the actual elevation. It looks like the files from our telescopes contain observatory ground level pressure, so to get right opacities one has to set elevation of 0 explicitly (default is 200m). However, the standard atmosphere is defined in terms of the mean sea level pressure. So, if the weather data are not available and the standard atmosphere is used, one must set the actual elevation of the observatory to get the correct result.

comment:4 Changed 14 years ago by Malte Marquarding

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.