NuRadioReco.framework.base_station module

class NuRadioReco.framework.base_station.BaseStation(station_id)[source]

Bases: object

Methods

get_ARIANNA_parameter(key)

get_station_time([format])

Returns a astropy.time.Time object

get_station_time_dict()

Return the station time as dict {value, format}.

get_triggers()

returns a dictionary of the triggers.

has_trigger(trigger_name)

checks if station has a trigger with a certain name

has_triggered([trigger_name])

convenience function.

set_is_cosmic_ray()

set station type to cosmic rays (relevant e.g.

set_is_neutrino()

set station type to neutrino

set_station_time(time[, format])

Set the (absolute) time for the station (stored as astropy.time.Time).

set_triggered([triggered])

convenience function to set a simple trigger.

add_electric_field

deserialize

get_ARIANNA_parameters

get_electric_fields

get_electric_fields_for_channels

get_id

get_parameter

get_parameter_error

get_parameters

get_trigger

has_ARIANNA_parameter

has_parameter

is_cosmic_ray

is_neutrino

remove_parameter

remove_triggers

serialize

set_ARIANNA_parameter

set_electric_fields

set_parameter

set_parameter_error

set_trigger

get_parameter(key)[source]
get_parameters()[source]
has_parameter(key)[source]
set_parameter(key, value)[source]
set_parameter_error(key, value)[source]
get_parameter_error(key)[source]
remove_parameter(key)[source]
set_station_time(time, format=None)[source]

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)

get_station_time(format='isot')[source]

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()[source]

Return the station time as dict {value, format}. Used for reading and writing

get_id()[source]
remove_triggers()[source]
get_trigger(name)[source]
has_trigger(trigger_name)[source]

checks if station has a trigger with a certain name

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]
has_triggered(trigger_name=None)[source]

convenience function.

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.

set_electric_fields(electric_fields)[source]
get_electric_fields()[source]
add_electric_field(electric_field)[source]
get_electric_fields_for_channels(channel_ids=None, ray_path_type=None)[source]
is_neutrino()[source]
is_cosmic_ray()[source]
set_is_neutrino()[source]

set station type to neutrino

set_is_cosmic_ray()[source]

set station type to cosmic rays (relevant e.g. for refraction into the snow)

get_ARIANNA_parameter(key)[source]
get_ARIANNA_parameters()[source]
has_ARIANNA_parameter(key)[source]
set_ARIANNA_parameter(key, value)[source]
serialize(save_efield_traces)[source]
deserialize(data_pkl)[source]