Camera Efficiency#

Main functionality for the camera_efficiency module is to provide an interface to the testeff program provided by sim_telarray. A TelescopeModel and few more physical parameters (zenith angle, etc) are required inputs.

camera_efficiency#

Camera efficiency simulations and analysis.

class camera_efficiency.CameraEfficiency(telescope_model, site_model, simtel_source_path, label=None, config_data=None, config_file=None, test=False)[source]#

Camera efficiency simulations and analysis.

Parameters:
telescope_model: TelescopeModel

Instance of the TelescopeModel class.

site_model: SiteModel

Instance of the SiteModel class.

simtel_source_path: str (or Path)

Location of sim_telarray installation.

label: str

Instance label, optional.

config_data: dict.

Dict containing the configurable parameters.

config_file: str or Path

Path of the yaml file containing the configurable parameters.

test: bool

Is it a test instance (at the moment only affects the location of files).

analyze(export=True, force=False)[source]#

Analyze camera efficiency output file and store the results in _results.

Parameters:
export: bool

If True, results will be exported to a file automatically. Alternatively, export_results function can be used.

force: bool

If True, existing results files will be removed and analysis will be done again.

calc_camera_efficiency()[source]#

Calculate the camera nominal efficiency including gaps (as defined in B-TEL-1170).

Returns:
cam_efficiency: float

Wavelength-averaged camera efficiency

calc_nsb_rate()[source]#

Calculate the NSB rate.

Returns:
nsb_rate_provided_spectrum: float

NSB pixel rate in p.e./ns for the provided NSB spectrum

nsb_rate_ref_conditions: float

NSB pixel rate in p.e./ns for reference conditions (https://jama.cta-observatory.org/perspective.req#/items/26694?projectId=11)

calc_reflectivity()[source]#

Calculate the Cherenkov spectrum weighted reflectivity in the range 300-550 nm.

Returns:
Float

Cherenkov spectrum weighted reflectivity (300-550 nm)

calc_tel_efficiency()[source]#

Calculate the telescope total efficiency including gaps (as defined in A-PERF-2020).

Returns:
tel_efficiency: float

Telescope efficiency

calc_tot_efficiency(tel_efficiency)[source]#

Calculate the telescope total efficiency including gaps (as defined in A-PERF-2020).

Parameters:
tel_efficiency: float

The telescope efficiency as calculated by calc_tel_efficiency()

Returns:
Float

Telescope total efficiency including gaps

export_results()[source]#

Export results to a ecsv file.

classmethod from_kwargs(**kwargs)[source]#

Build a CameraEfficiency object from kwargs only.

The configurable parameters can be given as kwargs, instead of using the config_data or config_file arguments.

Parameters:
kwargs

Containing the arguments and the configurable parameters.

Returns:
Instance of this class.
plot_cherenkov_efficiency()[source]#

Plot Cherenkov efficiency vs wavelength.

Returns:
fig

The figure instance of pyplot

plot_nsb_efficiency()[source]#

Plot NSB efficiency vs wavelength.

Returns:
fig

The figure instance of pyplot

results_summary()[source]#

Print a summary of the results.

Include a header for the zenith/azimuth settings and the NSB spectrum file which was used. The summary includes the various CTAO requirements and the final expected NSB pixel rate.

simulate(force=False)[source]#

Simulate camera efficiency using testeff.

Parameters:
force: bool

Force flag will remove existing files and simulate again.