API for MakeModel¶
-
class
MakeModel.
Modeler
(debug=False, TelluricModelingDirRoot='/home/user/.TelFit/', nmolecules=12)¶ -
EditProfile
(profilename, profile_height, profile_value)¶ - This function will take a np array as a profile, and stitch it into the
- MIPAS atmosphere profile read in in __init__
Parameters: - profilename – A string with the name of the profile to edit. Should be either ‘pressure’, ‘temperature’, or one of the molecules given in the MakeModel.MoleculeNumbers dictionary
- profile_height – A np array with the height in the atmosphere (in km)
- profile_value – A np array with the value of the profile parameter at each height given in profile_height.
Returns: None
-
MakeModel
(pressure=795.0, temperature=283.0, lowfreq=4000, highfreq=4600, angle=45.0, humidity=50.0, co2=368.5, o3=0.039, n2o=0.32, co=0.14, ch4=1.8, o2=210000.0, no=1.1e-19, so2=0.0001, no2=0.0001, nh3=0.0001, hno3=0.00056, lat=30.6, alt=2.1, wavegrid=None, resolution=None, save=False, libfile=None, vac2air=True)¶ - Here is the important function! All of the variables have default values,
- which you will want to override for any realistic use.
Parameters: - pressure – Pressure at telescope altitude (hPa)
- temperature – Temperature at telescope altitude (Kelvin)
- lowfreq – The starting wavenumber (cm^-1)
- highfreq – The ending wavenumber (cm^-1)
- angle – The zenith distance of the telescope (degrees). This is related to the airmass (z) through z = sec(angle)
- humidity – Percent relative humidity at the telescope altitude.
- co2 – Mixing ratio of this molecule (parts per million by volumne)
- o3 – Mixing ratio of this molecule (parts per million by volumne)
- n2o – Mixing ratio of this molecule (parts per million by volumne)
- co – Mixing ratio of this molecule (parts per million by volumne)
- ch4 – Mixing ratio of this molecule (parts per million by volumne)
- o2 – Mixing ratio of this molecule (parts per million by volumne)
- no – Mixing ratio of this molecule (parts per million by volumne)
- so2 – Mixing ratio of this molecule (parts per million by volumne)
- no2 – Mixing ratio of this molecule (parts per million by volumne)
- nh3 – Mixing ratio of this molecule (parts per million by volumne)
- hno3 – Mixing ratio of this molecule (parts per million by volumne)
- lat – The latitude of the observatory (degrees)
- alt – The altitude of the observatory above sea level (km)
- wavegrid – If given, the model will be resampled to this grid. Should be a 1D np array
- resolution – If given, it will reduce the resolution by convolving with a gaussian of appropriate width. Should be a float with R=lam/dlam
- save – If true, the generated model is saved. The filename will be printed to the screen.
- libfile – Useful if generating a telluric library. The filename of the saved file will be written to this filename. Should be a string variable. Ignored if save==False
- vac2air – If True (default), it converts the wavelengths from vacuum to air
Returns: DataStructures.xypoint instance with the telluric model. The x-axis is in nanometers and the y-axis is in fractional transmission.
-
__init__
(debug=False, TelluricModelingDirRoot='/home/user/.TelFit/', nmolecules=12)¶ Initialize a modeler instance
Parameters: - debug – If True, it will print some extra information to the screen when making telluric models.
- TelluricModelingDirRoot – Root directory to do the actual telluric modeling. The default installation puts this in ~/.TelFit/
- nmolecules – The number of molecules to include in the telluric model. Probably don’t change this, and definitely don’t increase it!
Returns: None
-