NuRadioReco.framework.radio_shower module

class NuRadioReco.framework.radio_shower.RadioShower(shower_id=0, station_ids=None)[source]

Bases: BaseShower

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.

get_axis()

Returns the (shower) axis.

get_coordinatesystem()

Returns radiotools.coordinatesystem.cstrafo for shower geometry.

get_parameter(key[, copy])

Get a parameter

get_parameter_covariance(key1, key2)

Get the covariance of two parameters

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_covariance(key1, key2)

Returns True if the covariance for key1 and key2 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_covariance(key1, key2, value)

Set the covariance of two parameters

set_parameter_error(key, value)

Set the error of a parameter

show([show_parameters, print_stdout])

Print an overview of the structure of the Shower.

deserialize

get_id

get_station_ids

has_station_ids

serialize

get_station_ids()[source]
has_station_ids(ids)[source]
serialize()[source]
deserialize(data_pkl)[source]
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_axis()

Returns the (shower) axis.

The axis is antiparallel to the movement of the shower particla and point towards the origin of the shower.

Returns:
np.array(3,)

Shower axis

get_coordinatesystem()

Returns radiotools.coordinatesystem.cstrafo for shower geometry.

Can be used to transform the radio pulses or the observer coordiates in the shower frame. Requieres the shower arrival direction (azimuth and zenith angle) and magnetic field vector (showerParameters).

Returns:
radiotools.coordinatesystem.cstrafo
get_id()
get_parameter(key, copy=True)

Get a parameter

Parameters:
keyparameter key

The parameter to retrieve.

copybool (default: True)

If True (default), mutable values (e.g. list, dict, numpy.ndarray) are deep-copied before being returned, so that modifying the returned value does not also modify the parameter stored in this object. Values of immutable types (e.g. int, float, str, None) are never copied, since they cannot be mutated in place regardless of this option.

Set to False to retrieve the stored object itself without copying, e.g. for read-only access to large objects in performance-critical code. Note that in this case, any in-place modification of the returned object will also modify the parameter stored in this object.

get_parameter_covariance(key1, key2)

Get the covariance of two parameters

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_covariance(key1, key2)

Returns True if the covariance for key1 and key2 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_covariance(key1, key2, value)

Set the covariance of two parameters

set_parameter_error(key, value)

Set the error of a parameter

show(show_parameters=1, print_stdout=True, **kwargs)

Print an overview of the structure of the Shower.

Parameters:
show_parametersint, default: 1

If > 0, print the parameters stored in the Shower.

Returns:
str_outputstr, optional

A string representation of the Shower structure.

Other Parameters:
print_stdoutbool, optional

If True (default), print the Shower structure to stdout. Otherwise, return the string representation