NuRadioReco.framework.base_station module
- class NuRadioReco.framework.base_station.BaseStation(station_id)[source]
Bases:
ParameterStorage
- Parameters:
- parameter_typesparameter class or list of classes
The parameter classes are defined in
NuRadioReco.framework.parameters
Methods
add_parameter_type
(parameter_type)Add a parameter class to the list of allowed parameter classes.
returns a sorted list with the electric field IDs of all simElectricFields of the simStation
Returns the first/earliest trigger.
get_parameter
(key)Get a parameter
get_parameter_error
(key)Get the error of a parameter
Get all parameters
Returns the primary trigger of the station.
get_station_time
([format])Returns the station time as an astropy.time.Time object
get_trigger
(name)returns the trigger with the name 'name'
Returns a dictionary of the triggers.
has_parameter
(key)Returns True if the parameter key is present, False otherwise
has_parameter_error
(key)Returns True if an uncertainty for the parameter key is present, False otherwise
has_trigger
(trigger_name)Checks if station has a trigger with a certain name.
has_triggered
([trigger_name])Checks if the station has triggered.
remove_parameter
(key)Remove a parameter
removes all triggers from the station
set station type to cosmic rays (relevant e.g. for refraction into the snow).
set station type to neutrino
set_parameter
(key, value)Set a parameter
set_parameter_error
(key, value)Set the error of a parameter
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_electric_field
deserialize
get_ARIANNA_parameter
get_ARIANNA_parameters
get_electric_fields
get_electric_fields_for_channels
get_id
has_ARIANNA_parameter
is_cosmic_ray
is_neutrino
serialize
set_ARIANNA_parameter
set_electric_fields
- set_station_time(time, format=None)[source]
Set the (absolute) time for the station (stored as astropy.time.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)
- get_station_time(format='isot')[source]
Returns the station time as an astropy.time.Time object
The station time corresponds to the absolute time at which the event starts, i.e. all times in Channel, Trigger and ElectricField objects are measured relative to this time.
- Parameters:
- format: str
Format in which the time object is displayed. (Default: isot)
- Returns:
- station_time: astropy.time.Time
- get_trigger(name)[source]
returns the trigger with the name ‘name’
- Parameters:
- name: string
the name of the trigger
- Returns:
- trigger: Trigger
- get_primary_trigger()[source]
Returns the primary trigger of the station. If no primary trigger exists, it returns None
- has_trigger(trigger_name)[source]
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
- get_triggers()[source]
Returns a dictionary of the triggers. key is the trigger name, value is a trigger object
- set_trigger(trigger)[source]
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
- has_triggered(trigger_name=None)[source]
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
- set_triggered(triggered=True)[source]
Convenience function to set a simple trigger. The recommended interface is to set triggers through the set_trigger() interface.
- get_electric_field_ids()[source]
returns a sorted list with the electric field IDs of all simElectricFields of the simStation
- Returns:
- efield_ids: list
- set_is_cosmic_ray()[source]
set station type to cosmic rays (relevant e.g. for refraction into the snow)
- add_parameter_type(parameter_type)
Add a parameter class to the list of allowed parameter classes.
- Parameters:
- parameter_typeparameter class
The parameter class is defined in
NuRadioReco.framework.parameters
- get_parameter(key)
Get a parameter
- get_parameter_error(key)
Get the error of a parameter
- get_parameters()
Get all parameters
- has_parameter(key)
Returns True if the parameter key is present, False otherwise
- has_parameter_error(key)
Returns True if an uncertainty for the parameter key is present, False otherwise
- remove_parameter(key)
Remove a parameter
- set_parameter(key, value)
Set a parameter
- set_parameter_error(key, value)
Set the error of a parameter