TableAtmosphereDensityProfile

class ctapipe.atmosphere.TableAtmosphereDensityProfile(table: astropy.table.table.Table)[source]

Bases: ctapipe.atmosphere.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))

See also

ctapipe.io.eventsource.EventSource.atmosphere_density_profile

load a TableAtmosphereDensityProfile from a supported EventSource

Attributes
table: Table

Points that define the model

Methods Summary

__call__(height)

Returns

integral(height)

Integral of the profile along the height axis, i.e. the atmospheric depth \(X\).

Methods Documentation

__call__(height)astropy.units.quantity.Quantity[source]
Returns
u.Quantity[“g cm-3”]

the density at height h

integral(height)astropy.units.quantity.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