NuRadioReco.modules.RNO_G.crRNOGTemplateCreator module

class NuRadioReco.modules.RNO_G.crRNOGTemplateCreator.crRNOGTemplateCreator[source]

Bases: object

Creates CR templates by assuming a gaussian function for the electric field

Methods

begin(detector_file, template_save_path[, ...])

begin method

run([template_filename, ...])

run method

set_template_parameter([template_run_id, ...])

set_parameter_templates method

begin(detector_file: str, template_save_path: str, debug: bool = False, logger_level: Logger = 0) None[source]

begin method

Parameters:
detector_file: str

path to the detector file used for the template set

template_save_path: str

path to a folder where the templates are stored

debug: bool, default: False

enable/disable debug mode

logger_level: str or int, optional

Set verbosity level for logger (default: logging.NOTSET)

set_template_parameter(template_run_id: list[int] = [0, 0, 0], template_event_id: list[int] = [0, 1, 2], template_station_id: list[int] = [101, 101, 101], template_channel_id: list[int] = [0, 0, 0], efield_width: list[float] = [5, 4, 2], antenna_rotation: list[float] = [160, 160, 160], efield_amplitudes: list[float] = [-0.2, 0.8], cr_zenith: list[float] = [55, 55, 55], cr_azimuth: list[float] = [0, 0, 0], sampling_rate: float = 3.2, number_of_samples: int = 2048) None[source]

set_parameter_templates method

sets the parameter to create the template set

Parameters:
template_run_id: list of int, default: [0,0,0]

run ids of the artificial templates

template_event_id: list of int, default: [0,1,2]

event ids of the artificial templates

template_station_id: list of int, default: [101,101,101]

station ids of the artificial templates

template_channel_id: list of int, default: [0,0,0]

channel ids of the artificial templates

efield_width: list of int, default: [5,4,2]

width (in samples) of the gaussian function used to create the Efield

antenna_rotation: list of int, default: [160,160,160]

rotation angle of the LPDA

efield_amplitudes: list of float, default:[-0.2,0.8]

array with the amplitudes of the Efield components [E_theta, E_phi]

cr_zenith: list of int, default: [55,55,55]

zenith angle of the cr for the template

cr_azimuth: list of int, default: [0,0,0]

azimuth angle of the cr for the template

sampling_rate: float, default: 3.2

sampling rate used to build the template

number_of_samples: int, default: 2048

number of samples used for the trace

run(template_filename: str = 'templates_cr_station_101.pickle', include_hardware_response: bool = True, hardware_response_source: str = 'json', return_templates: bool = False, bandpass_filter: None | dict[str, Any] = None) None | list[Event][source]

run method

creates a pickle file with the Efield trace of the artificial templates

Parameters:
template_filename: str, default: ‘templates_cr_station_101.pickle’

filename of the pickle file that will be used to store the templates

include_hardware_response: bool, default: True

if true, the hardware response of the surface amps (hardwareResponseIncorporator) is applied

hardware_response_source: str, default: “json”

define if the hardware response is loaded from the json (‘json’) or from the database (‘database’)

return_templates: bool, default: False

if true, the template traces are returned in an addition to saving them in a pickle file

bandpass_filter: dict, optional

If a dictionary is given, a bandpass filter will be applied to the templates. The dictionary should hold all arguments that are needed for the channelBandPassFilter.

Returns:
template_event: list of NuRadioReco.framework.event.Event or None

If return templates is True, a list with the templates is returned.