Atmosphere Module#

Tools to handle atmospheric models and related calculations.

atmosphere#

Profiles of atmospheric parameters as a function of altitude.

class simtools.atmosphere.atmosphere.AtmosphereProfile(filename)[source]#

Profiles of atmospheric parameters as a function of altitude.

Parameters:
filename: str or Path

Path to the atmosphere profile file (CORSIKA table format)

interpolate(altitude, column='thick')[source]#

Interpolate the atmosphere profile at a given altitude.

Parameters:
altitude: astropy.units.Quantity

Altitude

column: str

Column name to interpolate.

Returns:
float

Interpolated value.

read_atmosphere_profile(filename)[source]#

Read atmosphere profile from file.

Parameters:
filename: str or Path

Path to the atmosphere profile file (CORSIKA table format)

atmosphere_characterization#

Characterize and compare atmospheric profile and transmission tables.

simtools.atmosphere.atmosphere_characterization.characterize_atmospheres(atmospheres, output_path, relative_difference_limit=35.0)[source]#

Characterize atmospheric inputs and compare them to the first input.

Parameters:
atmosphereslist of dict

Each input contains a unique label, an Astropy profile table, and a transmission table. Profile altitude is in km, density in mass per volume, thickness in mass per area, and refractive index is dimensionless n-1. Transmission tables contain wavelength, emission altitude and dimensionless optical depth. Optional site, profile_version and transmission_version entries are retained.

output_pathstr or pathlib.Path

Existing output directory for figures and the JSON summary.

relative_difference_limitfloat, optional

Positive percentage limit for relative-difference axes. The default is 35 percent.

Returns:
dict

JSON-serializable characterization with 10 km a.s.l. samples and transmission differences at common tabulated wavelengths.

Raises:
ValueError

If inputs are empty, labels are duplicated, or data are invalid.

transmission#

Atmospheric transmission along a slant path.

class simtools.atmosphere.transmission.AtmosphericTransmission(table)[source]#

Transmission of light between two altitudes along a slant path.

Uses an atmospheric transmission table of the simulation models: per wavelength, the vertical optical depth (extinction) from each altitude down to the observatory level (observatory_level in the table metadata, depth zero). Depths are interpolated linearly in log(altitude) over the altitudes tabulated for a wavelength and clamped beyond them; a wavelength uses the tabulated wavelength at or below it.

Parameters:
table: astropy.table.Table

Atmospheric transmission table (wavelength, altitude, extinction).

optical_depth(wavelength_nm, altitude_m)[source]#

Vertical optical depth between the observation level and an altitude a.s.l. [m].

transmission(wavelength_nm, emission_altitude_m, telescope_altitude_m, airmass)[source]#

Transmission from the emission point to the telescope along a slant path.

The vertical optical depth between the two altitudes times the airmass, without instrument terms. Emission below the observation level is not transmitted.