NuRadioReco.framework package¶
Submodules¶
NuRadioReco.framework.base_shower module¶
NuRadioReco.framework.base_station module¶
-
class
NuRadioReco.framework.base_station.BaseStation(station_id)¶ Bases:
object-
add_electric_field(electric_field)¶
-
deserialize(data_pkl)¶
-
get_ARIANNA_parameter(key)¶
-
get_ARIANNA_parameters()¶
-
get_electric_fields()¶
-
get_electric_fields_for_channels(channel_ids=None, ray_path_type=None)¶
-
get_id()¶
-
get_parameter(key)¶
-
get_parameter_error(key)¶
-
get_parameters()¶
-
get_station_time()¶
-
get_trigger(name)¶
-
get_triggers()¶ returns a dictionary of the triggers. key is the trigger name, value is a trigger object
-
has_ARIANNA_parameter(key)¶
-
has_parameter(key)¶
-
has_trigger(trigger_name)¶ checks if station has a trigger with a certain name
- trigger_name: string
the name of the trigger
Returns bool
-
has_triggered(trigger_name=None)¶ convenience function.
- trigger_name: string or None (default None)
- if None: The function returns False if not trigger was set. If one or multiple triggers were set,
it returns True if any of those triggers triggered
if trigger name is set: return if the trigger with name ‘trigger_name’ has a trigger
-
is_cosmic_ray()¶
-
is_neutrino()¶
-
remove_parameter(key)¶
-
remove_triggers()¶
-
serialize(save_efield_traces)¶
-
set_ARIANNA_parameter(key, value)¶
-
set_electric_fields(electric_fields)¶
-
set_is_cosmic_ray()¶ set station type to cosmic rays (relevant e.g. for refraction into the snow)
-
set_is_neutrino()¶ set station type to neutrino
-
set_parameter(key, value)¶
-
set_parameter_error(key, value)¶
-
set_station_time(time)¶
-
set_trigger(trigger)¶
-
set_triggered(triggered=True)¶ convenience function to set a simple trigger. The recommended interface is to set triggers through the set_trigger() interface.
-
NuRadioReco.framework.base_trace module¶
-
class
NuRadioReco.framework.base_trace.BaseTrace¶ Bases:
object-
add_trace_start_time(start_time)¶
-
apply_time_shift(delta_t)¶ Uses the fourier shift theorem to apply a time shift to the trace Note that this is a cyclic shift, which means the trace will wrap around, which might lead to problems, especially for large time shifts.
- delta_t: float
Time by which the trace should be shifted
-
deserialize(data_pkl)¶
-
get_frequencies()¶
-
get_frequency_spectrum()¶
-
get_hilbert_envelope()¶
-
get_hilbert_envelope_mag()¶
-
get_number_of_samples()¶ returns the number of samples in the time domain
- Return: int
number of samples in time domain
-
get_sampling_rate()¶ returns the sampling rate of the trace
- Return: float
sampling rate, i.e., the inverse of the bin width
-
get_times()¶
-
get_trace()¶ returns the time trace. If the frequency spectrum was modified before, an ifft is performed automatically to have the time domain representation up to date.
- Returns: 1 or N dimensional np.array of floats
the time trace
-
get_trace_start_time()¶
-
serialize()¶
-
set_frequency_spectrum(frequency_spectrum, sampling_rate)¶
-
set_trace(trace, sampling_rate)¶ sets the time trace
- trace: np.array of floats
the time series
- sampling_rate: float
the sampling rage of the trace, i.e., the inverse of the bin width
-
set_trace_start_time(start_time)¶
-
NuRadioReco.framework.channel module¶
NuRadioReco.framework.electric_field module¶
-
class
NuRadioReco.framework.electric_field.ElectricField(channel_ids, position=None, shower_id=None, ray_tracing_id=None)¶ Bases:
NuRadioReco.framework.base_trace.BaseTrace-
deserialize(data_pkl)¶
-
get_channel_ids()¶
-
get_parameter(key)¶
-
get_parameter_error(key)¶
-
get_parameters()¶
-
get_position()¶ get position of the electric field relative to station position
-
get_ray_tracing_solution_id()¶
-
get_shower_id()¶
-
get_unique_identifier()¶ returns a unique identifier consisting of the tuple channel_ids, shower_id and ray_tracing_id
-
has_channel_ids(channel_ids)¶
-
has_parameter(key)¶
-
has_parameter_error(key)¶
-
serialize(save_trace)¶
-
set_channel_ids(channel_ids)¶
-
set_parameter(key, value)¶
-
set_parameter_error(key, value)¶
-
set_position(position)¶ set position of the electric field relative to station position
-
NuRadioReco.framework.event module¶
-
class
NuRadioReco.framework.event.Event(run_number, event_id)¶ Bases:
object-
add_shower(shower)¶ Adds a radio shower to the event
- shower: RadioShower object
The shower to be added to the event
-
add_sim_shower(sim_shower)¶ Add a simulated shower to the event
- sim_shower: RadioShower object
The shower to be added to the event
-
deserialize(data_pkl)¶
-
get_first_shower(ids=None)¶ Returns only the first shower stored in the event. Useful in cases when there is only one shower in the event.
- ids: list of integers
A list of station IDs. The first shower that is associated with all stations in the list is returned
-
get_first_sim_shower(ids=None)¶ Returns only the first sim shower stored in the event. Useful in cases when there is only one shower in the event.
- ids: list of integers
A list of station IDs. The first shower that is associated with all stations in the list is returned
-
get_hybrid_information()¶ Get information about hybrid detector data stored in the event.
-
get_id()¶
-
get_parameter(key)¶
-
get_run_number()¶
-
get_shower(shower_id)¶ returns a specific shower identified by its unique id
-
get_showers(ids=None)¶ Returns an iterator over the showers stored in the event
- ids: list of integers
A list of station IDs. Only showers that are associated with all stations in the list are returned
-
get_sim_shower(shower_id)¶ returns a specific shower identified by its unique id
-
get_sim_showers()¶ Get an iterator over all simulated showers in the event
-
get_station(station_id)¶
-
get_stations()¶
-
has_parameter(key)¶
-
has_shower(shower_id=None)¶ Returns true if at least one shower is stored in the event
If shower_id is given, it checks if this particular shower exists
-
has_sim_shower(shower_id=None)¶ Returns true if at least one simulated shower is stored in the event
If shower_id is given, it checks if this particular shower exists
-
iter_modules(station_id=None)¶ returns an interator that loops over all modules. If a station id is provided it loops over all modules that are applied on event or station level (on this particular station). If no station_id is provided, the loop is only over the event modules. The order follows the sequence these modules were applied
-
register_module_event(instance, name, kwargs)¶ registers modules applied to this event
- instance: module instance
the instance of the module that should be registered
- name: module name
the name of the module
- kwargs:
the key word arguments of the run method
-
register_module_station(station_id, instance, name, kwargs)¶ registers modules applied to this event
- station_id: int
the station id
- instance: module instance
the instance of the module that should be registered
- name: module name
the name of the module
- kwargs:
the key word arguments of the run method
-
serialize(mode)¶
-
set_id(evt_id)¶
-
set_parameter(key, value)¶
-
set_station(station)¶
-
NuRadioReco.framework.hybrid_information module¶
NuRadioReco.framework.hybrid_shower module¶
NuRadioReco.framework.parameter_serialization module¶
-
NuRadioReco.framework.parameter_serialization.deserialize(target_object, parameter_enum)¶
-
NuRadioReco.framework.parameter_serialization.serialize(target_object)¶
NuRadioReco.framework.parameters module¶
-
class
NuRadioReco.framework.parameters.ARIANNAParameters(*args, **kwds)¶ Bases:
aenum.Enum-
comm_duration= 5¶
-
comm_period= 4¶
-
internal_clock_time= 8¶
-
l1_supression_value= 7¶
-
seq_num= 3¶
-
seq_start_time= 1¶
-
seq_stop_time= 2¶
-
trigger_thresholds= 6¶
-
-
class
NuRadioReco.framework.parameters.channelParameters(*args, **kwds)¶ Bases:
aenum.Enum-
P2P_amplitude= 7¶
-
SNR= 5¶
-
azimuth= 2¶
-
cr_xcorrelations= 8¶
-
maximum_amplitude= 4¶
-
maximum_amplitude_envelope= 6¶
-
nu_xcorrelations= 9¶
-
signal_time= 10¶
-
zenith= 1¶
-
-
class
NuRadioReco.framework.parameters.electricFieldParameters(*args, **kwds)¶ Bases:
aenum.Enum-
azimuth= 8¶
-
cr_spectrum_quadratic_term= 16¶
-
cr_spectrum_slope= 5¶
-
max_amp_antenna= 12¶
-
max_amp_antenna_envelope= 13¶
-
nu_vertex_distance= 10¶
-
nu_viewing_angle= 11¶
-
polarization_angle= 2¶
-
polarization_angle_expectation= 3¶
-
ray_path_type= 1¶
-
reflection_coefficient_phi= 15¶
-
reflection_coefficient_theta= 14¶
-
signal_energy_fluence= 4¶
-
signal_time= 9¶
-
zenith= 7¶
-
-
class
NuRadioReco.framework.parameters.eventParameters(*args, **kwds)¶ Bases:
aenum.Enum-
hash_NuRadioMC= 3¶
-
hash_NuRadioReco= 2¶
-
sim_config= 1¶
-
-
class
NuRadioReco.framework.parameters.showerParameters(*args, **kwds)¶ Bases:
aenum.Enum-
atmospheric_model= 101¶
-
azimuth= 2¶
-
charge_excess_profile_id= 105¶
-
core= 3¶
-
distance_shower_maximum_geometric= 10¶
-
distance_shower_maximum_grammage= 11¶
-
electromagnetic_energy= 5¶
-
electromagnetic_radiation_energy= 7¶
-
energy= 4¶
-
flavor= 111¶
-
interaction_type= 109¶
-
k_L= 110¶
-
magnetic_field_rotation= 102¶
-
magnetic_field_vector= 103¶
-
observation_level= 104¶
-
primary_particle= 8¶
-
radiation_energy= 6¶
-
refractive_index_at_ground= 100¶
-
shower_maximum= 9¶
-
type= 106¶
-
vertex= 107¶
-
vertex_time= 108¶
-
zenith= 1¶
-
-
class
NuRadioReco.framework.parameters.stationParameters(*args, **kwds)¶ Bases:
aenum.Enum-
azimuth= 14¶
-
ccnc= 5¶
-
channels_max_amplitude= 12¶
-
chi2_efield_time_direction_fit= 26¶
-
cr_azimuth= 11¶
-
cr_energy= 9¶
-
cr_energy_em= 24¶
-
cr_xcorrelations= 19¶
-
cr_xmax= 28¶
-
cr_zenith= 10¶
-
inelasticity= 7¶
-
ndf_efield_time_direction_fit= 27¶
-
nu_azimuth= 2¶
-
nu_energy= 3¶
-
nu_flavor= 4¶
-
nu_inttype= 25¶
-
nu_vertex= 6¶
-
nu_xcorrelations= 20¶
-
nu_zenith= 1¶
-
station_time= 21¶
-
triggered= 8¶
-
zenith= 13¶
-
zenith_cr_templatefit= 15¶
-
zenith_nu_templatefit= 16¶
-
NuRadioReco.framework.radio_shower module¶
NuRadioReco.framework.sim_station module¶
-
class
NuRadioReco.framework.sim_station.SimStation(station_id)¶ Bases:
NuRadioReco.framework.base_station.BaseStation-
add_channel(channel)¶ adds a NuRadioReco.framework.channel ot the SimStation object
-
deserialize(data_pkl)¶
-
get_channel(unique_identifier)¶ returns channel identified by the triple (channel_id, shower_id, ray_tracing_id)
-
get_magnetic_field_vector()¶
-
get_simulation_weight()¶
-
iter_channels()¶
-
serialize(save_channel_traces, save_efield_traces)¶
-
set_magnetic_field_vector(magnetic_field_vector)¶
-
set_simulation_weight(simulation_weight)¶
-
NuRadioReco.framework.station module¶
-
class
NuRadioReco.framework.station.Station(station_id)¶ Bases:
NuRadioReco.framework.base_station.BaseStation-
add_channel(channel)¶
-
deserialize(data_pkl)¶
-
get_channel(channel_id)¶
-
get_magnetic_field_vector(time=None)¶
-
get_number_of_channels()¶
-
get_reference_direction()¶
-
get_reference_reconstruction()¶
-
get_sim_station()¶
-
has_sim_station()¶
-
iter_channels(use_channels=None)¶
-
serialize(mode)¶
-
set_reference_reconstruction(reference)¶
-
set_sim_station(sim_station)¶
-
NuRadioReco.framework.trigger module¶
-
class
NuRadioReco.framework.trigger.EnvelopePhasedTrigger(name, threshold_factor, power_mean, power_std, triggered_channels=None, phasing_angles=None, trigger_delays=None, output_passband=(None, None))¶
-
class
NuRadioReco.framework.trigger.EnvelopeTrigger(name, passband, order, threshold, number_of_coincidences=2, channel_coincidence_window=None, channels=None)¶
-
class
NuRadioReco.framework.trigger.HighLowTrigger(name, threshold_high, threshold_low, high_low_window, channel_coincidence_window, channels=None, number_of_coincidences=1)¶
-
class
NuRadioReco.framework.trigger.IntegratedPowerTrigger(name, threshold, channel_coincidence_window, channels=None, number_of_coincidences=1, power_mean=None, power_std=None, integration_window=None)¶
-
class
NuRadioReco.framework.trigger.SimplePhasedTrigger(name, threshold, channels=None, secondary_channels=None, primary_angles=None, secondary_angles=None, trigger_delays=None, sec_trigger_delays=None)¶
-
class
NuRadioReco.framework.trigger.SimpleThresholdTrigger(name, threshold, channels=None, number_of_coincidences=1, channel_coincidence_window=None)¶
-
class
NuRadioReco.framework.trigger.Trigger(name, channels=None, trigger_type='default')¶ Bases:
objectbase class to store different triggers
-
deserialize(data_pkl)¶
-
get_name()¶ get trigger name
-
get_trigger_settings()¶
-
get_trigger_time()¶ get the trigger time (time with respect to beginning of trace)
-
get_trigger_times()¶ get the trigger times (time with respect to beginning of trace)
-
get_triggered_channels()¶ get IDs of channels that have triggered
-
get_type()¶ get trigger type
-
has_triggered()¶ returns true if station has trigger, false otherwise
-
serialize()¶
-
set_trigger_time(time)¶ set the trigger time
- time: float
the trigger time from the beginning of the trace
-
set_trigger_times(times)¶ set the trigger times
- times: array
all trigger times
-
set_triggered(triggered=True)¶ set the trigger to True or False
-
set_triggered_channels(triggered_channels)¶
-
-
NuRadioReco.framework.trigger.deserialize(triggers_pkl)¶