NuRadioReco.framework.particle module

class NuRadioReco.framework.particle.Particle(particle_index)[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.

get_id()

Returns hierarchical index

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

show([show_parameters, print_stdout])

Print an overview of the structure of the Particle.

as_hdf5_dict

deserialize

serialize

get_id()[source]

Returns hierarchical index

as_hdf5_dict()[source]
serialize()[source]
deserialize(data_pkl)[source]
show(show_parameters=0, print_stdout=True, **kwargs)[source]

Print an overview of the structure of the Particle.

Parameters:
show_parametersint, default: 0

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

Returns:
str_outputstr, optional

A string representation of the Particle structure.

Other Parameters:
print_stdoutbool, optional

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

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