gammasimtools 0.18.0__py3-none-any.whl → 0.20.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.18.0.dist-info → gammasimtools-0.20.0.dist-info}/METADATA +24 -69
- gammasimtools-0.20.0.dist-info/RECORD +395 -0
- {gammasimtools-0.18.0.dist-info → gammasimtools-0.20.0.dist-info}/entry_points.txt +11 -4
- {gammasimtools-0.18.0.dist-info → gammasimtools-0.20.0.dist-info}/licenses/LICENSE +1 -1
- simtools/_version.py +16 -3
- simtools/applications/calculate_incident_angles.py +182 -0
- simtools/applications/convert_all_model_parameters_from_simtel.py +4 -3
- simtools/applications/convert_geo_coordinates_of_array_elements.py +3 -3
- simtools/applications/db_add_simulation_model_from_repository_to_db.py +17 -14
- simtools/applications/db_add_value_from_json_to_db.py +8 -10
- simtools/applications/db_development_tools/write_array_elements_positions_to_repository.py +8 -13
- simtools/applications/db_generate_compound_indexes.py +65 -0
- simtools/applications/db_get_file_from_db.py +12 -24
- simtools/applications/db_get_parameter_from_db.py +4 -4
- simtools/applications/db_inspect_databases.py +20 -10
- simtools/applications/derive_mirror_rnda.py +17 -11
- simtools/applications/derive_psf_parameters.py +59 -309
- simtools/applications/derive_trigger_rates.py +91 -0
- simtools/applications/docs_produce_array_element_report.py +1 -1
- simtools/applications/docs_produce_calibration_reports.py +1 -1
- simtools/applications/docs_produce_model_parameter_reports.py +1 -1
- simtools/applications/docs_produce_simulation_configuration_report.py +1 -1
- simtools/applications/generate_corsika_histograms.py +1 -1
- simtools/applications/generate_default_metadata.py +8 -24
- simtools/applications/generate_simtel_event_data.py +11 -11
- simtools/applications/maintain_simulation_model_add_production_table.py +71 -0
- simtools/applications/maintain_simulation_model_compare_productions.py +98 -0
- simtools/applications/{verify_simulation_model_production_tables.py → maintain_simulation_model_verify_production_tables.py} +9 -1
- simtools/applications/merge_tables.py +2 -2
- simtools/applications/plot_array_layout.py +3 -3
- simtools/applications/plot_simtel_events.py +421 -0
- simtools/applications/plot_tabular_data.py +9 -2
- simtools/applications/plot_tabular_data_for_model_parameter.py +2 -1
- simtools/applications/print_version.py +8 -9
- simtools/applications/production_derive_corsika_limits.py +6 -7
- simtools/applications/production_derive_statistics.py +1 -1
- simtools/applications/production_generate_grid.py +2 -2
- simtools/applications/production_merge_corsika_limits.py +214 -0
- simtools/applications/run_application.py +47 -113
- simtools/applications/simulate_calibration_events.py +166 -0
- simtools/applications/simulate_flasher.py +141 -0
- simtools/applications/{simulate_light_emission.py → simulate_illuminator.py} +35 -99
- simtools/applications/simulate_prod.py +6 -24
- simtools/applications/simulate_prod_htcondor_generator.py +7 -0
- simtools/applications/submit_array_layouts.py +2 -1
- simtools/applications/submit_model_parameter_from_external.py +1 -1
- simtools/applications/validate_camera_efficiency.py +30 -12
- simtools/applications/validate_camera_fov.py +1 -1
- simtools/applications/validate_cumulative_psf.py +1 -1
- simtools/applications/validate_file_using_schema.py +9 -5
- simtools/applications/validate_optics.py +1 -1
- simtools/camera/camera_efficiency.py +61 -45
- simtools/camera/single_photon_electron_spectrum.py +1 -1
- simtools/configuration/commandline_parser.py +46 -11
- simtools/configuration/configurator.py +4 -4
- simtools/corsika/corsika_config.py +45 -25
- simtools/corsika/corsika_histograms.py +6 -5
- simtools/data_model/data_reader.py +2 -3
- simtools/data_model/metadata_collector.py +32 -36
- simtools/data_model/metadata_model.py +15 -12
- simtools/data_model/model_data_writer.py +13 -32
- simtools/data_model/schema.py +74 -24
- simtools/data_model/validate_data.py +42 -12
- simtools/db/db_handler.py +125 -62
- simtools/db/db_model_upload.py +14 -19
- simtools/dependencies.py +98 -30
- simtools/io/ascii_handler.py +279 -0
- simtools/{io_operations → io}/io_handler.py +25 -3
- simtools/job_execution/htcondor_script_generator.py +15 -4
- simtools/layout/array_layout.py +1 -1
- simtools/layout/array_layout_utils.py +51 -12
- simtools/model/array_model.py +41 -5
- simtools/model/flasher_model.py +106 -0
- simtools/model/model_parameter.py +4 -4
- simtools/model/model_repository.py +197 -2
- simtools/model/site_model.py +25 -0
- simtools/model/telescope_model.py +3 -1
- simtools/production_configuration/derive_corsika_limits.py +336 -427
- simtools/production_configuration/derive_production_statistics_handler.py +7 -6
- simtools/production_configuration/generate_production_grid.py +9 -11
- simtools/production_configuration/merge_corsika_limits.py +528 -0
- simtools/ray_tracing/incident_angles.py +706 -0
- simtools/ray_tracing/mirror_panel_psf.py +1 -0
- simtools/ray_tracing/psf_parameter_optimisation.py +792 -0
- simtools/ray_tracing/ray_tracing.py +6 -2
- simtools/reporting/docs_read_parameters.py +150 -62
- simtools/runners/corsika_runner.py +1 -1
- simtools/runners/corsika_simtel_runner.py +14 -5
- simtools/runners/runner_services.py +10 -5
- simtools/runners/simtools_runner.py +267 -0
- simtools/schemas/application_workflow.metaschema.yml +101 -68
- simtools/schemas/input/MST_mirror_2f_measurements.schema.yml +1 -1
- simtools/schemas/input/single_pe_spectrum.schema.yml +1 -1
- simtools/schemas/metadata.metaschema.yml +577 -3
- simtools/schemas/model_parameter.metaschema.yml +6 -6
- simtools/schemas/model_parameter_and_data_schema.metaschema.yml +4 -4
- 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/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/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 +3 -3
- 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 +2 -2
- simtools/schemas/model_parameters/dsum_zero_clip.schema.yml +1 -1
- simtools/schemas/model_parameters/effective_focal_length.schema.yml +1 -1
- 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_long_event_threshold.schema.yml +35 -0
- simtools/schemas/model_parameters/fadc_long_sum_bins.schema.yml +41 -0
- simtools/schemas/model_parameters/fadc_long_sum_offset.schema.yml +38 -0
- 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/fake_mirror_list.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 +50 -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/muon_mono_threshold.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 +2 -2
- 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_sky_map.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_spectrum.schema.yml +23 -30
- 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 +11 -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/random_mono_probability.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 +11 -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 +11 -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 +2 -2
- 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/schemas/plot_configuration.metaschema.yml +5 -2
- simtools/schemas/production_configuration_metrics.schema.yml +12 -2
- simtools/schemas/production_tables.schema.yml +7 -2
- simtools/simtel/simtel_config_reader.py +2 -2
- simtools/simtel/simtel_config_writer.py +33 -23
- simtools/simtel/simtel_io_event_histograms.py +483 -0
- simtools/simtel/simtel_io_event_reader.py +65 -43
- simtools/simtel/simtel_io_event_writer.py +40 -20
- simtools/simtel/simtel_io_metadata.py +1 -1
- simtools/simtel/simtel_table_reader.py +95 -13
- simtools/simtel/simulator_array.py +138 -10
- simtools/simtel/simulator_camera_efficiency.py +32 -23
- simtools/simtel/simulator_light_emission.py +437 -271
- simtools/simtel/simulator_ray_tracing.py +1 -1
- simtools/simulator.py +105 -147
- simtools/telescope_trigger_rates.py +119 -0
- simtools/testing/configuration.py +24 -26
- simtools/testing/helpers.py +2 -2
- simtools/testing/log_inspector.py +52 -0
- simtools/testing/validate_output.py +87 -37
- simtools/utils/general.py +125 -255
- simtools/utils/geometry.py +56 -0
- simtools/utils/names.py +1 -1
- simtools/visualization/legend_handlers.py +180 -264
- simtools/visualization/plot_array_layout.py +20 -8
- simtools/visualization/plot_incident_angles.py +431 -0
- simtools/visualization/plot_pixels.py +1 -1
- simtools/visualization/plot_simtel_event_histograms.py +376 -0
- simtools/visualization/plot_simtel_events.py +816 -0
- simtools/visualization/plot_tables.py +133 -37
- simtools/visualization/visualize.py +1 -100
- gammasimtools-0.18.0.dist-info/RECORD +0 -376
- simtools/applications/calculate_trigger_rate.py +0 -187
- simtools/applications/generate_sim_telarray_histograms.py +0 -196
- simtools/production_configuration/derive_corsika_limits_grid.py +0 -232
- simtools/simtel/simtel_io_histogram.py +0 -621
- simtools/simtel/simtel_io_histograms.py +0 -552
- {gammasimtools-0.18.0.dist-info → gammasimtools-0.20.0.dist-info}/WHEEL +0 -0
- {gammasimtools-0.18.0.dist-info → gammasimtools-0.20.0.dist-info}/top_level.txt +0 -0
- /simtools/{io_operations → io}/hdf5_handler.py +0 -0
- /simtools/{io_operations → io}/legacy_data_handler.py +0 -0
- /simtools/{io_operations/io_table_handler.py → io/table_handler.py} +0 -0
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python3
|
|
2
|
-
|
|
3
|
-
r"""
|
|
4
|
-
Write sim_telarray histograms into pdf and hdf5 files.
|
|
5
|
-
|
|
6
|
-
It accepts multiple lists of histograms files, a single list or a histogram file.
|
|
7
|
-
Each histogram is plotted in a page of the pdf file if the --pdf option is activated.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Command line arguments
|
|
11
|
-
----------------------
|
|
12
|
-
hist_file_names (str, optional)
|
|
13
|
-
Name of the histogram files to be plotted.
|
|
14
|
-
It can be given as the histogram file names (more than one option allowed) or as a text
|
|
15
|
-
file with the names of the histogram files in it.
|
|
16
|
-
pdf (bool, optional)
|
|
17
|
-
If set, histograms are saved into pdf files.
|
|
18
|
-
One pdf file contains all the histograms found in the file.
|
|
19
|
-
The name of the file is controlled via output_file_name.
|
|
20
|
-
hdf5: bool
|
|
21
|
-
If true, histograms are saved into hdf5 files.
|
|
22
|
-
At least one of pdf and hdf5 has to be activated.
|
|
23
|
-
output_file_name (str, optional)
|
|
24
|
-
The name of the output hdf5 (and/or pdf) files (without the path).
|
|
25
|
-
If not given, output_file_name takes the name from the (first) input file
|
|
26
|
-
(hist_file_names).
|
|
27
|
-
If the output output_file_name.hdf5 file already exists and hdf5 is set, the tables
|
|
28
|
-
associated to hdf5 will be overwritten. The remaining tables, if any, will stay
|
|
29
|
-
untouched.
|
|
30
|
-
test: bool
|
|
31
|
-
Test option. Generate only two histograms for testing purposes.
|
|
32
|
-
|
|
33
|
-
Raises
|
|
34
|
-
------
|
|
35
|
-
TypeError:
|
|
36
|
-
if argument passed through hist_file_names is not a file.
|
|
37
|
-
|
|
38
|
-
Example
|
|
39
|
-
-------
|
|
40
|
-
.. code-block:: console
|
|
41
|
-
|
|
42
|
-
simtools-generate-sim-telarray-histograms --hist_file_names tests/resources/ \\
|
|
43
|
-
run2_gamma_za20deg_azm0deg-North-Prod5_test-production-5.hdata.zst \\
|
|
44
|
-
--output_file_name test_hist_hdata --hdf5 --pdf
|
|
45
|
-
|
|
46
|
-
"""
|
|
47
|
-
|
|
48
|
-
import logging
|
|
49
|
-
from pathlib import Path
|
|
50
|
-
|
|
51
|
-
import matplotlib.pyplot as plt
|
|
52
|
-
from matplotlib.backends.backend_pdf import PdfPages
|
|
53
|
-
|
|
54
|
-
import simtools.utils.general as gen
|
|
55
|
-
from simtools.configuration import configurator
|
|
56
|
-
from simtools.io_operations import io_handler
|
|
57
|
-
from simtools.simtel.simtel_io_histograms import SimtelIOHistograms
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def _parse(label, description):
|
|
61
|
-
"""
|
|
62
|
-
Parse command line configuration.
|
|
63
|
-
|
|
64
|
-
Parameters
|
|
65
|
-
----------
|
|
66
|
-
label: str
|
|
67
|
-
Label describing the application.
|
|
68
|
-
description: str
|
|
69
|
-
Description of the application.
|
|
70
|
-
|
|
71
|
-
Returns
|
|
72
|
-
-------
|
|
73
|
-
CommandLineParser
|
|
74
|
-
Command line parser object
|
|
75
|
-
|
|
76
|
-
"""
|
|
77
|
-
config = configurator.Configurator(label=label, description=description)
|
|
78
|
-
|
|
79
|
-
config.parser.add_argument(
|
|
80
|
-
"--hist_file_names",
|
|
81
|
-
help="Name of the histogram files to be plotted or the text file containing the list of "
|
|
82
|
-
"histogram files.",
|
|
83
|
-
nargs="+",
|
|
84
|
-
required=True,
|
|
85
|
-
type=str,
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
config.parser.add_argument(
|
|
89
|
-
"--hdf5", help="Save histograms into a hdf5 file.", action="store_true", required=False
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
config.parser.add_argument(
|
|
93
|
-
"--pdf", help="Save histograms into a pdf file.", action="store_true", required=False
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
config.parser.add_argument(
|
|
97
|
-
"--output_file_name",
|
|
98
|
-
help="Name of the hdf5 (and/or pdf) file where to save the histograms.",
|
|
99
|
-
type=str,
|
|
100
|
-
required=False,
|
|
101
|
-
default=None,
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
config_parser, _ = config.initialize(db_config=False, paths=True)
|
|
105
|
-
if not config_parser["pdf"] and not config_parser["hdf5"]:
|
|
106
|
-
config.parser.error("At least one argument is required: --pdf or --hdf5.")
|
|
107
|
-
|
|
108
|
-
return config_parser
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def check_and_log_overwrite(config_parser, logger):
|
|
112
|
-
"""
|
|
113
|
-
Check if the output hdf5 file already exists and log a warning if it does.
|
|
114
|
-
|
|
115
|
-
Parameters
|
|
116
|
-
----------
|
|
117
|
-
config_parser: dict
|
|
118
|
-
Parsed command line arguments.
|
|
119
|
-
logger: logging.Logger
|
|
120
|
-
Logger object for logging messages.
|
|
121
|
-
|
|
122
|
-
Returns
|
|
123
|
-
-------
|
|
124
|
-
bool
|
|
125
|
-
True if the hdf5 file exists and should be overwritten.
|
|
126
|
-
"""
|
|
127
|
-
if Path(f"{config_parser['output_file_name']}.hdf5").exists() and config_parser["hdf5"]:
|
|
128
|
-
msg = (
|
|
129
|
-
f"Output hdf5 file {config_parser['output_file_name']}.hdf5 already exists. "
|
|
130
|
-
f"Overwriting it."
|
|
131
|
-
)
|
|
132
|
-
logger.warning(msg)
|
|
133
|
-
return True
|
|
134
|
-
return False
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
def create_pdf(simtel_histograms, output_file_name, config_parser, logger):
|
|
138
|
-
"""
|
|
139
|
-
Create a PDF file containing histograms.
|
|
140
|
-
|
|
141
|
-
Parameters
|
|
142
|
-
----------
|
|
143
|
-
simtel_histograms: SimtelIOHistograms
|
|
144
|
-
SimtelIOHistograms object containing histograms to plot.
|
|
145
|
-
output_file_name: str
|
|
146
|
-
Base name for the output PDF file.
|
|
147
|
-
config_parser: dict
|
|
148
|
-
Parsed command line arguments.
|
|
149
|
-
logger: logging.Logger
|
|
150
|
-
Logger object for logging messages.
|
|
151
|
-
"""
|
|
152
|
-
if config_parser["pdf"]:
|
|
153
|
-
logger.debug(f"Creating the pdf file {output_file_name}.pdf")
|
|
154
|
-
pdf_pages = PdfPages(f"{output_file_name}.pdf")
|
|
155
|
-
number_of_histograms = 2 if config_parser["test"] else len(simtel_histograms.combined_hists)
|
|
156
|
-
for i_hist in range(number_of_histograms):
|
|
157
|
-
logger.debug(f"Processing: {i_hist + 1} histogram.")
|
|
158
|
-
fig, ax = plt.subplots(1, 1, figsize=(6, 6))
|
|
159
|
-
simtel_histograms.plot_one_histogram(i_hist, ax)
|
|
160
|
-
plt.tight_layout()
|
|
161
|
-
pdf_pages.savefig(fig)
|
|
162
|
-
plt.clf()
|
|
163
|
-
plt.close()
|
|
164
|
-
pdf_pages.close()
|
|
165
|
-
logger.info(f"Wrote histograms to the pdf file {output_file_name}.pdf")
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
def main(): # noqa: D103
|
|
169
|
-
label = Path(__file__).stem
|
|
170
|
-
description = "Display sim_telarray histograms and/or write them into hdf5 format."
|
|
171
|
-
io_handler_instance = io_handler.IOHandler()
|
|
172
|
-
config_parser = _parse(label, description)
|
|
173
|
-
output_path = io_handler_instance.get_output_directory(label, sub_dir="application-plots")
|
|
174
|
-
logger = logging.getLogger()
|
|
175
|
-
logger.setLevel(gen.get_log_level_from_user(config_parser["log_level"]))
|
|
176
|
-
|
|
177
|
-
histogram_files = gen.get_list_of_files_from_command_line(
|
|
178
|
-
config_parser["hist_file_names"], [".zst", ".simtel", ".hdata"]
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
# If no output name is passed, the tool gets the name of the first histogram of the list
|
|
182
|
-
if config_parser["output_file_name"] is None:
|
|
183
|
-
config_parser["output_file_name"] = Path(histogram_files[0]).absolute().name
|
|
184
|
-
output_file_name = Path(output_path).joinpath(f"{config_parser['output_file_name']}")
|
|
185
|
-
|
|
186
|
-
simtel_histograms = SimtelIOHistograms(histogram_files)
|
|
187
|
-
create_pdf(simtel_histograms, output_file_name, config_parser, logger)
|
|
188
|
-
if config_parser["hdf5"]:
|
|
189
|
-
simtel_histograms.export_histograms(
|
|
190
|
-
f"{output_file_name}.hdf5",
|
|
191
|
-
overwrite=check_and_log_overwrite(config_parser, logger),
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if __name__ == "__main__":
|
|
196
|
-
main()
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
"""Derive CORSIKA limits for a grid of parameters."""
|
|
2
|
-
|
|
3
|
-
import datetime
|
|
4
|
-
import logging
|
|
5
|
-
|
|
6
|
-
import numpy as np
|
|
7
|
-
from astropy.table import Column, Table
|
|
8
|
-
|
|
9
|
-
import simtools.utils.general as gen
|
|
10
|
-
from simtools.data_model.metadata_collector import MetadataCollector
|
|
11
|
-
from simtools.io_operations import io_handler
|
|
12
|
-
from simtools.model.site_model import SiteModel
|
|
13
|
-
from simtools.production_configuration.derive_corsika_limits import LimitCalculator
|
|
14
|
-
|
|
15
|
-
_logger = logging.getLogger(__name__)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def generate_corsika_limits_grid(args_dict, db_config=None):
|
|
19
|
-
"""
|
|
20
|
-
Generate CORSIKA limits for a grid of parameters.
|
|
21
|
-
|
|
22
|
-
Requires at least one event data file per parameter set.
|
|
23
|
-
|
|
24
|
-
Parameters
|
|
25
|
-
----------
|
|
26
|
-
args_dict : dict
|
|
27
|
-
Dictionary containing command line arguments.
|
|
28
|
-
db_config : dict, optional
|
|
29
|
-
Database configuration dictionary.
|
|
30
|
-
"""
|
|
31
|
-
event_data_files = gen.get_list_of_files_from_command_line(
|
|
32
|
-
args_dict["event_data_files"], [".hdf5", ".gz"]
|
|
33
|
-
) # accept fits.gz files (.gz)
|
|
34
|
-
if args_dict.get("array_layout_name"):
|
|
35
|
-
telescope_configs = _read_array_layouts_from_db(
|
|
36
|
-
args_dict["array_layout_name"],
|
|
37
|
-
args_dict.get("site"),
|
|
38
|
-
args_dict.get("model_version"),
|
|
39
|
-
db_config,
|
|
40
|
-
)
|
|
41
|
-
else:
|
|
42
|
-
telescope_configs = gen.collect_data_from_file(args_dict["telescope_ids"])[
|
|
43
|
-
"telescope_configs"
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
results = []
|
|
47
|
-
for file_path in event_data_files:
|
|
48
|
-
for array_name, telescope_ids in telescope_configs.items():
|
|
49
|
-
_logger.info(f"Processing file: {file_path} with telescope config: {array_name}")
|
|
50
|
-
result = _process_file(
|
|
51
|
-
file_path,
|
|
52
|
-
array_name,
|
|
53
|
-
telescope_ids,
|
|
54
|
-
args_dict["loss_fraction"],
|
|
55
|
-
args_dict["plot_histograms"],
|
|
56
|
-
)
|
|
57
|
-
result["layout"] = array_name
|
|
58
|
-
results.append(result)
|
|
59
|
-
|
|
60
|
-
write_results(results, args_dict)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _process_file(file_path, array_name, telescope_ids, loss_fraction, plot_histograms):
|
|
64
|
-
"""
|
|
65
|
-
Compute limits for a single file.
|
|
66
|
-
|
|
67
|
-
Parameters
|
|
68
|
-
----------
|
|
69
|
-
file_path : str
|
|
70
|
-
Path to the event data file.
|
|
71
|
-
array_name : str
|
|
72
|
-
Name of the telescope array configuration.
|
|
73
|
-
telescope_ids : list[int]
|
|
74
|
-
List of telescope IDs to filter the events.
|
|
75
|
-
loss_fraction : float
|
|
76
|
-
Fraction of events to be lost.
|
|
77
|
-
plot_histograms : bool
|
|
78
|
-
Whether to plot histograms.
|
|
79
|
-
|
|
80
|
-
Returns
|
|
81
|
-
-------
|
|
82
|
-
dict
|
|
83
|
-
Dictionary containing the computed limits and metadata.
|
|
84
|
-
"""
|
|
85
|
-
calculator = LimitCalculator(file_path, array_name=array_name, telescope_list=telescope_ids)
|
|
86
|
-
limits = calculator.compute_limits(loss_fraction)
|
|
87
|
-
|
|
88
|
-
if plot_histograms:
|
|
89
|
-
calculator.plot_data(io_handler.IOHandler().get_output_directory())
|
|
90
|
-
|
|
91
|
-
return limits
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def write_results(results, args_dict):
|
|
95
|
-
"""
|
|
96
|
-
Write the computed limits as astropy table to file.
|
|
97
|
-
|
|
98
|
-
Parameters
|
|
99
|
-
----------
|
|
100
|
-
results : list[dict]
|
|
101
|
-
List of computed limits.
|
|
102
|
-
args_dict : dict
|
|
103
|
-
Dictionary containing command line arguments.
|
|
104
|
-
"""
|
|
105
|
-
table = _create_results_table(results, args_dict["loss_fraction"])
|
|
106
|
-
|
|
107
|
-
output_dir = io_handler.IOHandler().get_output_directory("corsika_limits")
|
|
108
|
-
output_file = output_dir / args_dict["output_file"]
|
|
109
|
-
|
|
110
|
-
table.write(output_file, format="ascii.ecsv", overwrite=True)
|
|
111
|
-
_logger.info(f"Results saved to {output_file}")
|
|
112
|
-
|
|
113
|
-
MetadataCollector.dump(args_dict, output_file)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def _create_results_table(results, loss_fraction):
|
|
117
|
-
"""
|
|
118
|
-
Convert list of simulation results to an astropy Table with metadata.
|
|
119
|
-
|
|
120
|
-
Round values to appropriate precision and add metadata.
|
|
121
|
-
|
|
122
|
-
Parameters
|
|
123
|
-
----------
|
|
124
|
-
results : list[dict]
|
|
125
|
-
Computed limits per file and telescope configuration.
|
|
126
|
-
loss_fraction : float
|
|
127
|
-
Fraction of lost events (added to metadata).
|
|
128
|
-
|
|
129
|
-
Returns
|
|
130
|
-
-------
|
|
131
|
-
astropy.table.Table
|
|
132
|
-
Table with computed limits.
|
|
133
|
-
"""
|
|
134
|
-
cols = [
|
|
135
|
-
"primary_particle",
|
|
136
|
-
"array_name",
|
|
137
|
-
"telescope_ids",
|
|
138
|
-
"zenith",
|
|
139
|
-
"azimuth",
|
|
140
|
-
"nsb_level",
|
|
141
|
-
"lower_energy_limit",
|
|
142
|
-
"upper_radius_limit",
|
|
143
|
-
"viewcone_radius",
|
|
144
|
-
]
|
|
145
|
-
|
|
146
|
-
columns = {name: [] for name in cols}
|
|
147
|
-
units = {}
|
|
148
|
-
|
|
149
|
-
for res in results:
|
|
150
|
-
_process_result_row(res, cols, columns, units)
|
|
151
|
-
|
|
152
|
-
table_cols = _create_table_columns(cols, columns, units)
|
|
153
|
-
table = Table(table_cols)
|
|
154
|
-
|
|
155
|
-
table.meta.update(
|
|
156
|
-
{
|
|
157
|
-
"created": datetime.datetime.now().isoformat(),
|
|
158
|
-
"description": "Lookup table for CORSIKA limits computed from simulations.",
|
|
159
|
-
"loss_fraction": loss_fraction,
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
return table
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
def _process_result_row(res, cols, columns, units):
|
|
167
|
-
"""Process a single result row and add values to columns."""
|
|
168
|
-
for k in cols:
|
|
169
|
-
val = res.get(k, None)
|
|
170
|
-
if val is not None:
|
|
171
|
-
val = _round_value(k, val)
|
|
172
|
-
_logger.debug(f"Adding {k}: {val} to column data")
|
|
173
|
-
|
|
174
|
-
if hasattr(val, "unit"):
|
|
175
|
-
columns[k].append(val.value)
|
|
176
|
-
units[k] = val.unit
|
|
177
|
-
else:
|
|
178
|
-
columns[k].append(val)
|
|
179
|
-
if k not in units:
|
|
180
|
-
units[k] = None
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
def _round_value(key, val):
|
|
184
|
-
"""Round value based on key type."""
|
|
185
|
-
if key == "lower_energy_limit":
|
|
186
|
-
return np.floor(val * 1e3) / 1e3
|
|
187
|
-
if key == "upper_radius_limit":
|
|
188
|
-
return np.ceil(val / 25) * 25
|
|
189
|
-
if key == "viewcone_radius":
|
|
190
|
-
return np.ceil(val / 0.25) * 0.25
|
|
191
|
-
return val
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
def _create_table_columns(cols, columns, units):
|
|
195
|
-
"""Create table columns with appropriate data types."""
|
|
196
|
-
table_cols = []
|
|
197
|
-
for k in cols:
|
|
198
|
-
col_data = columns[k]
|
|
199
|
-
if any(isinstance(v, list | tuple) for v in col_data):
|
|
200
|
-
col = Column(data=col_data, name=k, unit=units.get(k), dtype=object)
|
|
201
|
-
else:
|
|
202
|
-
col = Column(data=col_data, name=k, unit=units.get(k))
|
|
203
|
-
table_cols.append(col)
|
|
204
|
-
return table_cols
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
def _read_array_layouts_from_db(layouts, site, model_version, db_config):
|
|
208
|
-
"""
|
|
209
|
-
Read array layouts from the database.
|
|
210
|
-
|
|
211
|
-
Parameters
|
|
212
|
-
----------
|
|
213
|
-
layouts : list[str]
|
|
214
|
-
List of layout names to read. If "all", read all available layouts.
|
|
215
|
-
site : str
|
|
216
|
-
Site name for the array layouts.
|
|
217
|
-
model_version : str
|
|
218
|
-
Model version for the array layouts.
|
|
219
|
-
db_config : dict
|
|
220
|
-
Database configuration dictionary.
|
|
221
|
-
|
|
222
|
-
Returns
|
|
223
|
-
-------
|
|
224
|
-
dict
|
|
225
|
-
Dictionary mapping layout names to telescope IDs.
|
|
226
|
-
"""
|
|
227
|
-
site_model = SiteModel(site=site, model_version=model_version, mongo_db_config=db_config)
|
|
228
|
-
layout_names = site_model.get_list_of_array_layouts() if layouts == ["all"] else layouts
|
|
229
|
-
layout_dict = {}
|
|
230
|
-
for layout_name in layout_names:
|
|
231
|
-
layout_dict[layout_name] = site_model.get_array_elements_for_layout(layout_name)
|
|
232
|
-
return layout_dict
|