gammasimtools 0.8.1__py3-none-any.whl → 0.9.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.8.1.dist-info → gammasimtools-0.9.0.dist-info}/METADATA +4 -3
- gammasimtools-0.9.0.dist-info/RECORD +350 -0
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/WHEEL +1 -1
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/entry_points.txt +2 -0
- simtools/_dev_version/__init__.py +9 -0
- simtools/_version.py +2 -2
- simtools/applications/convert_all_model_parameters_from_simtel.py +1 -1
- simtools/applications/convert_geo_coordinates_of_array_elements.py +8 -9
- simtools/applications/convert_model_parameter_from_simtel.py +1 -1
- simtools/applications/db_add_model_parameters_from_repository_to_db.py +2 -10
- simtools/applications/db_add_value_from_json_to_db.py +1 -9
- simtools/applications/db_get_array_layouts_from_db.py +3 -1
- simtools/applications/db_get_parameter_from_db.py +1 -1
- simtools/applications/derive_mirror_rnda.py +10 -1
- simtools/applications/derive_psf_parameters.py +1 -1
- simtools/applications/generate_array_config.py +1 -5
- simtools/applications/generate_regular_arrays.py +9 -6
- simtools/applications/generate_simtel_array_histograms.py +1 -1
- simtools/applications/plot_array_layout.py +3 -1
- simtools/applications/plot_tabular_data.py +84 -0
- simtools/applications/production_scale_events.py +1 -2
- simtools/applications/simulate_light_emission.py +2 -2
- simtools/applications/simulate_prod.py +24 -59
- simtools/applications/simulate_prod_htcondor_generator.py +95 -0
- simtools/applications/submit_data_from_external.py +1 -1
- simtools/applications/validate_camera_efficiency.py +1 -1
- simtools/applications/validate_camera_fov.py +4 -8
- simtools/applications/validate_cumulative_psf.py +3 -7
- simtools/applications/validate_file_using_schema.py +31 -23
- simtools/applications/validate_optics.py +3 -4
- simtools/camera_efficiency.py +1 -4
- simtools/configuration/commandline_parser.py +9 -15
- simtools/configuration/configurator.py +6 -19
- simtools/constants.py +3 -3
- simtools/data_model/metadata_collector.py +19 -1
- simtools/data_model/metadata_model.py +18 -5
- simtools/data_model/model_data_writer.py +1 -1
- simtools/data_model/validate_data.py +67 -10
- simtools/db/db_handler.py +92 -315
- simtools/io_operations/legacy_data_handler.py +61 -0
- simtools/job_execution/htcondor_script_generator.py +133 -0
- simtools/job_execution/job_manager.py +77 -50
- simtools/model/array_model.py +30 -26
- simtools/model/calibration_model.py +10 -10
- simtools/model/camera.py +79 -63
- simtools/model/mirrors.py +8 -6
- simtools/model/model_parameter.py +42 -12
- simtools/model/model_utils.py +6 -6
- simtools/model/site_model.py +2 -2
- simtools/model/telescope_model.py +26 -22
- simtools/ray_tracing/mirror_panel_psf.py +47 -27
- simtools/runners/corsika_runner.py +14 -3
- simtools/runners/runner_services.py +3 -3
- simtools/runners/simtel_runner.py +27 -8
- simtools/schemas/integration_tests_config.metaschema.yml +15 -5
- simtools/schemas/model_parameter.metaschema.yml +90 -2
- 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 +1 -1
- simtools/schemas/model_parameters/array_element_position_ground.schema.yml +1 -1
- simtools/schemas/model_parameters/array_element_position_utm.schema.yml +1 -1
- simtools/schemas/model_parameters/array_layouts.schema.yml +1 -1
- simtools/schemas/model_parameters/array_triggers.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/atmospheric_transmission.schema.yml +1 -1
- simtools/schemas/model_parameters/axes_offsets.schema.yml +1 -1
- 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_filter_incidence_angle.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/correct_nsb_spectrum_to_telescope_altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_cherenkov_photon_bunch_size.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_cherenkov_photon_wavelength_range.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_first_interaction_height.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_longitudinal_shower_development.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_observation_level.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_particle_kinetic_energy_cutoff.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_starting_grammage.schema.yml +1 -1
- simtools/schemas/model_parameters/dark_events.schema.yml +1 -1
- simtools/schemas/model_parameters/default_trigger.schema.yml +1 -1
- simtools/schemas/model_parameters/design_model.schema.yml +1 -1
- simtools/schemas/model_parameters/disc_ac_coupled.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_pulse_shape.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_pedsub.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_pre_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_prescale.schema.yml +1 -1
- 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_shaping_renormalize.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 +32 -2
- simtools/schemas/model_parameters/epsg_code.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_ac_coupled.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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_pulse_shape.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/flatfielding.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_surface_parameters.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_surface_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/focus_offset.schema.yml +1 -1
- 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 +1 -1
- simtools/schemas/model_parameters/mirror_align_random_vertical.schema.yml +1 -1
- 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 +1 -1
- simtools/schemas/model_parameters/mirror_reflection_random_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_reflectivity.schema.yml +1 -1
- simtools/schemas/model_parameters/multiplicity_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_autoscale_airmass.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_gain_drop_scale.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_offaxis.schema.yml +1 -1
- 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 +1 -1
- simtools/schemas/model_parameters/nsb_spectrum.schema.yml +1 -1
- simtools/schemas/model_parameters/num_gains.schema.yml +1 -1
- simtools/schemas/model_parameters/only_triggered_telescopes.schema.yml +1 -1
- simtools/schemas/model_parameters/optics_properties.schema.yml +1 -1
- simtools/schemas/model_parameters/parabolic_dish.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_photoelectron_spectrum.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_transit_time.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_voltage_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_degraded_map.schema.yml +1 -1
- 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_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_parameters.schema.yml +1 -1
- 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/quantum_efficiency.schema.yml +1 -1
- simtools/schemas/model_parameters/random_focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/random_generator.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_latitude.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_longitude.schema.yml +1 -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/sampled_output.schema.yml +1 -1
- simtools/schemas/model_parameters/save_pe_with_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_baffle.schema.yml +1 -1
- 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_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_parameters.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_reflectivity.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/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 +1 -1
- 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 +1 -1
- simtools/schemas/model_parameters/trigger_pixels.schema.yml +1 -1
- simtools/simtel/simtel_table_reader.py +410 -0
- simtools/simtel/simulator_camera_efficiency.py +6 -4
- simtools/simtel/simulator_light_emission.py +2 -2
- simtools/simtel/simulator_ray_tracing.py +1 -2
- simtools/simulator.py +80 -33
- simtools/testing/configuration.py +12 -8
- simtools/testing/helpers.py +5 -5
- simtools/testing/validate_output.py +28 -28
- simtools/utils/general.py +50 -3
- simtools/utils/names.py +3 -4
- simtools/utils/value_conversion.py +9 -1
- simtools/version.py +1 -1
- simtools/visualization/plot_tables.py +106 -0
- simtools/visualization/visualize.py +43 -5
- gammasimtools-0.8.1.dist-info/RECORD +0 -346
- simtools/_dev_version/scm_version.py +0 -10
- simtools/db/db_from_repo_handler.py +0 -106
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/LICENSE +0 -0
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""MC model of a telescope."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
+
from pathlib import Path
|
|
4
5
|
|
|
5
6
|
import astropy.io.ascii
|
|
6
7
|
import numpy as np
|
|
@@ -31,23 +32,20 @@ class TelescopeModel(ModelParameter):
|
|
|
31
32
|
MongoDB configuration.
|
|
32
33
|
model_version: str
|
|
33
34
|
Model version.
|
|
34
|
-
label: str
|
|
35
|
+
label: str, optional
|
|
35
36
|
Instance label. Important for output file naming.
|
|
36
37
|
"""
|
|
37
38
|
|
|
38
39
|
def __init__(
|
|
39
40
|
self,
|
|
40
|
-
site,
|
|
41
|
-
telescope_name,
|
|
42
|
-
mongo_db_config,
|
|
43
|
-
model_version,
|
|
44
|
-
label=None,
|
|
41
|
+
site: str,
|
|
42
|
+
telescope_name: str,
|
|
43
|
+
mongo_db_config: dict,
|
|
44
|
+
model_version: str,
|
|
45
|
+
label: str | None = None,
|
|
45
46
|
):
|
|
46
47
|
"""Initialize TelescopeModel."""
|
|
47
|
-
|
|
48
|
-
self._logger.debug("Init TelescopeModel %s %s", site, telescope_name)
|
|
49
|
-
ModelParameter.__init__(
|
|
50
|
-
self,
|
|
48
|
+
super().__init__(
|
|
51
49
|
site=site,
|
|
52
50
|
array_element_name=telescope_name,
|
|
53
51
|
mongo_db_config=mongo_db_config,
|
|
@@ -56,6 +54,9 @@ class TelescopeModel(ModelParameter):
|
|
|
56
54
|
label=label,
|
|
57
55
|
)
|
|
58
56
|
|
|
57
|
+
self._logger = logging.getLogger(__name__)
|
|
58
|
+
self._logger.debug("Init TelescopeModel %s %s", site, telescope_name)
|
|
59
|
+
|
|
59
60
|
self._single_mirror_list_file_paths = None
|
|
60
61
|
self._mirrors = None
|
|
61
62
|
self._camera = None
|
|
@@ -74,7 +75,7 @@ class TelescopeModel(ModelParameter):
|
|
|
74
75
|
self._load_camera()
|
|
75
76
|
return self._camera
|
|
76
77
|
|
|
77
|
-
def export_single_mirror_list_file(self, mirror_number, set_focal_length_to_zero):
|
|
78
|
+
def export_single_mirror_list_file(self, mirror_number: int, set_focal_length_to_zero: bool):
|
|
78
79
|
"""
|
|
79
80
|
Export a mirror list file with a single mirror in it.
|
|
80
81
|
|
|
@@ -107,7 +108,9 @@ class TelescopeModel(ModelParameter):
|
|
|
107
108
|
set_focal_length_to_zero,
|
|
108
109
|
)
|
|
109
110
|
|
|
110
|
-
def get_single_mirror_list_file(
|
|
111
|
+
def get_single_mirror_list_file(
|
|
112
|
+
self, mirror_number: int, set_focal_length_to_zero: bool = False
|
|
113
|
+
):
|
|
111
114
|
"""
|
|
112
115
|
Get the path to the single mirror list file.
|
|
113
116
|
|
|
@@ -143,7 +146,9 @@ class TelescopeModel(ModelParameter):
|
|
|
143
146
|
|
|
144
147
|
self._mirrors = Mirrors(mirror_list_file, parameters=self._parameters)
|
|
145
148
|
|
|
146
|
-
def get_telescope_effective_focal_length(
|
|
149
|
+
def get_telescope_effective_focal_length(
|
|
150
|
+
self, unit: str = "m", return_focal_length_if_zero: bool = False
|
|
151
|
+
) -> float:
|
|
147
152
|
"""
|
|
148
153
|
Return effective focal length.
|
|
149
154
|
|
|
@@ -160,7 +165,6 @@ class TelescopeModel(ModelParameter):
|
|
|
160
165
|
-------
|
|
161
166
|
float:
|
|
162
167
|
Effective focal length.
|
|
163
|
-
|
|
164
168
|
"""
|
|
165
169
|
try:
|
|
166
170
|
eff_focal_length = self.get_parameter_value_with_unit("effective_focal_length")[0]
|
|
@@ -200,7 +204,7 @@ class TelescopeModel(ModelParameter):
|
|
|
200
204
|
focal_length=focal_length,
|
|
201
205
|
)
|
|
202
206
|
|
|
203
|
-
def is_file_2d(self, par):
|
|
207
|
+
def is_file_2d(self, par: str) -> bool:
|
|
204
208
|
"""
|
|
205
209
|
Check if the file referenced by par is a 2D table.
|
|
206
210
|
|
|
@@ -212,7 +216,7 @@ class TelescopeModel(ModelParameter):
|
|
|
212
216
|
Returns
|
|
213
217
|
-------
|
|
214
218
|
bool:
|
|
215
|
-
True if the file is a 2D map type
|
|
219
|
+
True if the file is a 2D map type.
|
|
216
220
|
"""
|
|
217
221
|
try:
|
|
218
222
|
file_name = self.get_parameter_value(par)
|
|
@@ -224,7 +228,7 @@ class TelescopeModel(ModelParameter):
|
|
|
224
228
|
with open(file, encoding="utf-8") as f:
|
|
225
229
|
return "@RPOL@" in f.read()
|
|
226
230
|
|
|
227
|
-
def read_two_dim_wavelength_angle(self, file_name):
|
|
231
|
+
def read_two_dim_wavelength_angle(self, file_name: str | Path) -> dict:
|
|
228
232
|
"""
|
|
229
233
|
Read a two dimensional distribution of wavelength and angle (z-axis can be anything).
|
|
230
234
|
|
|
@@ -259,7 +263,7 @@ class TelescopeModel(ModelParameter):
|
|
|
259
263
|
"z": np.array(_data[:, 1:]).T,
|
|
260
264
|
}
|
|
261
265
|
|
|
262
|
-
def get_on_axis_eff_optical_area(self):
|
|
266
|
+
def get_on_axis_eff_optical_area(self) -> float:
|
|
263
267
|
"""Return the on-axis effective optical area (derived previously for this telescope)."""
|
|
264
268
|
ray_tracing_data = astropy.io.ascii.read(
|
|
265
269
|
self.config_file_directory.joinpath(self.get_parameter_value("optics_properties"))
|
|
@@ -272,7 +276,7 @@ class TelescopeModel(ModelParameter):
|
|
|
272
276
|
raise ValueError
|
|
273
277
|
return ray_tracing_data["eff_area"][0]
|
|
274
278
|
|
|
275
|
-
def read_incidence_angle_distribution(self, incidence_angle_dist_file):
|
|
279
|
+
def read_incidence_angle_distribution(self, incidence_angle_dist_file: str) -> Table:
|
|
276
280
|
"""
|
|
277
281
|
Read the incidence angle distribution from a file.
|
|
278
282
|
|
|
@@ -293,7 +297,7 @@ class TelescopeModel(ModelParameter):
|
|
|
293
297
|
return astropy.io.ascii.read(self.config_file_directory.joinpath(incidence_angle_dist_file))
|
|
294
298
|
|
|
295
299
|
@staticmethod
|
|
296
|
-
def calc_average_curve(curves, incidence_angle_dist):
|
|
300
|
+
def calc_average_curve(curves: dict, incidence_angle_dist: Table) -> Table:
|
|
297
301
|
"""
|
|
298
302
|
Calculate an average curve from a set of curves.
|
|
299
303
|
|
|
@@ -328,7 +332,7 @@ class TelescopeModel(ModelParameter):
|
|
|
328
332
|
names=("Wavelength", "z"),
|
|
329
333
|
)
|
|
330
334
|
|
|
331
|
-
def export_table_to_model_directory(self, file_name, table):
|
|
335
|
+
def export_table_to_model_directory(self, file_name: str, table: Table) -> str:
|
|
332
336
|
"""
|
|
333
337
|
Write out a file with the provided table to the model directory.
|
|
334
338
|
|
|
@@ -348,7 +352,7 @@ class TelescopeModel(ModelParameter):
|
|
|
348
352
|
table.write(file_to_write_to, format="ascii.commented_header", overwrite=True)
|
|
349
353
|
return file_to_write_to.absolute()
|
|
350
354
|
|
|
351
|
-
def position(self, coordinate_system="ground"):
|
|
355
|
+
def position(self, coordinate_system: str = "ground") -> list:
|
|
352
356
|
"""
|
|
353
357
|
Get coordinates in the given system.
|
|
354
358
|
|
|
@@ -138,43 +138,63 @@ class MirrorPanelPSF:
|
|
|
138
138
|
self.rnda_opt, save_figures=save_figures
|
|
139
139
|
)
|
|
140
140
|
|
|
141
|
-
def _optimize_reflection_angle(self, step_size=0.1):
|
|
142
|
-
"""
|
|
141
|
+
def _optimize_reflection_angle(self, step_size=0.1, max_iteration=100):
|
|
142
|
+
"""
|
|
143
|
+
Optimize the random reflection angle to minimize the difference in D80 containment.
|
|
144
|
+
|
|
145
|
+
Parameters
|
|
146
|
+
----------
|
|
147
|
+
step_size: float
|
|
148
|
+
Initial step size for optimization.
|
|
149
|
+
max_iteration: int
|
|
150
|
+
Maximum number of iterations.
|
|
151
|
+
|
|
152
|
+
Raises
|
|
153
|
+
------
|
|
154
|
+
ValueError
|
|
155
|
+
If the optimization reaches the maximum number of iterations without converging.
|
|
156
|
+
|
|
157
|
+
"""
|
|
158
|
+
relative_tolerance_d80 = self.args_dict["rtol_psf_containment"]
|
|
159
|
+
self._logger.info(
|
|
160
|
+
"Optimizing random reflection angle "
|
|
161
|
+
f"(relative tolerance = {relative_tolerance_d80}, "
|
|
162
|
+
f"step size = {step_size}, max iteration = {max_iteration})"
|
|
163
|
+
)
|
|
143
164
|
|
|
144
165
|
def collect_results(rnda, mean, sig):
|
|
145
166
|
self.results_rnda.append(rnda)
|
|
146
167
|
self.results_mean.append(mean)
|
|
147
168
|
self.results_sig.append(sig)
|
|
148
169
|
|
|
149
|
-
|
|
150
|
-
mean_d80, sig_d80 = self.run_simulations_and_analysis(self.rnda_start)
|
|
170
|
+
reference_d80 = self.args_dict["psf_measurement_containment_mean"]
|
|
151
171
|
rnda = self.rnda_start
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if rnda < 0:
|
|
157
|
-
rnda = 0
|
|
158
|
-
collect_results(rnda, mean_d80, sig_d80)
|
|
159
|
-
break
|
|
172
|
+
prev_error_d80 = float("inf")
|
|
173
|
+
iteration = 0
|
|
174
|
+
|
|
175
|
+
while True:
|
|
160
176
|
mean_d80, sig_d80 = self.run_simulations_and_analysis(rnda)
|
|
161
|
-
|
|
162
|
-
stop = new_sign_delta != sign_delta
|
|
163
|
-
sign_delta = new_sign_delta
|
|
177
|
+
error_d80 = abs(1 - mean_d80 / reference_d80)
|
|
164
178
|
collect_results(rnda, mean_d80, sig_d80)
|
|
165
179
|
|
|
166
|
-
|
|
180
|
+
if error_d80 < relative_tolerance_d80:
|
|
181
|
+
break
|
|
182
|
+
|
|
183
|
+
if mean_d80 < reference_d80:
|
|
184
|
+
rnda += step_size * self.rnda_start
|
|
185
|
+
else:
|
|
186
|
+
rnda -= step_size * self.rnda_start
|
|
167
187
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
188
|
+
if error_d80 >= prev_error_d80:
|
|
189
|
+
step_size = step_size / 2
|
|
190
|
+
prev_error_d80 = error_d80
|
|
191
|
+
iteration += 1
|
|
192
|
+
if iteration > max_iteration:
|
|
193
|
+
raise ValueError(
|
|
194
|
+
f"Maximum iterations ({max_iteration}) reached without convergence."
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
self.rnda_opt = rnda
|
|
178
198
|
|
|
179
199
|
def _get_starting_value(self):
|
|
180
200
|
"""Get optimization starting value from command line or previous model."""
|
|
@@ -275,6 +295,6 @@ class MirrorPanelPSF:
|
|
|
275
295
|
)
|
|
276
296
|
writer.ModelDataWriter.dump(
|
|
277
297
|
args_dict=self.args_dict,
|
|
278
|
-
metadata=MetadataCollector(args_dict=self.args_dict).
|
|
298
|
+
metadata=MetadataCollector(args_dict=self.args_dict).get_top_level_metadata(),
|
|
279
299
|
product_data=result_table,
|
|
280
300
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Generate run scripts and directories for CORSIKA simulations."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
import
|
|
4
|
+
import stat
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
from simtools.io_operations import io_handler
|
|
@@ -99,6 +99,15 @@ class CorsikaRunner:
|
|
|
99
99
|
file_type="config_tmp", run_number=self.corsika_config.run_number
|
|
100
100
|
)
|
|
101
101
|
corsika_input_tmp_file = self._directory["inputs"].joinpath(corsika_input_tmp_name)
|
|
102
|
+
# CORSIKA log file naming (temporary and final)
|
|
103
|
+
corsika_log_tmp_file = (
|
|
104
|
+
self._directory["data"]
|
|
105
|
+
.joinpath(f"run{self.corsika_config.run_number:06}")
|
|
106
|
+
.joinpath(f"run{self.corsika_config.run_number}.log")
|
|
107
|
+
)
|
|
108
|
+
corsika_log_file = self.get_file_name(
|
|
109
|
+
file_type="corsika_log", run_number=self.corsika_config.run_number
|
|
110
|
+
)
|
|
102
111
|
|
|
103
112
|
if use_pfp:
|
|
104
113
|
pfp_command = self._get_pfp_command(corsika_input_tmp_file, corsika_input_file)
|
|
@@ -138,11 +147,13 @@ class CorsikaRunner:
|
|
|
138
147
|
file.write(f"cp {corsika_input_file} {corsika_input_tmp_file}")
|
|
139
148
|
file.write("\n# Running corsika_autoinputs\n")
|
|
140
149
|
file.write(autoinputs_command)
|
|
150
|
+
file.write("\n# Moving log files to the corsika log directory\n")
|
|
151
|
+
file.write(f"gzip {corsika_log_tmp_file}\n")
|
|
152
|
+
file.write(f"mv -v {corsika_log_tmp_file}.gz {corsika_log_file}\n")
|
|
141
153
|
|
|
142
154
|
file.write('\necho "RUNTIME: $SECONDS"\n')
|
|
143
155
|
|
|
144
|
-
|
|
145
|
-
|
|
156
|
+
script_file_path.chmod(script_file_path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP)
|
|
146
157
|
return script_file_path
|
|
147
158
|
|
|
148
159
|
def get_resources(self, run_number=None):
|
|
@@ -163,6 +163,7 @@ class RunnerServices:
|
|
|
163
163
|
log_suffixes = {
|
|
164
164
|
"log": ".log.gz",
|
|
165
165
|
"histogram": ".hdata.zst",
|
|
166
|
+
"corsika_log": ".corsika.log.gz",
|
|
166
167
|
}
|
|
167
168
|
return self.directory["logs"].joinpath(f"{file_name}{log_suffixes[file_type]}")
|
|
168
169
|
|
|
@@ -187,7 +188,6 @@ class RunnerServices:
|
|
|
187
188
|
data_suffixes = {
|
|
188
189
|
"output": ".zst",
|
|
189
190
|
"corsika_output": ".zst",
|
|
190
|
-
"corsika_log": ".log",
|
|
191
191
|
"simtel_output": ".simtel.zst",
|
|
192
192
|
}
|
|
193
193
|
run_dir = self._get_run_number_string(run_number)
|
|
@@ -245,10 +245,10 @@ class RunnerServices:
|
|
|
245
245
|
"""
|
|
246
246
|
file_name = self._get_file_basename(run_number)
|
|
247
247
|
|
|
248
|
-
if file_type in ["log", "histogram"]:
|
|
248
|
+
if file_type in ["log", "histogram", "corsika_log"]:
|
|
249
249
|
return self._get_log_file_path(file_type, file_name)
|
|
250
250
|
|
|
251
|
-
if file_type in ["output", "corsika_output", "
|
|
251
|
+
if file_type in ["output", "corsika_output", "simtel_output"]:
|
|
252
252
|
return self._get_data_file_path(file_type, file_name, run_number)
|
|
253
253
|
|
|
254
254
|
if file_type in ("sub_log", "sub_script"):
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""Base class for running sim_telarray simulations."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
import
|
|
4
|
+
import stat
|
|
5
|
+
import subprocess
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
|
|
7
8
|
import simtools.utils.general as gen
|
|
@@ -96,7 +97,7 @@ class SimtelRunner:
|
|
|
96
97
|
|
|
97
98
|
file.write('\necho "RUNTIME: $SECONDS"\n')
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
script_file_path.chmod(script_file_path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP)
|
|
100
101
|
return script_file_path
|
|
101
102
|
|
|
102
103
|
def run(self, test=False, input_file=None, run_number=None):
|
|
@@ -114,15 +115,17 @@ class SimtelRunner:
|
|
|
114
115
|
"""
|
|
115
116
|
self._logger.debug("Running sim_telarray")
|
|
116
117
|
|
|
117
|
-
command = self._make_run_command(
|
|
118
|
+
command, stdout_file, stderr_file = self._make_run_command(
|
|
119
|
+
run_number=run_number, input_file=input_file
|
|
120
|
+
)
|
|
118
121
|
|
|
119
122
|
if test:
|
|
120
123
|
self._logger.info(f"Running (test) with command: {command}")
|
|
121
|
-
self._run_simtel_and_check_output(command)
|
|
124
|
+
self._run_simtel_and_check_output(command, stdout_file, stderr_file)
|
|
122
125
|
else:
|
|
123
126
|
self._logger.debug(f"Running ({self.runs_per_set}x) with command: {command}")
|
|
124
127
|
for _ in range(self.runs_per_set):
|
|
125
|
-
self._run_simtel_and_check_output(command)
|
|
128
|
+
self._run_simtel_and_check_output(command, stdout_file, stderr_file)
|
|
126
129
|
|
|
127
130
|
self._check_run_result(run_number=run_number)
|
|
128
131
|
|
|
@@ -148,7 +151,7 @@ class SimtelRunner:
|
|
|
148
151
|
self._logger.error(msg)
|
|
149
152
|
raise SimtelExecutionError(msg)
|
|
150
153
|
|
|
151
|
-
def _run_simtel_and_check_output(self, command):
|
|
154
|
+
def _run_simtel_and_check_output(self, command, stdout_file, stderr_file):
|
|
152
155
|
"""
|
|
153
156
|
Run the sim_telarray command and check the exit code.
|
|
154
157
|
|
|
@@ -157,8 +160,24 @@ class SimtelRunner:
|
|
|
157
160
|
SimtelExecutionError
|
|
158
161
|
if run was not successful.
|
|
159
162
|
"""
|
|
160
|
-
if
|
|
163
|
+
stdout_file = stdout_file if stdout_file else "/dev/null"
|
|
164
|
+
stderr_file = stderr_file if stderr_file else "/dev/null"
|
|
165
|
+
with (
|
|
166
|
+
open(f"{stdout_file}", "w", encoding="utf-8") as stdout,
|
|
167
|
+
open(f"{stderr_file}", "w", encoding="utf-8") as stderr,
|
|
168
|
+
):
|
|
169
|
+
result = subprocess.run(
|
|
170
|
+
command,
|
|
171
|
+
shell=True,
|
|
172
|
+
text=True,
|
|
173
|
+
stdout=stdout,
|
|
174
|
+
stderr=stderr,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
if result.returncode != 0:
|
|
178
|
+
self._logger.error(result.stderr)
|
|
161
179
|
self._raise_simtel_error()
|
|
180
|
+
return result.returncode
|
|
162
181
|
|
|
163
182
|
def _make_run_command(self, run_number=None, input_file=None):
|
|
164
183
|
self._logger.debug(
|
|
@@ -167,7 +186,7 @@ class SimtelRunner:
|
|
|
167
186
|
)
|
|
168
187
|
input_file = input_file if input_file else "nofile"
|
|
169
188
|
run_number = run_number if run_number else 1
|
|
170
|
-
return f"{input_file}-{run_number}"
|
|
189
|
+
return f"{input_file}-{run_number}", None, None
|
|
171
190
|
|
|
172
191
|
@staticmethod
|
|
173
192
|
def get_config_option(par, value=None, weak_option=False):
|
|
@@ -3,7 +3,7 @@ $schema: http://json-schema.org/draft-06/schema#
|
|
|
3
3
|
$ref: '#/definitions/SimtoolsIntegrationTestConfiguration'
|
|
4
4
|
title: SimPipe integration test configuration metaschema
|
|
5
5
|
description: YAML representation of integration test configuration metaschema
|
|
6
|
-
version: 0.
|
|
6
|
+
version: 0.2.0
|
|
7
7
|
name: integration_tests_config.metaschema
|
|
8
8
|
type: object
|
|
9
9
|
additionalProperties: false
|
|
@@ -60,6 +60,20 @@ definitions:
|
|
|
60
60
|
description: |
|
|
61
61
|
"Path of output file tested to be generated by integration test."
|
|
62
62
|
type: string
|
|
63
|
+
TEST_OUTPUT_FILES:
|
|
64
|
+
type: array
|
|
65
|
+
items:
|
|
66
|
+
type: object
|
|
67
|
+
properties:
|
|
68
|
+
PATH_DESCRIPTOR:
|
|
69
|
+
type: string
|
|
70
|
+
FILE:
|
|
71
|
+
type: string
|
|
72
|
+
EXPECTED_OUTPUT:
|
|
73
|
+
description: |
|
|
74
|
+
"Expected output of integration test."
|
|
75
|
+
type: object
|
|
76
|
+
required: ["PATH_DESCRIPTOR", "FILE"]
|
|
63
77
|
FILE_TYPE:
|
|
64
78
|
description: |
|
|
65
79
|
"Expected file type of output file generated by integration test."
|
|
@@ -68,10 +82,6 @@ definitions:
|
|
|
68
82
|
description: |
|
|
69
83
|
"Reference file used for comparison."
|
|
70
84
|
type: string
|
|
71
|
-
EXPECTED_OUTPUT:
|
|
72
|
-
description: |
|
|
73
|
-
"Expected output of integration test."
|
|
74
|
-
type: object
|
|
75
85
|
TOLERANCE:
|
|
76
86
|
description: "Allowed tolerance for floating point comparison."
|
|
77
87
|
type: number
|
|
@@ -2,12 +2,99 @@
|
|
|
2
2
|
$schema: http://json-schema.org/draft-06/schema#
|
|
3
3
|
$ref: '#/definitions/SimtoolsModelParameters'
|
|
4
4
|
title: SimPipe DB Model Parameter Metaschema
|
|
5
|
-
description:
|
|
6
|
-
|
|
5
|
+
description: |
|
|
6
|
+
YAML representation of db model parameter metaschema
|
|
7
|
+
(based on simulation model DB).
|
|
8
|
+
version: 0.2.0
|
|
7
9
|
name: modelparameter.metaschema
|
|
8
10
|
type: object
|
|
9
11
|
additionalProperties: false
|
|
10
12
|
|
|
13
|
+
definitions:
|
|
14
|
+
SimtoolsModelParameters:
|
|
15
|
+
description: ""
|
|
16
|
+
type: object
|
|
17
|
+
properties:
|
|
18
|
+
_id:
|
|
19
|
+
type: string
|
|
20
|
+
description: "DB unique identifier."
|
|
21
|
+
entry_date:
|
|
22
|
+
type: string
|
|
23
|
+
description: "Value entry date."
|
|
24
|
+
file:
|
|
25
|
+
type: boolean
|
|
26
|
+
description: "This parameter is a file."
|
|
27
|
+
instrument:
|
|
28
|
+
type: string
|
|
29
|
+
description: "Associated instrument."
|
|
30
|
+
site:
|
|
31
|
+
type: string
|
|
32
|
+
description: "Associated CTAO site."
|
|
33
|
+
enum:
|
|
34
|
+
- North
|
|
35
|
+
- South
|
|
36
|
+
type:
|
|
37
|
+
type: string
|
|
38
|
+
description: "Data type"
|
|
39
|
+
enum:
|
|
40
|
+
- boolean
|
|
41
|
+
- dict
|
|
42
|
+
- double
|
|
43
|
+
- file
|
|
44
|
+
- float64
|
|
45
|
+
- int
|
|
46
|
+
- int64
|
|
47
|
+
- string
|
|
48
|
+
- uint
|
|
49
|
+
- uint32
|
|
50
|
+
- uint64
|
|
51
|
+
unit:
|
|
52
|
+
anyOf:
|
|
53
|
+
- type: string
|
|
54
|
+
- type: "null"
|
|
55
|
+
description: "Unit of the parameter."
|
|
56
|
+
value:
|
|
57
|
+
anyOf:
|
|
58
|
+
- type: boolean
|
|
59
|
+
- type: number
|
|
60
|
+
- type: string
|
|
61
|
+
- type: "null"
|
|
62
|
+
- type: array
|
|
63
|
+
description: "Value of the parameter."
|
|
64
|
+
parameter_version:
|
|
65
|
+
anyOf:
|
|
66
|
+
- type: string
|
|
67
|
+
description: "Parameter version."
|
|
68
|
+
schema_version:
|
|
69
|
+
anyOf:
|
|
70
|
+
- type: string
|
|
71
|
+
description: "Metaschema version."
|
|
72
|
+
unique_id:
|
|
73
|
+
anyOf:
|
|
74
|
+
- type: string
|
|
75
|
+
- type: "null"
|
|
76
|
+
description: "Unique ID of parameter definition."
|
|
77
|
+
required:
|
|
78
|
+
- file
|
|
79
|
+
- instrument
|
|
80
|
+
- parameter_version
|
|
81
|
+
- schema_version
|
|
82
|
+
- site
|
|
83
|
+
- type
|
|
84
|
+
- unit
|
|
85
|
+
- value
|
|
86
|
+
...
|
|
87
|
+
---
|
|
88
|
+
$schema: http://json-schema.org/draft-06/schema#
|
|
89
|
+
$ref: '#/definitions/SimtoolsModelParameters'
|
|
90
|
+
title: SimPipe DB Model Parameter Metaschema
|
|
91
|
+
description: |
|
|
92
|
+
YAML representation of db model parameter metaschema
|
|
93
|
+
(based on model_parameters DB).
|
|
94
|
+
version: 0.1.0
|
|
95
|
+
name: modelparameter.metaschema
|
|
96
|
+
type: object
|
|
97
|
+
additionalProperties: false
|
|
11
98
|
|
|
12
99
|
definitions:
|
|
13
100
|
SimtoolsModelParameters:
|
|
@@ -48,6 +135,7 @@ definitions:
|
|
|
48
135
|
- boolean
|
|
49
136
|
- double
|
|
50
137
|
- int
|
|
138
|
+
- int64
|
|
51
139
|
- string
|
|
52
140
|
- uint
|
|
53
141
|
- file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for adjust_gain model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: adjust_gain
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for altitude model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: altitude
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for array_coordinates model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
developer_note: To be replaced by a data table
|
|
9
9
|
name: array_coordinates
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for array_coordinates_utm input data
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: array_coordinates_utm
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for array_element_position_ground model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: array_element_position_ground
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for array_element_position_utm model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: array_element_position_utm
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for array_layouts model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: array_layouts
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for array_triggers model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: array_triggers
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for asum_clipping model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: asum_clipping
|
|
9
9
|
description: |-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for asum_offset model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
name: asum_offset
|
|
9
9
|
description: Offset in time where shaping convolution is done.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
title: Schema for asum_shaping model parameter
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
meta_schema: simpipe-schema
|
|
6
|
-
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
6
|
+
meta_schema_url: https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml
|
|
7
7
|
meta_schema_version: 0.1.0
|
|
8
8
|
developer_note: To be replaced by a data table
|
|
9
9
|
name: asum_shaping
|