smiet.corsika.coreas_to_hdf5_origin module¶
This script was originally written by Tim Huege and Felix Schlüter, and is adapted to store HDF5 files from origin showers, which additionally applies a bandpass filter and resamples the traces to 2 GHz sampling.
Additionally, it is possible to only store antennas at the v x v x B axis, which is useful if we only need to work on vxvxB arm instead.
-
smiet.corsika.coreas_to_hdf5_origin.bandpass_filter_trace(trace, trace_sampling, f_min, f_max, sample_axis=
0)¶ Bandpass filter a trace between f_min and f_max. The trace array can be multidimensional, in which case the sample_axis parameter indicates which dimension should be taken as the time samples (ie this parameter is passed on to the np.fft.rfft call).
NB: taken from smiet.numpy.utilities
- Parameters:¶
- trace : np.ndarray¶
The array containing the time traces to be filtered
- trace_sampling : float¶
The sampling interval of the time traces, in internal units
- f_min : float¶
The lower frequency to filter by, in internal units
- f_max : float¶
The upper frequency to filter by, in internal units
- sample_axis : int, default=0¶
The axis of trace which contains the time samples
- Returns:¶
filtered_trace – The filtered traces, in the same shape as trace
- Return type:¶
np.ndarray
Notes
To avoid issues when the maximum of the trace is too close to the edge, all traces are first shifted to have their maxima more or less in the middle. After the filter has been applied, the traces are rolled back so that they are on same time axis as the input traces.
- smiet.corsika.coreas_to_hdf5_origin.get_antenna_position_showerplane(cstrafo, antenna_position: ndarray, core: ndarray) ndarray¶
Get the antenna position in the shower plane
- smiet.corsika.coreas_to_hdf5_origin.get_transformer(f_h5_inputs)¶
Get the coordinate transformation object.
The coordinate transformation object is obtained through radiotools, where the inputs from corsika are first converted into the Auger / NRR coordinate system.
-
smiet.corsika.coreas_to_hdf5_origin.read_antenna_data(hdf5_file, list_file, antenna_folder, cstrafo, core_pos, store_only_vxvxB: bool =
False, trace_params: dict ={'dt_resample': 1e-09, 'f_max': 500000000.0, 'f_min': 30000000.0, 'upsampling_factor': 5})¶
- smiet.corsika.coreas_to_hdf5_origin.read_atm_file(hdf5_file, atm_file_path)¶
-
smiet.corsika.coreas_to_hdf5_origin.write_coreas_hdf5_file(reas_filename, output_filename, f_h5=
None, atm_file=None, ignore_atm_file=False, only_vxvxB=False)¶