NuRadioReco.detector.detector module

NuRadioReco.detector.detector.find_path(name)[source]

Checks for file relative to local folder and detector.py

NuRadioReco.detector.detector.find_reference_entry(station_dict)[source]

Search for the strings “reference_station” or “reference_channel” in the detector description. This is used to determine whether to use the detector_base or generic_detector class.

NuRadioReco.detector.detector.if_not_None(value, default)[source]

Return value if value is not None, otherwise return default

NuRadioReco.detector.detector.Detector(*args, **kwargs)[source]

This function returns a detector class object. It chooses the correct class based on the “source” argument. The returned object is of one of these classes:

For ‘kwargs[“source’] == “json”’, whether to use “detector_base” or “generic_detector” depends on whether a reference station / channel is defined in the json file / dictionary or not.

Parameters:
args: Positional arguments (arguments without keyword)

For backwards compatibility, when source is sql | json | dictionary, args are interpreted as follows:

  • json_filename = args[0] only when source == “json”)

  • source = args[1]

  • dictionary = args[2]

  • assume_inf = args[3]

  • antenna_by_depth = args[4]

kwargs: Optional arguments (arguments with keyword)

Keyword arguments passed to detector object. The argument “source” is used to select the correct class (see description above). If no keyword “source” is passed, the default “json” is used.

Returns:
det: NuRadioReco.detector.* (see options above)

Detector class object