TableAtmosphereDensityProfile#
- class ctapipe.atmosphere.TableAtmosphereDensityProfile(table: Table)[source]#
Bases:
AtmosphereDensityProfile
Tabular profile from a table that has both the density and it’s integral pre-computed. The table is interpolated to return the density and its integral.
from astropy.table import Table from astropy import units as u from ctapipe.atmosphere import TableAtmosphereDensityProfile table = Table( dict( height=[1,10,20] * u.km, density=[0.00099,0.00042, 0.00009] * u.g / u.cm**3 column_density=[1044.0, 284.0, 57.0] * u.g / u.cm**2 ) ) profile = TableAtmosphereDensityProfile(table=table) print(profile(10 * u.km))
- Attributes:
- table: Table
Points that define the model
See also
ctapipe.io.eventsource.EventSource.atmosphere_density_profile
load a TableAtmosphereDensityProfile from a supported EventSource
Methods Summary
__call__
(height)from_table
(table)return a subclass of AtmosphereDensityProfile from a serialized table
height_from_overburden
(overburden)Get the height a.s.l. from the mass overburden in the atmosphere.
height_from_slant_depth
(slant_depth[, ...])Calculates height a.s.l. in the atmosphere from traversed slant depth
integral
(height)Integral of the profile along the height axis, i.e. the atmospheric depth \(X\).
peek
()Draw quick plot of profile
slant_depth_from_height
(height[, ...])Line-of-sight integral from height to infinity, along the direction specified by the zenith angle.
Methods Documentation
- classmethod from_table(table: Table)#
return a subclass of AtmosphereDensityProfile from a serialized table
- height_from_overburden(overburden) Quantity [source]#
- Get the height a.s.l. from the mass overburden in the atmosphere.
Inverse of the integral function
- Returns:
- u.Quantity[“m”]:
Height a.s.l. for given overburden
- height_from_slant_depth(slant_depth: ~astropy.units.quantity.Quantity, zenith_angle=<Quantity 0. deg>, output_units=Unit("m"))#
- Calculates height a.s.l. in the atmosphere from traversed slant depth
taking into account the shower zenith angle.
- Parameters:
- slant_depth: u.Quantity[“grammage”]
line-of-site distance from observer to point
- zenith_angle: u.Quantity[“angle”]
zenith angle of observation
- output_units: u.Unit
unit to output (must be convertible to m)
- integral(height) Quantity [source]#
Integral of the profile along the height axis, i.e. the atmospheric depth \(X\).
\[X(h) = \int_{h}^{\infty} \rho(h') dh'\]- Returns:
- u.Quantity[“g/cm2”]:
Integral of the density from height h to infinity
- peek()#
Draw quick plot of profile
- slant_depth_from_height(height: ~astropy.units.quantity.Quantity, zenith_angle=<Quantity 0. deg>, output_units=Unit("g / cm2"))#
Line-of-sight integral from height to infinity, along the direction specified by the zenith angle. This is sometimes called the slant depth. The atmosphere here is assumed to be Cartesian, the curvature of the Earth is not taken into account. This approximation breaks down for large zenith angles (>70 deg), in which case this function does not give correct results. Inverse of height_from_slant_depth function.
\[X(h, \Psi) = \int_{h}^{\infty} \rho(h') dh' / \cos{\Psi}\]- Parameters:
- height: u.Quantity[“length”]
height a.s.l. at which to start integral
- zenith_angle: u.Quantity[“angle”]
zenith angle of observation
- output_units: u.Unit
unit to output (must be convertible to g/cm2)