simtools-derive-photon-electron-spectrum#
Derive single photon electron spectrum from a given amplitude spectrum.
Normalizes single-p.e. amplitude distribution to mean amplitude of 1.0, as required by sim_telarray. Allows an afterpulse distribution to be folded into a prompt spectrum.
Input files must use the ECSV format.
The output directory receives the schema-validated ECSV model parameter and its metadata:
‘output_file’.ecsv: Single photon electron spectrum in ecsv format (data and metadata).
‘output_file’.<activity>.meta.yml: Application metadata for the ECSV product.
Example
simtools-derive-photon-electron-spectrum \\
--input_spectrum spectrum_photon_electron.ecsv \\
--afterpulse_spectrum spectrum_afterpulse.ecsv \\
--step_size 0.02 \\
--max_amplitude 42.0 \\
--output_path ./tests/output \\
--output_file spectrum_photon_electron_afterpulse.ecsv
For an example of how to plot the single photon electron spectrum, see the integration test ‘tests/integration_tests/config/plot_tabular_data_for_single_pe_data.yml’.
Command line arguments#
options#
- –help
show this help message and exit
- –input_spectrum
File with amplitude spectrum.
Required.
- –afterpulse_spectrum
File with afterpulse spectrum.
- –step_size
Step size in amplitude spectrum
Default: 0.02.
- –max_amplitude
Maximum amplitude for single p.e. for amplitude spectrum
Default: 42.0.
- –scale_afterpulse_spectrum
Scale afterpulse spectrum by the given factor
Default: 1.0.
- –afterpulse_amplitude_range
Amplitude range in pe for afterpulse calculation
Default: [0.0, 42.0].
- –fit_afterpulse
Fit afterpulse spectrum with an exponential decay function.
- –afterpulse_decay_factor_fixed_value
Fix decay factor in afterpulse fit (free fit parameter if not set set).
Default: 15.0.
simulation model#
- –site
Observatory site (e.g., North, South). Use –show_options site.
- –telescope
telescope model name (e.g., LSTN-01, SSTS-design, …)
output#
- –output_file
Output data file.
- –output_file_format
file format of output data
Default: ecsv.
- –skip_output_validation
skip output data validation against schema
application#
- –show_options
Print available values for a supported option and exit.
Example#
Derive an LST photoelectron spectrum#
Combine single-photoelectron and afterpulse measurements to derive an LST camera response spectrum.
Application: simtools-derive-photon-electron-spectrum
Integration test: derive_photon_electron_spectrum_lst_ecsv.yml
Command
simtools-derive-photon-electron-spectrum --config tests/integration_tests/config/derive_photon_electron_spectrum_lst_ecsv.yml
Configuration
input_spectrum: ${downloaded:SinglePhe_spectrum_totalfit_19pixel-average_20200601.csv}
afterpulse_spectrum: ${downloaded:Afterpulsing-probability_LST1-11PMTs_2023Oct_differential_used_pmts.ecsv}
step_size: 0.02
scale_afterpulse_spectrum: 1.0
fit_afterpulse: true
afterpulse_decay_factor_fixed_value: 15
afterpulse_amplitude_range:
- 4
- 42
telescope: LSTN-01
site: North
log_level: DEBUG
output_file: test_single_pe_lst.ecsv
output_path: simtools-output