Profile

class showermodel.profile.Profile(E=10000000.0, theta=0.0, alt=None, prf_model='Greisen', X_max=None, X0_GH=None, lambda_GH=None, zi=None, atmosphere=None, h0=0.0, h_top=None, N_steps=550, atm_model=1, rho_w_sl=7.5e-06, h_scale=2.0)

Bases: DataFrame

DataFrame containing a shower profile discretization.

Use sm.Profile() to construct the default Profile object.

Parameters:
  • E (float, default 10000000) – Energy of the primary particle in MeV.

  • theta (float, default 0) – Zenith angle in degrees of the apparent position of the source.

  • alt (float, default None) – Altitude in degrees of the apparent position of the source. If None, theta is used. If given, theta is overwritten.

  • prf_model ('Greisen', 'Gaisser-Hillas' or DataFrame, default 'Greisen') – Profile model to be used. If ‘Greisen’, the Greisen function for electromagnetic showers is used. If ‘Gaisser-Hillas’, the Gaisser-Hillas function for hadron-induced showers is used. If a DataFrame is given, it should have two columns, the first one with the slant depth in g/cm2 and the second one with dE/dX in MeV.cm2/g.

  • X_max (float, default None) – Slant depth in g/cm^2 at shower maximum. If None and prf_model is ‘Greisen’ or ‘Gaisser-Hillas’, a typical value of X_max for gamma or proton showers is calculated from the radiation length lambda_r = 36.7 g/cm^2 and the critical energy E_c = 81 MeV.

  • X0_GH (float, default None) – X0 parameter in g/cm2 to be used when prf_model==’Gaisser- Hillas’. If None, a typical value for the input energy is used.

  • lambda_GH (float, default None) – Lambda parameter in g/cm2 to be used when prf_model==’Gaisser- Hillas’. If None, a typical value for the input energy is used.

  • zi (float, default None) – Height in km of the first interaction point of the shower. If None, the shower is assumed to begin at the top of the atmosphere (theta<90) or at ground level (theta>90).

  • atmosphere (Atmosphere, default None) – Atmosphere object to be used. If None, a new Atmosphere object is generated. If given, h0, h_top, N_steps, atm_model, rho_w_sl and h_scale are ignored.

  • h0 (float, default 0) – Ground level in km above sea level for the atmosphere discretization to be generated when atmosphere==None.

  • h_top (float or None, default None) – Upper limit in km above sea level for the atmosphere discretization to be generated when atmosphere==None. If h_top is None, the top level of the selected atmospheric model is taken.

  • N_steps (int, default 550) – Number of discretization steps for the atmosphere discretization to be generated when atmosphere==None.

  • atm_model (int or DataFrame, default 1) – Atmospheric model used when atmosphere==None. If an int value is given, atm_model is searched from either CORSIKA atmospheric models (from 1 to 29) or a file named atm_models.toml in the working directory containing user-defined models. If a DataFrame is given, it should have two columns, one labelled as h with height in km and other labelled as X_vert or P, depending on whether vertical depth in g/cm^2 or pressure in hPa is given.

  • rho_w_sl (float, default 7.5e-6) – Water-vapor density in g/cm^3 at sea level to calculate a simple exponential profile of water-vapor when atmosphere==None. Set to zero if dry air is assumed.

  • h_scale (float, default 2.0) – Scale height in km to be used in the water-vapor exponential profile when atmospere==None.

X

Column 0, slant depth in g/cm^2.

Type:

float

s

Column 1, shower age.

Type:

float

dX

Column 2, discretization step in g/cm^2 along the shower axis.

Type:

float

E_dep

Column 3, energy deposit in MeV at each discretization step.

Type:

float

N_ch

Column 4, number of charged particles.

Type:

float

atmosphere

Atmosphere object.

Type:

Atmosphere

E

Energy of the primary particle.

Type:

float

theta

Zenith angle in degrees of the apparent position of the source.

Type:

float

alt

Altitude in degrees of the apparent position of the source.

Type:

float

prf_model
Type:

{‘Greisen’, ‘Gaisser-Hillas’} or DataFrame.

X_max

Slant depth in g/cm^2 at shower maximum.

Type:

float

X0_GH

X0 parameter in g/cm2 for prf_model==’Gaisser-Hillas’.

Type:

float

lambda_GH

lambda parameter in g/cm2 for prf_model==’Gaisser-Hillas’.

Type:

float

dl

Size in km of the discretization step along the shower axis.

Type:

float

Fluorescence()

Calculate the fluorescence light production.

Cherenkov()

Calculate the Cherenkov light production.

show()

Show the shower profile as a function of slant depth.

See also

Profile

DataFrame containing a shower profile discretization.

Shower

Make a discretization of a shower.

Methods:
Profile.Fluorescence()

Calculate the fluorescence photon production from a shower profile discretization.

Returns:

fluorescence

Return type:

Fluorescence

Profile.Cherenkov()

Calculate the Cherenkov light production from a shower profile discretization.

Returns:

cherenkov

Return type:

Cherenkov

Profile.show()

Show the shower profile, both number of charged particles and energy deposit, as a function of slant depth.

Returns:

(ax1, ax2)

Return type:

AxesSubplot