NuRadioReco.framework.station module
- class NuRadioReco.framework.station.Station(station_id)[source]
Bases:
BaseStation
Methods
add_sim_station
(sim_station)Adds a SimStation to the Station.
get_channel_ids
([return_group_ids])Return all channel ids in the station
returns a sorted list with the electric field IDs of all simElectricFields of the simStation
Returns the first/earliest trigger.
Returns the primary trigger of the station.
Returns the SimStation of the Station.
get_station_time
([format])Returns a astropy.time.Time object
Return the station time as dict {value, format}.
get_trigger
(name)returns the trigger with the name 'name'
Returns a dictionary of the triggers.
Returns whether the Station has a SimStation.
has_trigger
(trigger_name)Checks if station has a trigger with a certain name.
has_triggered
([trigger_name])Checks if the station has triggered.
iter_channels
([use_channels, sorted])Iterates over all channels of the station.
remove_channel
(channel_id)Removes a channel from the station by deleting is from the channels dictionary.
removes all triggers from the station
set station type to cosmic rays (relevant e.g.
set station type to neutrino
set_sim_station
(sim_station)Sets the SimStation of the Station.
set_station_time
(time[, format])Set the (absolute) time for the station (stored as astropy.time.Time).
set_trigger
(trigger)sets a trigger for the station.
set_triggered
([triggered])Convenience function to set a simple trigger.
add_channel
add_electric_field
deserialize
get_ARIANNA_parameters
get_channel
get_electric_fields
get_electric_fields_for_channels
get_id
get_magnetic_field_vector
get_number_of_channels
get_parameter
get_parameter_error
get_parameters
get_reference_direction
get_reference_reconstruction
has_ARIANNA_parameter
has_channel
has_parameter
is_cosmic_ray
is_neutrino
iter_channel_group
remove_parameter
serialize
set_ARIANNA_parameter
set_electric_fields
set_parameter
set_parameter_error
set_reference_reconstruction
- set_sim_station(sim_station)[source]
Sets the SimStation of the Station. If a SimStation is already present, it is overwritten.
- Parameters:
- sim_stationNuRadioReco.framework.sim_station.SimStation
The SimStation to set as the SimStation of the Station.
- add_sim_station(sim_station)[source]
Adds a SimStation to the Station. If a SimStation is already present, the new SimStation is merged to the existing one.
- Parameters:
- sim_stationNuRadioReco.framework.sim_station.SimStation
The SimStation to add to the Station.
- get_sim_station()[source]
Returns the SimStation of the Station.
- Returns:
- NuRadioReco.framework.sim_station.SimStation
The SimStation of the Station.
- has_sim_station()[source]
Returns whether the Station has a SimStation.
- Returns:
- bool
True if the Station has a SimStation, False otherwise.
- iter_channels(use_channels=None, sorted=False)[source]
Iterates over all channels of the station. If use_channels is not None, only the channels with the ids in use_channels are iterated over. If sorted is True, the channels are iterated over in ascending order of their ids.
- Parameters:
- use_channelslist of int, optional
List of channel ids to iterate over. If None, all channels are iterated over.
- sortedbool, optional
If True, the channels are iterated over in ascending order of their ids.
- Yields:
- NuRadioReco.framework.channel.Channel
The next channel in the iteration.
- get_channel_ids(return_group_ids=False)[source]
Return all channel ids in the station
- Parameters:
- return_group_idsbool, default: False
If True, return a list of channel_group_ids instead of channel ids. Note that if no channel group ids are defined, these are the same as the channel ids
- Returns:
- channel_idslist
List of all channel ids
- remove_channel(channel_id)[source]
Removes a channel from the station by deleting is from the channels dictionary. The channel_id should be the id of the Channel, but supplying the Channel object itself is also supported.
- Parameters:
- channel_idint or NuRadioReco.framework.channel.Channel
The Channel (id) to remove from the Station.
- add_electric_field(electric_field)
- get_ARIANNA_parameter(key)
- get_ARIANNA_parameters()
- get_electric_field_ids()
returns a sorted list with the electric field IDs of all simElectricFields of the simStation
- Returns:
- efield_ids: list
- get_electric_fields()
- get_electric_fields_for_channels(channel_ids=None, ray_path_type=None)
- get_first_trigger()
Returns the first/earliest trigger. Returns None if no trigger fired.
- get_id()
- get_parameter(key)
- get_parameter_error(key)
- get_parameters()
- get_primary_trigger()
Returns the primary trigger of the station. If no primary trigger exists, it returns None
- get_station_time(format='isot')
Returns a astropy.time.Time object
- Parameters:
- format: str
Format in which the time object is displayed. (Default: isot)
- Returns:
- _station_time: astropy.time.Time
- get_station_time_dict()
Return the station time as dict {value, format}. Used for reading and writing
- get_trigger(name)
returns the trigger with the name ‘name’
- Parameters:
- name: string
the name of the trigger
- Returns:
- trigger: Trigger
- 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. WARNING: This function does not check if the trigger has triggered.
- Parameters:
- trigger_name: string
the name of the trigger
- Returns bool
- has_triggered(trigger_name=None)
Checks if the station has triggered. If trigger_name is set, check if the trigger with that name has triggered.
- Parameters:
- 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()
removes all triggers from the station
- 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, format=None)
Set the (absolute) time for the station (stored as astropy.time.Time). Not related to the event._event_time.
- Parameters:
- time: astropy.time.Time or datetime.datetime or float
If “time” is a float, you have to specify its format.
- format: str
Only used when “time” is a float. Format to interpret “time”. (Default: None)
- set_trigger(trigger)
sets a trigger for the station. If a trigger with the same name already exists, it will be overridden
- Parameters:
- trigger: Trigger
the trigger object to set
- set_triggered(triggered=True)
Convenience function to set a simple trigger. The recommended interface is to set triggers through the set_trigger() interface.