NuRadioReco.framework.sim_station module

class NuRadioReco.framework.sim_station.SimStation(station_id)[source]

Bases: BaseStation

Parameters:
parameter_typesparameter class or list of classes

The parameter classes are defined in NuRadioReco.framework.parameters

Methods

add_channel(channel[, overwrite])

Add a SimChannel to the SimStation.

add_parameter_type(parameter_type)

Add a parameter class to the list of allowed parameter classes.

get_channel(unique_identifier)

returns channel identified by the triple (channel_id, shower_id, ray_tracing_id)

get_channel_ids()

returns a list with the channel IDs of all simChannels of the simStation

get_channels_by_channel_id(channel_id)

returns all simChannels that have the given channel_id

get_channels_by_ray_tracing_id(ray_tracing_id)

returns all simChannels that have the given ray_tracing_id

get_channels_by_shower_id(shower_id)

returns all simChannels that have the given shower_id

get_electric_field_ids()

returns a sorted list with the electric field IDs of all simElectricFields of the simStation

get_first_trigger()

Returns the first/earliest trigger.

get_parameter(key)

Get a parameter

get_parameter_error(key)

Get the error of a parameter

get_parameters()

Get all parameters

get_primary_trigger()

Returns the primary trigger of the station.

get_ray_tracing_ids()

returns a list with the raytracing IDs of all simChannels of the simStation

get_shower_ids()

returns a list with the shower IDs of all simChannels of the simStation

get_station_time([format])

Returns the station time as an astropy.time.Time object

get_trigger(name)

returns the trigger with the name 'name'

get_triggers()

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.

is_candidate()

Returns whether the station is a candidate for producing a trigger.

remove_parameter(key)

Remove a parameter

remove_triggers()

removes all triggers from the station

set_candidate(candidate_status)

Set the candidate for the simulation station.

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 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

get_magnetic_field_vector

get_simulation_weight

has_ARIANNA_parameter

is_cosmic_ray

is_neutrino

iter_channels

serialize

set_ARIANNA_parameter

set_electric_fields

set_magnetic_field_vector

set_simulation_weight

set_candidate(candidate_status)[source]

Set the candidate for the simulation station. True means the station is a candidate for producing a trigger.

Parameters:
candidate_statusbool

If the station is a candidate for producing a trigger.

Returns:
None
is_candidate()[source]

Returns whether the station is a candidate for producing a trigger.

Returns:
bool

True if the station is a candidate for producing a trigger, False otherwise.

get_magnetic_field_vector()[source]
set_magnetic_field_vector(magnetic_field_vector)[source]
get_simulation_weight()[source]
set_simulation_weight(simulation_weight)[source]
iter_channels()[source]
add_channel(channel, overwrite=False)[source]

Add a SimChannel to the SimStation.

Parameters:
channel: `NuRadioReco.framework.sim_channel.SimChannel`

Channel to be added.

overwrite: bool (Default: False)

If True, allow to overwrite a existing channel (i.e., a channel with the same unique identifier). If False, raise AttributeError if a channel with the same identifier is being added

get_channel(unique_identifier)[source]

returns channel identified by the triple (channel_id, shower_id, ray_tracing_id)

get_channel_ids()[source]

returns a list with the channel IDs of all simChannels of the simStation

get_shower_ids()[source]

returns a list with the shower IDs of all simChannels of the simStation

get_ray_tracing_ids()[source]

returns a list with the raytracing IDs of all simChannels of the simStation

get_channels_by_channel_id(channel_id)[source]

returns all simChannels that have the given channel_id

get_channels_by_shower_id(shower_id)[source]

returns all simChannels that have the given shower_id

get_channels_by_ray_tracing_id(ray_tracing_id)[source]

returns all simChannels that have the given ray_tracing_id

serialize(save_channel_traces, save_efield_traces)[source]
deserialize(data_pkl)[source]
add_electric_field(electric_field)
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_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 a parameter

get_parameter_error(key)

Get the error of a parameter

get_parameters()

Get all 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 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)

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)

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. 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 a parameter

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 a parameter

set_parameter_error(key, value)

Set the error of a parameter

set_station_time(time, format=None)

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)

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.