smiet.jax.io.coreas_shower module¶
-
class smiet.jax.io.coreas_shower.CoreasShower(file_path: str, gdas_file: str =
'')¶ Bases:
ShowerClass to read in showers from CoREAS simulations stored in HDF5 files.
- Parameters:¶
- property delta_t : float¶
Time resolution of the trace.
- fit_gaisser_hillas()¶
Fit a Gaisser-Hillas function to the currently loaded longitudinal profile, to determine the parameters like \(X_{max}\) and \(N_{max}\).
- Returns:¶
popt – The parameters of the Gaisser-Hillas function, in the order [N, X0, Xmax, p0, p1, p2] (p0,p1,p2 are the polynomial coefficients in denominator for lambda)
- Return type:¶
np.ndarray
Notes
The Gaisser-Hillas function is defined as:
\[f(X) = N \left( \frac{X - X_0}{X_{max} - X_0} \right)^{\frac{X_{max} - X_0}{\lambda}} \exp\left( \frac{X_{max} - X}{\lambda} \right)\]
- get_antenna_position() ndarray¶
Get the antenna positions on the ground.
-
get_antenna_position_showerplane(ant_names=
None) ndarray¶ Get the antenna positions in shower plane.
- ant_nameslist, optional
Dummy argument to match argument shape as in numpy version.
-
get_traces_geoce(bandpass: list =
[0.03, 0.5]) ndarray¶ Get the traces from traces at the ground to GEO/CE components.
- Parameters:¶
- bandpass : list, default = [30 * units.MHz, 500 * units.MHz]¶
The frequency bandpass in MHz to apply to the traces. Defaults to 30-500 MHz, which is the bandwidth in which SMIET is applicable in.
- Returns:¶
traces_geo_ce – The traces in the shower plane, transformed to GEO and CE components. Shape is (2, Nant, Nsamples), where Nant is the number of antennas and Nsamples is the number of samples.
When called with SlicedShower, the shape is (2, Nant, Nsamples, Nslices).
- Return type:¶
np.ndarray
- get_traces_onsky() ndarray¶
Get the traces from traces at the ground to on-sky components.
NOTE: the radial component (er) is set to zero manually here.
- Returns:¶
traces_onsky – The traces in the shower plane, transformed to on-sky components (er, etheta, ephi). Shape is (3, Nant, Nsamples), where Nant is the number of antennas and Nsamples is the number of samples.
When called with SlicedShower, the shape is (3, Nant, Nsamples, Nslices).
- Return type:¶
np.ndarray
- get_traces_raw() ndarray¶
Get all traces for all antennas on the ground plane.
-
get_traces_vB_vvB(bandpass: list =
[0.03, 0.5]) ndarray¶ Get the traces from traces at the ground to vB/vvB components.
- Parameters:¶
- bandpass : list, default = [30 * units.MHz, 500 * units.MHz]¶
The frequency bandpass in MHz to apply to the traces. Defaults to 30-500 MHz, which is the bandwidth in which SMIET is applicable in.
- Returns:¶
traces_vB_vvB – The traces in the shower plane, transformed to vxB and vxvxB components. Shape is (3, Nant, Nsamples), where Nant is the number of antennas and Nsamples is the number of samples.
When called with SlicedShower, the shape is (3, Nant, Nsamples, Nslices).
- Return type:¶
np.ndarray
-
remove_antennas(ant_idx_min: int =
0, ant_idx_max: int =90) None¶ Remove antennas from the data traces.
Parameter:¶
- ant_idx_minfloat
remove all antennas below this antenna index
- ant_idx_maxfloat
remove all antennas above this antenna index