Camera#
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 simulations and analysis.
- class camera.camera_efficiency.CameraEfficiency(config_data, label, db_config)[source]#
Camera efficiency simulations and analysis.
- Parameters:
- db_config: dict
Configuration for the database.
- label: str
Instance label, optional.
- config_data: dict.
Dict containing the configurable parameters.
- 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(wavelength_range=(<Quantity 300. nm>, <Quantity 650. nm>))[source]#
Calculate the NSB rate.
CTAO reference wavelength range is 300-650 nm.
- Parameters:
- wavelength_range: tuple
Wavelength range used for the NSB rate calculation (default: (300 nm, 650 nm)).
- 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
- get_nsb_pixel_rate(reference_conditions=False)[source]#
Return the expected NSB pixel rate for each camera pixel.
This is an approximation, as testeff calculates the expected NSB pixel rate for the on-axis pixel only.
- Returns:
- list
Expected NSB pixel rate in p.e./ns for the provided NSB spectrum.
- 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
Single photon-electron spectral analysis#
single_photon_electron_spectrum#
Single photon electron spectral analysis.
- class camera.single_photon_electron_spectrum.SinglePhotonElectronSpectrum(args_dict)[source]#
Single photon electron spectral analysis.
- Parameters:
- args_dict: dict
Dictionary with input arguments.
- afterpulse_fit_function(fix_k)[source]#
Afterpulse fit function: exponential decay with linear term in the exponent.
Starting values and bounds are set for the other parameters using values typical for LSTN-design. Allows to fix the K parameter.
- Parameters:
- fix_Kfloat
Fixed value for K parameter.
- Returns:
- function
Exponential decay function with linear term in the exponent.