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(simtel_path, config_data, label, db_config, test=False)[source]#
Camera efficiency simulations and analysis.
- Parameters:
- simtel_path: str (or Path)
Location of sim_telarray installation.
- db_config: dict
Configuration for the database.
- label: str
Instance label, optional.
- config_data: dict.
Dict 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
- plot_efficiency(efficiency_type, save_fig=False)[source]#
Plot efficiency vs wavelength.
- Parameters:
- efficiency_type: str
The type of efficiency to plot (Cherenkov ‘C’ or NSB ‘N’)
- save_fig: bool
If True, the figure will be saved to a file.
- Returns:
- fig
The figure instance of pyplot