gammasimtools 0.12.0__py3-none-any.whl → 0.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gammasimtools-0.12.0.dist-info → gammasimtools-0.14.0.dist-info}/METADATA +3 -3
- {gammasimtools-0.12.0.dist-info → gammasimtools-0.14.0.dist-info}/RECORD +257 -263
- {gammasimtools-0.12.0.dist-info → gammasimtools-0.14.0.dist-info}/WHEEL +1 -1
- {gammasimtools-0.12.0.dist-info → gammasimtools-0.14.0.dist-info}/entry_points.txt +4 -1
- simtools/_version.py +2 -2
- simtools/applications/convert_all_model_parameters_from_simtel.py +77 -88
- simtools/applications/convert_geo_coordinates_of_array_elements.py +1 -1
- simtools/applications/db_add_file_to_db.py +15 -0
- simtools/applications/db_add_value_from_json_to_db.py +18 -1
- simtools/applications/db_get_parameter_from_db.py +52 -22
- simtools/applications/derive_ctao_array_layouts.py +120 -0
- simtools/applications/derive_photon_electron_spectrum.py +30 -2
- simtools/applications/docs_produce_array_element_report.py +42 -26
- simtools/applications/docs_produce_model_parameter_reports.py +28 -21
- simtools/applications/generate_simtel_event_data.py +117 -0
- simtools/applications/plot_tabular_data.py +14 -2
- simtools/applications/print_version.py +81 -0
- simtools/applications/production_derive_corsika_limits.py +240 -0
- simtools/applications/production_scale_events.py +59 -36
- simtools/applications/run_application.py +47 -18
- simtools/applications/simulate_light_emission.py +115 -247
- simtools/applications/simulate_prod_htcondor_generator.py +2 -2
- simtools/applications/submit_data_from_external.py +1 -1
- simtools/applications/submit_model_parameter_from_external.py +2 -1
- simtools/camera/single_photon_electron_spectrum.py +169 -17
- simtools/constants.py +7 -0
- simtools/data_model/metadata_collector.py +159 -61
- simtools/data_model/model_data_writer.py +18 -61
- simtools/data_model/schema.py +2 -1
- simtools/data_model/validate_data.py +5 -3
- simtools/db/db_handler.py +123 -33
- simtools/dependencies.py +38 -3
- simtools/layout/array_layout.py +1 -0
- simtools/layout/ctao_array_layouts.py +172 -0
- simtools/model/array_model.py +3 -4
- simtools/model/model_parameter.py +30 -118
- simtools/production_configuration/derive_corsika_limits.py +328 -0
- simtools/production_configuration/event_scaler.py +2 -2
- simtools/ray_tracing/mirror_panel_psf.py +1 -1
- simtools/reporting/docs_auto_report_generator.py +217 -0
- simtools/reporting/docs_read_parameters.py +298 -143
- simtools/schemas/application_workflow.metaschema.yml +3 -0
- simtools/schemas/metadata.metaschema.yml +7 -6
- simtools/schemas/model_parameter.metaschema.yml +13 -4
- simtools/schemas/model_parameter_and_data_schema.metaschema.yml +19 -5
- simtools/schemas/model_parameters/adjust_gain.schema.yml +1 -1
- simtools/schemas/model_parameters/altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/array_coordinates.schema.yml +1 -1
- simtools/schemas/model_parameters/array_coordinates_UTM.schema.yml +3 -3
- simtools/schemas/model_parameters/array_element_position_ground.schema.yml +3 -3
- simtools/schemas/model_parameters/array_element_position_utm.schema.yml +3 -3
- simtools/schemas/model_parameters/array_layouts.schema.yml +3 -0
- simtools/schemas/model_parameters/array_window.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_shaping.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/atmospheric_profile.schema.yml +1 -1
- simtools/schemas/model_parameters/axes_offsets.schema.yml +2 -2
- simtools/schemas/model_parameters/camera_body_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_body_shape.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_config_file.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_config_rotate.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_degraded_efficiency.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_degraded_map.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_depth.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_filter.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_pixels.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_transmission.schema.yml +1 -1
- simtools/schemas/model_parameters/channels_per_chip.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_iact_io_buffer.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_iact_max_bunches.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_iact_split_auto.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_observation_level.schema.yml +1 -1
- simtools/schemas/model_parameters/dark_events.schema.yml +1 -1
- simtools/schemas/model_parameters/disc_bins.schema.yml +1 -1
- simtools/schemas/model_parameters/disc_start.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_fall_time.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_gate_length.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_hysteresis.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_output_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_output_var_percent.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_rise_time.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_scale_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_sigsum_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_time_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_gate_length.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_sigsum_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_time_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/dish_shape_length.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_ignore_below.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_pre_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_prescale.schema.yml +2 -2
- simtools/schemas/model_parameters/dsum_presum_max.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_presum_shift.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_shaping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_zero_clip.schema.yml +1 -1
- simtools/schemas/model_parameters/effective_focal_length.schema.yml +5 -5
- simtools/schemas/model_parameters/epsg_code.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_bins.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_dev_pedestal.schema.yml +2 -2
- simtools/schemas/model_parameters/fadc_err_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_err_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_dev_pedestal.schema.yml +2 -2
- simtools/schemas/model_parameters/fadc_lg_err_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_err_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_max_signal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_max_sum.schema.yml +4 -4
- simtools/schemas/model_parameters/fadc_lg_noise.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_sysvar_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_var_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_var_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_max_signal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_max_sum.schema.yml +4 -4
- simtools/schemas/model_parameters/fadc_mhz.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_noise.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sum_bins.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sum_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sysvar_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_var_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_var_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fake_mirror_list.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_surface_parameters.schema.yml +20 -20
- simtools/schemas/model_parameters/focal_surface_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/focus_offset.schema.yml +4 -4
- simtools/schemas/model_parameters/gain_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/geomag_horizontal.schema.yml +1 -1
- simtools/schemas/model_parameters/geomag_rotation.schema.yml +1 -1
- simtools/schemas/model_parameters/geomag_vertical.schema.yml +1 -1
- simtools/schemas/model_parameters/hg_lg_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/iobuf_maximum.schema.yml +1 -1
- simtools/schemas/model_parameters/iobuf_output_maximum.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_events.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_external_trigger.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_exptime.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_sigtime.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_twidth.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_var_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_wavelength.schema.yml +1 -1
- simtools/schemas/model_parameters/led_events.schema.yml +1 -1
- simtools/schemas/model_parameters/led_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/led_pulse_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/led_pulse_sigtime.schema.yml +1 -1
- simtools/schemas/model_parameters/led_var_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/lightguide_efficiency_vs_wavelength.schema.yml +1 -1
- simtools/schemas/model_parameters/min_photoelectrons.schema.yml +1 -1
- simtools/schemas/model_parameters/min_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_align_random_distance.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_align_random_horizontal.schema.yml +4 -4
- simtools/schemas/model_parameters/mirror_align_random_vertical.schema.yml +4 -4
- simtools/schemas/model_parameters/mirror_class.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_degraded_reflection.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_list.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_panel_2f_measurements.schema.yml +3 -3
- simtools/schemas/model_parameters/mirror_reflection_random_angle.schema.yml +3 -3
- simtools/schemas/model_parameters/multiplicity_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/muon_mono_threshold.schema.yml +45 -0
- simtools/schemas/model_parameters/nsb_autoscale_airmass.schema.yml +2 -2
- simtools/schemas/model_parameters/nsb_gain_drop_scale.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_offaxis.schema.yml +5 -5
- simtools/schemas/model_parameters/nsb_pixel_rate.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_reference_spectrum.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_reference_value.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_scaling_factor.schema.yml +1 -1
- simtools/schemas/model_parameters/{nsb_skymap.schema.yml → nsb_sky_map.schema.yml} +1 -1
- simtools/schemas/model_parameters/nsb_spectrum.schema.yml +2 -2
- simtools/schemas/model_parameters/num_gains.schema.yml +1 -1
- simtools/schemas/model_parameters/pedestal_events.schema.yml +1 -1
- simtools/schemas/model_parameters/photon_delay.schema.yml +1 -1
- simtools/schemas/model_parameters/photons_per_run.schema.yml +1 -1
- simtools/schemas/model_parameters/pixel_cells.schema.yml +1 -1
- simtools/schemas/model_parameters/pixels_parallel.schema.yml +1 -1
- simtools/schemas/model_parameters/pixeltrg_time_step.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_average_gain.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_collection_efficiency.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_gain_index.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_transit_time.schema.yml +4 -4
- simtools/schemas/model_parameters/pm_voltage_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_degraded_map.schema.yml +8 -4
- simtools/schemas/model_parameters/primary_mirror_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_hole_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_parameters.schema.yml +20 -20
- simtools/schemas/model_parameters/primary_mirror_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_segmentation.schema.yml +1 -1
- simtools/schemas/model_parameters/qe_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/random_focal_length.schema.yml +2 -2
- simtools/schemas/model_parameters/random_mono_probability.schema.yml +38 -0
- simtools/schemas/model_parameters/reference_point_altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_latitude.schema.yml +4 -1
- simtools/schemas/model_parameters/reference_point_longitude.schema.yml +4 -1
- simtools/schemas/model_parameters/reference_point_utm_east.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_utm_north.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_baffle.schema.yml +5 -5
- simtools/schemas/model_parameters/secondary_mirror_degraded_map.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_degraded_reflection.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_hole_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_parameters.schema.yml +20 -20
- simtools/schemas/model_parameters/secondary_mirror_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_segmentation.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_shadow_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_shadow_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/stars.schema.yml +36 -0
- simtools/schemas/model_parameters/store_photoelectrons.schema.yml +1 -1
- simtools/schemas/model_parameters/tailcut_scale.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_axis_height.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_random_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_random_error.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_sphere_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_transmission.schema.yml +6 -6
- simtools/schemas/model_parameters/teltrig_min_sigsum.schema.yml +1 -1
- simtools/schemas/model_parameters/teltrig_min_time.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_calib_error.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_compensate_error.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_compensate_step.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_error.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_jitter.schema.yml +1 -1
- simtools/schemas/model_parameters/trigger_current_limit.schema.yml +1 -1
- simtools/schemas/model_parameters/trigger_delay_compensation.schema.yml +4 -4
- simtools/schemas/model_parameters/trigger_pixels.schema.yml +1 -1
- simtools/schemas/plot_configuration.metaschema.yml +162 -0
- simtools/schemas/production_tables.schema.yml +1 -1
- simtools/simtel/simtel_config_reader.py +85 -34
- simtools/simtel/simtel_config_writer.py +70 -38
- simtools/simtel/simtel_io_event_reader.py +278 -0
- simtools/simtel/simtel_io_event_writer.py +317 -0
- simtools/simtel/simtel_table_reader.py +4 -0
- simtools/simtel/simulator_light_emission.py +181 -67
- simtools/simulator.py +2 -2
- simtools/testing/configuration.py +17 -0
- simtools/utils/general.py +83 -16
- simtools/utils/geometry.py +19 -0
- simtools/utils/names.py +14 -3
- simtools/visualization/plot_tables.py +25 -20
- simtools/visualization/visualize.py +73 -25
- simtools/_dev_version/__init__.py +0 -9
- simtools/applications/__init__.py +0 -0
- simtools/applications/production_derive_limits.py +0 -95
- simtools/configuration/__init__.py +0 -0
- simtools/corsika/__init__.py +0 -0
- simtools/data_model/__init__.py +0 -0
- simtools/db/__init__.py +0 -0
- simtools/io_operations/__init__.py +0 -0
- simtools/job_execution/__init__.py +0 -0
- simtools/layout/__init__.py +0 -0
- simtools/model/__init__.py +0 -0
- simtools/production_configuration/limits_calculation.py +0 -202
- simtools/ray_tracing/__init__.py +0 -0
- simtools/runners/__init__.py +0 -0
- simtools/simtel/__init__.py +0 -0
- simtools/simtel/simtel_io_events.py +0 -265
- simtools/testing/__init__.py +0 -0
- simtools/utils/__init__.py +0 -0
- simtools/visualization/__init__.py +0 -0
- {gammasimtools-0.12.0.dist-info → gammasimtools-0.14.0.dist-info/licenses}/LICENSE +0 -0
- {gammasimtools-0.12.0.dist-info → gammasimtools-0.14.0.dist-info}/top_level.txt +0 -0
|
@@ -1,136 +1,124 @@
|
|
|
1
1
|
#!/usr/bin/python3
|
|
2
2
|
|
|
3
3
|
r"""
|
|
4
|
-
|
|
4
|
+
Simulate calibration devices using the light emission package.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Run the application in the command line.
|
|
7
|
+
There are two ways this application can be executed:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
1. Illuminator at varying distances.
|
|
10
|
+
2. Illuminator and telescopes at fixed positions as defined in the layout.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Example Usage
|
|
13
|
+
-------------
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.. code-block:: console
|
|
18
|
-
|
|
19
|
-
simtools-simulate-light-emission --telescope MSTN-04 --site North \
|
|
20
|
-
--illuminator ILLN-01 --light_source_setup variable \
|
|
21
|
-
--model_version 6.0.0 --light_source_type led
|
|
22
|
-
|
|
23
|
-
2. Simulate light emission with telescopes at fixed positions according to the layout:
|
|
24
|
-
|
|
25
|
-
.. code-block:: console
|
|
26
|
-
|
|
27
|
-
simtools-simulate-light-emission --telescope MSTN-04 --site North \
|
|
28
|
-
--illuminator ILLN-01 --light_source_setup layout \
|
|
29
|
-
--model_version 6.0.0 \
|
|
30
|
-
--light_source_type led
|
|
31
|
-
|
|
32
|
-
Command Line Arguments
|
|
33
|
-
----------------------
|
|
34
|
-
|
|
35
|
-
--telescope (str, required)
|
|
36
|
-
Telescope model name (e.g. LSTN-01, SSTS-design, SSTS-25, ...)
|
|
37
|
-
|
|
38
|
-
--site (str, required)
|
|
39
|
-
Site name (North or South).
|
|
40
|
-
|
|
41
|
-
--illuminator (str, optional)
|
|
42
|
-
Illuminator in array, e.g., ILLN-01.
|
|
43
|
-
|
|
44
|
-
--light_source_setup (str, optional)
|
|
45
|
-
Select calibration light source positioning/setup:
|
|
46
|
-
- "variable" for varying distances.
|
|
47
|
-
- "layout" for actual telescope positions.
|
|
48
|
-
|
|
49
|
-
--model_version (str, optional)
|
|
50
|
-
Version of the simulation model.
|
|
51
|
-
|
|
52
|
-
--light_source_type (str, optional)
|
|
53
|
-
Select calibration light source type: led (default) or laser.
|
|
54
|
-
This changes the pre-compiled (simtel_array) application that is used to run the
|
|
55
|
-
light emission package with. Currently we use xyzls (laser), and ls-beam can be
|
|
56
|
-
accessed by using the laser option.
|
|
57
|
-
|
|
58
|
-
--off_axis_angle (float, optional)
|
|
59
|
-
Off axis angle for light source direction.
|
|
60
|
-
|
|
61
|
-
--plot (flag, optional)
|
|
62
|
-
Produce a multiple pages pdf file with the image plots.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Example
|
|
66
|
-
-------
|
|
67
|
-
|
|
68
|
-
Simulate isotropic light source at different distances for the MSTN-04:
|
|
15
|
+
1. Simulate light emission with varying distances:
|
|
69
16
|
|
|
70
17
|
.. code-block:: console
|
|
71
18
|
|
|
72
19
|
simtools-simulate-light-emission --telescope MSTN-04 --site North \
|
|
73
20
|
--illuminator ILLN-01 --light_source_setup variable \
|
|
74
|
-
--model_version 6.0.0 --light_source_type led
|
|
21
|
+
--model_version 6.0.0 --light_source_type led
|
|
75
22
|
|
|
76
|
-
|
|
23
|
+
2. Simulate light emission with telescopes at fixed positions according to the layout:
|
|
77
24
|
|
|
78
25
|
.. code-block:: console
|
|
79
26
|
|
|
80
|
-
light-emission
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
27
|
+
simtools-simulate-light-emission --telescope MSTN-04 --site North \
|
|
28
|
+
--illuminator ILLN-01 --light_source_setup layout \
|
|
29
|
+
--model_version 6.0.0 \
|
|
30
|
+
--light_source_type led
|
|
31
|
+
|
|
32
|
+
Command Line Arguments
|
|
33
|
+
----------------------
|
|
34
|
+
telescope (str, required)
|
|
35
|
+
Telescope model name (e.g. LSTN-01, SSTS-design, SSTS-25, ...)
|
|
36
|
+
site (str, required)
|
|
37
|
+
Site name (North or South).
|
|
38
|
+
illuminator (str, optional)
|
|
39
|
+
Illuminator in array, e.g., ILLN-01.
|
|
40
|
+
light_source_setup (str, optional)
|
|
41
|
+
Select calibration light source positioning/setup:
|
|
42
|
+
- "variable" for varying distances.
|
|
43
|
+
- "layout" for actual telescope positions.
|
|
44
|
+
model_version (str, optional)
|
|
45
|
+
Version of the simulation model.
|
|
46
|
+
light_source_type (str, optional)
|
|
47
|
+
Select calibration light source type: led (default) or laser.
|
|
48
|
+
This changes the pre-compiled (simtel_array) application that is used to run the
|
|
49
|
+
light emission package with. Currently we use xyzls (laser), and ls-beam can be
|
|
50
|
+
accessed by using the laser option.
|
|
51
|
+
off_axis_angle (float, optional)
|
|
52
|
+
Off axis angle for light source direction.
|
|
53
|
+
plot (flag, optional)
|
|
54
|
+
Produce a multiple pages pdf file with the image plots.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Example
|
|
58
|
+
-------
|
|
59
|
+
|
|
60
|
+
Simulate isotropic light source at different distances for the MSTN-04:
|
|
61
|
+
|
|
62
|
+
.. code-block:: console
|
|
63
|
+
|
|
64
|
+
simtools-simulate-light-emission --telescope MSTN-04 --site North \
|
|
65
|
+
--illuminator ILLN-01 --light_source_setup variable \
|
|
66
|
+
--model_version 6.0.0 --light_source_type led ```
|
|
67
|
+
|
|
68
|
+
Expected Output:
|
|
69
|
+
|
|
70
|
+
.. code-block:: console
|
|
71
|
+
|
|
72
|
+
light-emission package stage:
|
|
73
|
+
File '/workdir/external/simtools/simtools-output/light_emission/model/
|
|
74
|
+
atmprof_ecmwf_north_winter_fixed.dat' registered for atmospheric profile 99.
|
|
75
|
+
Atmospheric profile 99 to be read from file '/workdir/external/simtools/
|
|
76
|
+
simtools-output/light_emission/model/atmprof_ecmwf_north_winter_fixed.dat'.
|
|
77
|
+
Atmospheric profile 99 with 55 levels read from file /workdir/external/
|
|
78
|
+
simtools/simtools-output/light_emission/model/atmprof_ecmwf_north_winter_fixed.dat
|
|
79
|
+
Initialize atmosphere ranging from 0.000 to 120.000 km a.s.l.
|
|
80
|
+
IACT control parameter line: print_events 999 10 100 1000 0
|
|
81
|
+
Case 1: 1 event with 1e+10 photons.
|
|
82
|
+
Using IACT/ATMO package version 1.67 (2023-11-10) for CORSIKA 6.999
|
|
83
|
+
Output file /workdir/external/simtools/simtools-output/light_emission/xyzls.iact.gz
|
|
84
|
+
not yet created.
|
|
85
|
+
Telescope output file: '/workdir/external/simtools/simtools-output/
|
|
86
|
+
light_emission/xyzls.iact.gz'
|
|
87
|
+
....
|
|
88
|
+
....
|
|
89
|
+
Sim_telarray stage:
|
|
90
|
+
Telescope 1 triggered (1/0/0/0, mask 1), summation from 36 to 95 of 105
|
|
91
|
+
Event end data has been found.
|
|
92
|
+
Shower of 0.0000 TeV energy was seen in 1 of 1 cases.
|
|
93
|
+
Photon statistics:
|
|
94
|
+
All photons: 928518
|
|
95
|
+
Used photons: 928518
|
|
96
|
+
Not absorbed/max. Q.E.: 189560
|
|
97
|
+
Reflected on mirror: 26815
|
|
98
|
+
Camera hit: 25574
|
|
99
|
+
Pixel hit: 25574
|
|
100
|
+
Detected: 20998
|
|
101
|
+
Trigger statistics:
|
|
102
|
+
Tel. triggered: 1
|
|
103
|
+
Tel. + array: 1
|
|
104
|
+
Early readout: 0
|
|
105
|
+
Late readout: 0
|
|
106
|
+
Finish data conversion ...
|
|
107
|
+
Writing 13 histograms to output file.
|
|
117
108
|
|
|
118
109
|
"""
|
|
119
110
|
|
|
120
111
|
import logging
|
|
121
|
-
import subprocess
|
|
122
112
|
from pathlib import Path
|
|
123
113
|
|
|
124
114
|
import astropy.units as u
|
|
125
115
|
|
|
126
116
|
import simtools.utils.general as gen
|
|
127
117
|
from simtools.configuration import configurator
|
|
128
|
-
from simtools.corsika.corsika_histograms_visualize import save_figs_to_pdf
|
|
129
118
|
from simtools.model.calibration_model import CalibrationModel
|
|
130
119
|
from simtools.model.site_model import SiteModel
|
|
131
120
|
from simtools.model.telescope_model import TelescopeModel
|
|
132
121
|
from simtools.simtel.simulator_light_emission import SimulatorLightEmission
|
|
133
|
-
from simtools.visualization.visualize import plot_simtel_ctapipe
|
|
134
122
|
|
|
135
123
|
|
|
136
124
|
def _parse(label):
|
|
@@ -168,6 +156,7 @@ def _parse(label):
|
|
|
168
156
|
type=str,
|
|
169
157
|
choices=["layout", "variable"],
|
|
170
158
|
default=None,
|
|
159
|
+
required=True,
|
|
171
160
|
)
|
|
172
161
|
config.parser.add_argument(
|
|
173
162
|
"--distances_ls",
|
|
@@ -180,12 +169,7 @@ def _parse(label):
|
|
|
180
169
|
help="Illuminator in array, i.e. ILLN-design",
|
|
181
170
|
type=str,
|
|
182
171
|
default=None,
|
|
183
|
-
|
|
184
|
-
config.parser.add_argument(
|
|
185
|
-
"--telescope_file",
|
|
186
|
-
help="Telescope position file (temporary)",
|
|
187
|
-
type=str,
|
|
188
|
-
default=None,
|
|
172
|
+
required=True,
|
|
189
173
|
)
|
|
190
174
|
config.parser.add_argument(
|
|
191
175
|
"--return_cleaned",
|
|
@@ -239,27 +223,7 @@ def _parse(label):
|
|
|
239
223
|
)
|
|
240
224
|
|
|
241
225
|
|
|
242
|
-
def
|
|
243
|
-
"""
|
|
244
|
-
Convert distance list to astropy quantities.
|
|
245
|
-
|
|
246
|
-
Parameters
|
|
247
|
-
----------
|
|
248
|
-
arg: list
|
|
249
|
-
List of distances.
|
|
250
|
-
|
|
251
|
-
Returns
|
|
252
|
-
-------
|
|
253
|
-
values: list
|
|
254
|
-
List of distances as astropy quantities.
|
|
255
|
-
"""
|
|
256
|
-
try:
|
|
257
|
-
return [float(x) * u.m for x in arg]
|
|
258
|
-
except ValueError as exc:
|
|
259
|
-
raise ValueError("Distances must be numeric values") from exc
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
def default_le_configs(le_application, args_dict):
|
|
226
|
+
def light_emission_configs(le_application, args_dict):
|
|
263
227
|
"""
|
|
264
228
|
Define default light emission configurations.
|
|
265
229
|
|
|
@@ -285,18 +249,8 @@ def default_le_configs(le_application, args_dict):
|
|
|
285
249
|
"""
|
|
286
250
|
if le_application in ("xyzls", "ls-beam") and args_dict["light_source_setup"] == "variable":
|
|
287
251
|
return {
|
|
288
|
-
"x_pos": {
|
|
289
|
-
|
|
290
|
-
"unit": u.Unit("cm"),
|
|
291
|
-
"default": 0 * u.cm,
|
|
292
|
-
"names": ["x_position"],
|
|
293
|
-
},
|
|
294
|
-
"y_pos": {
|
|
295
|
-
"len": 1,
|
|
296
|
-
"unit": u.Unit("cm"),
|
|
297
|
-
"default": 0 * u.cm,
|
|
298
|
-
"names": ["y_position"],
|
|
299
|
-
},
|
|
252
|
+
"x_pos": {"len": 1, "unit": u.Unit("cm"), "default": 0 * u.cm, "names": ["x_position"]},
|
|
253
|
+
"y_pos": {"len": 1, "unit": u.Unit("cm"), "default": 0 * u.cm, "names": ["y_position"]},
|
|
300
254
|
"z_pos": {
|
|
301
255
|
"len": 1,
|
|
302
256
|
"unit": u.Unit("cm"),
|
|
@@ -310,7 +264,6 @@ def default_le_configs(le_application, args_dict):
|
|
|
310
264
|
"names": ["direction", "cx,cy,cz"],
|
|
311
265
|
},
|
|
312
266
|
}
|
|
313
|
-
|
|
314
267
|
return {}
|
|
315
268
|
|
|
316
269
|
|
|
@@ -328,13 +281,11 @@ def select_application(args_dict):
|
|
|
328
281
|
le_application: str
|
|
329
282
|
Light emission application.
|
|
330
283
|
"""
|
|
331
|
-
le_application = None
|
|
332
284
|
if args_dict["light_source_type"] == "led":
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
return le_application, args_dict["light_source_setup"]
|
|
285
|
+
return "xyzls", args_dict["light_source_setup"]
|
|
286
|
+
if args_dict["light_source_type"] == "laser":
|
|
287
|
+
return "ls-beam", args_dict["light_source_setup"]
|
|
288
|
+
return None, args_dict["light_source_setup"]
|
|
338
289
|
|
|
339
290
|
|
|
340
291
|
def main():
|
|
@@ -342,7 +293,8 @@ def main():
|
|
|
342
293
|
label = Path(__file__).stem
|
|
343
294
|
args_dict, db_config = _parse(label)
|
|
344
295
|
le_application = select_application(args_dict)
|
|
345
|
-
|
|
296
|
+
light_emission_config = light_emission_configs(le_application[0], args_dict)
|
|
297
|
+
|
|
346
298
|
logger = logging.getLogger()
|
|
347
299
|
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
348
300
|
|
|
@@ -369,105 +321,21 @@ def main():
|
|
|
369
321
|
label=label,
|
|
370
322
|
)
|
|
371
323
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
calibration_model=calibration_model,
|
|
383
|
-
site_model=site_model,
|
|
384
|
-
default_le_config=le_config,
|
|
385
|
-
le_application=le_application,
|
|
386
|
-
simtel_path=args_dict["simtel_path"],
|
|
387
|
-
light_source_type=args_dict["light_source_type"],
|
|
388
|
-
)
|
|
389
|
-
run_script = light_source.prepare_script(generate_postscript=True, **args_dict)
|
|
390
|
-
log_file = f"{light_source.output_directory}/logfile.log"
|
|
391
|
-
with open(log_file, "w", encoding="utf-8") as log_file:
|
|
392
|
-
subprocess.run(
|
|
393
|
-
run_script,
|
|
394
|
-
shell=False,
|
|
395
|
-
check=False,
|
|
396
|
-
text=True,
|
|
397
|
-
stdout=log_file,
|
|
398
|
-
stderr=log_file,
|
|
399
|
-
)
|
|
400
|
-
|
|
401
|
-
try:
|
|
402
|
-
filename = (
|
|
403
|
-
f"{light_source.output_directory}/"
|
|
404
|
-
f"{light_source.le_application[0]}_"
|
|
405
|
-
f"{light_source.le_application[1]}.simtel.gz"
|
|
406
|
-
)
|
|
407
|
-
fig = plot_simtel_ctapipe(
|
|
408
|
-
filename,
|
|
409
|
-
cleaning_args=[
|
|
410
|
-
args_dict["boundary_thresh"],
|
|
411
|
-
args_dict["picture_thresh"],
|
|
412
|
-
args_dict["min_neighbors"],
|
|
413
|
-
],
|
|
414
|
-
distance=light_source.default_le_config["z_pos"]["default"],
|
|
415
|
-
return_cleaned=args_dict["return_cleaned"],
|
|
416
|
-
)
|
|
417
|
-
figures.append(fig)
|
|
418
|
-
except AttributeError:
|
|
419
|
-
msg = "telescope not triggered at distance of"
|
|
420
|
-
msg += f"{light_source.distance.to(u.meter)}"
|
|
421
|
-
logger.warning(msg)
|
|
422
|
-
|
|
423
|
-
save_figs_to_pdf(
|
|
424
|
-
figures,
|
|
425
|
-
f"{light_source.output_directory}/{args_dict['telescope']}_"
|
|
426
|
-
f"{light_source.le_application[0]}_"
|
|
427
|
-
f"{light_source.le_application[1]}.pdf",
|
|
428
|
-
)
|
|
324
|
+
light_source = SimulatorLightEmission(
|
|
325
|
+
telescope_model=telescope_model,
|
|
326
|
+
calibration_model=calibration_model,
|
|
327
|
+
site_model=site_model,
|
|
328
|
+
light_emission_config=light_emission_config,
|
|
329
|
+
le_application=le_application,
|
|
330
|
+
simtel_path=args_dict["simtel_path"],
|
|
331
|
+
light_source_type=args_dict["light_source_type"],
|
|
332
|
+
label=label,
|
|
333
|
+
)
|
|
429
334
|
|
|
335
|
+
if args_dict["light_source_setup"] == "variable":
|
|
336
|
+
light_source.simulate_variable_distances(args_dict)
|
|
430
337
|
elif args_dict["light_source_setup"] == "layout":
|
|
431
|
-
light_source
|
|
432
|
-
telescope_model=telescope_model,
|
|
433
|
-
calibration_model=calibration_model,
|
|
434
|
-
site_model=site_model,
|
|
435
|
-
default_le_config=default_le_config,
|
|
436
|
-
le_application=le_application,
|
|
437
|
-
simtel_path=args_dict["simtel_path"],
|
|
438
|
-
light_source_type=args_dict["light_source_type"],
|
|
439
|
-
)
|
|
440
|
-
run_script = light_source.prepare_script(generate_postscript=True, **args_dict)
|
|
441
|
-
log_file = f"{light_source.output_directory}/logfile.log"
|
|
442
|
-
with open(log_file, "w", encoding="utf-8") as log_file:
|
|
443
|
-
subprocess.run(
|
|
444
|
-
run_script, shell=False, check=False, text=True, stdout=log_file, stderr=log_file
|
|
445
|
-
)
|
|
446
|
-
try:
|
|
447
|
-
filename = (
|
|
448
|
-
f"{light_source.output_directory}/"
|
|
449
|
-
f"{light_source.le_application[0]}_{light_source.le_application[1]}.simtel.gz"
|
|
450
|
-
)
|
|
451
|
-
fig = plot_simtel_ctapipe(
|
|
452
|
-
filename,
|
|
453
|
-
cleaning_args=[
|
|
454
|
-
args_dict["boundary_thresh"],
|
|
455
|
-
args_dict["picture_thresh"],
|
|
456
|
-
args_dict["min_neighbors"],
|
|
457
|
-
],
|
|
458
|
-
distance=light_source.distance,
|
|
459
|
-
return_cleaned=args_dict["return_cleaned"],
|
|
460
|
-
)
|
|
461
|
-
except AttributeError:
|
|
462
|
-
msg = f"telescope not triggered at distance of {light_source.distance.to(u.meter)}"
|
|
463
|
-
logger.warning(msg)
|
|
464
|
-
|
|
465
|
-
save_figs_to_pdf(
|
|
466
|
-
[fig],
|
|
467
|
-
f"{light_source.output_directory}/{args_dict['telescope']}_"
|
|
468
|
-
f"{light_source.le_application[0]}_"
|
|
469
|
-
f"{light_source.le_application[1]}.pdf",
|
|
470
|
-
)
|
|
338
|
+
light_source.simulate_layout_positions(args_dict)
|
|
471
339
|
|
|
472
340
|
|
|
473
341
|
if __name__ == "__main__":
|
|
@@ -17,8 +17,8 @@ to the 'output_path' directory, with 'simtools-output' and 'logs' subdirectories
|
|
|
17
17
|
|
|
18
18
|
Requirements for the 'simtools-simulate-prod-htcondor-generator' application:
|
|
19
19
|
|
|
20
|
-
- Availability of an Apptainer image
|
|
21
|
-
GitHub, e.g., via 'apptainer pull --force docker://ghcr.io/gammasim/simtools
|
|
20
|
+
- Availability of an Apptainer image for production (obtainable from the package registry on
|
|
21
|
+
GitHub, e.g., via 'apptainer pull --force docker://ghcr.io/gammasim/simtools-<tag>:latest').
|
|
22
22
|
- Environment parameters required to run CORSIKA and sim_telarray, as well as DB access
|
|
23
23
|
credentials. These should be listed similarly to a '.env' file and copied to
|
|
24
24
|
'output_path/env.txt'. Ensure that the path to the simulation software is correctly set to
|
|
@@ -85,8 +85,9 @@ def _parse(label, description):
|
|
|
85
85
|
)
|
|
86
86
|
config.parser.add_argument(
|
|
87
87
|
"--input_meta",
|
|
88
|
-
help="meta data file associated to input data",
|
|
88
|
+
help="meta data file(s) associated to input data (wildcards or list of files allowed)",
|
|
89
89
|
type=str,
|
|
90
|
+
nargs="+",
|
|
90
91
|
required=False,
|
|
91
92
|
)
|
|
92
93
|
config.parser.add_argument(
|