gammasimtools 0.21.0__py3-none-any.whl → 0.23.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.21.0.dist-info → gammasimtools-0.23.0.dist-info}/METADATA +3 -3
- gammasimtools-0.23.0.dist-info/RECORD +414 -0
- {gammasimtools-0.21.0.dist-info → gammasimtools-0.23.0.dist-info}/entry_points.txt +2 -1
- simtools/_version.py +2 -2
- simtools/application_control.py +118 -0
- simtools/applications/calculate_incident_angles.py +17 -25
- simtools/applications/convert_all_model_parameters_from_simtel.py +29 -45
- simtools/applications/convert_geo_coordinates_of_array_elements.py +26 -45
- simtools/applications/convert_model_parameter_from_simtel.py +21 -42
- simtools/applications/db_add_file_to_db.py +12 -13
- simtools/applications/db_add_simulation_model_from_repository_to_db.py +20 -33
- simtools/applications/db_add_value_from_json_to_db.py +28 -23
- simtools/applications/db_development_tools/write_array_elements_positions_to_repository.py +19 -34
- simtools/applications/db_generate_compound_indexes.py +12 -27
- simtools/applications/db_get_array_layouts_from_db.py +19 -39
- simtools/applications/db_get_file_from_db.py +15 -17
- simtools/applications/db_get_parameter_from_db.py +33 -35
- simtools/applications/db_inspect_databases.py +10 -11
- simtools/applications/db_upload_model_repository.py +104 -0
- simtools/applications/derive_ctao_array_layouts.py +16 -21
- simtools/applications/derive_mirror_rnda.py +9 -14
- simtools/applications/derive_photon_electron_spectrum.py +7 -10
- simtools/applications/derive_psf_parameters.py +24 -21
- simtools/applications/derive_trigger_rates.py +6 -9
- simtools/applications/docs_produce_array_element_report.py +22 -23
- simtools/applications/docs_produce_calibration_reports.py +26 -24
- simtools/applications/docs_produce_model_parameter_reports.py +15 -22
- simtools/applications/docs_produce_simulation_configuration_report.py +21 -22
- simtools/applications/generate_array_config.py +14 -33
- simtools/applications/generate_corsika_histograms.py +22 -43
- simtools/applications/generate_default_metadata.py +15 -36
- simtools/applications/generate_regular_arrays.py +11 -15
- simtools/applications/generate_simtel_event_data.py +23 -33
- simtools/applications/maintain_simulation_model_add_production.py +17 -48
- simtools/applications/maintain_simulation_model_compare_productions.py +10 -12
- simtools/applications/maintain_simulation_model_verify_production_tables.py +8 -11
- simtools/applications/merge_tables.py +15 -24
- simtools/applications/plot_array_layout.py +77 -55
- simtools/applications/plot_simtel_events.py +11 -13
- simtools/applications/plot_tabular_data.py +17 -38
- simtools/applications/plot_tabular_data_for_model_parameter.py +16 -23
- simtools/applications/print_version.py +14 -42
- simtools/applications/production_derive_corsika_limits.py +5 -9
- simtools/applications/production_derive_statistics.py +12 -26
- simtools/applications/production_generate_grid.py +20 -48
- simtools/applications/production_merge_corsika_limits.py +17 -21
- simtools/applications/run_application.py +12 -32
- simtools/applications/simulate_flasher.py +79 -81
- simtools/applications/simulate_illuminator.py +56 -197
- simtools/applications/{simulate_calibration_events.py → simulate_pedestals.py} +22 -68
- simtools/applications/simulate_prod.py +21 -33
- simtools/applications/simulate_prod_htcondor_generator.py +11 -25
- simtools/applications/submit_array_layouts.py +15 -18
- simtools/applications/submit_data_from_external.py +18 -34
- simtools/applications/submit_model_parameter_from_external.py +27 -41
- simtools/applications/validate_camera_efficiency.py +23 -22
- simtools/applications/validate_camera_fov.py +21 -27
- simtools/applications/validate_cumulative_psf.py +28 -37
- simtools/applications/validate_file_using_schema.py +35 -45
- simtools/applications/validate_optics.py +27 -33
- simtools/camera/camera_efficiency.py +8 -13
- simtools/configuration/commandline_parser.py +33 -11
- simtools/configuration/configurator.py +0 -7
- simtools/corsika/corsika_config.py +9 -16
- simtools/corsika/corsika_histograms.py +1 -1
- simtools/data_model/data_reader.py +0 -2
- simtools/data_model/metadata_collector.py +0 -2
- simtools/data_model/model_data_writer.py +87 -27
- simtools/data_model/schema.py +61 -2
- simtools/data_model/validate_data.py +1 -3
- simtools/db/db_handler.py +58 -39
- simtools/db/db_model_upload.py +210 -5
- simtools/io/hdf5_handler.py +0 -5
- simtools/io/io_handler.py +31 -83
- simtools/io/legacy_data_handler.py +0 -5
- simtools/job_execution/job_manager.py +43 -1
- simtools/layout/array_layout.py +0 -2
- simtools/layout/array_layout_utils.py +1 -5
- simtools/layout/telescope_position.py +0 -2
- simtools/model/array_model.py +95 -46
- simtools/model/calibration_model.py +0 -2
- simtools/model/camera.py +0 -2
- simtools/model/mirrors.py +0 -2
- simtools/model/model_parameter.py +50 -16
- simtools/model/model_repository.py +139 -106
- simtools/model/model_utils.py +21 -11
- simtools/model/site_model.py +0 -2
- simtools/model/telescope_model.py +20 -2
- simtools/production_configuration/calculate_statistical_uncertainties_grid_point.py +0 -2
- simtools/production_configuration/derive_corsika_limits.py +1 -1
- simtools/production_configuration/derive_production_statistics.py +0 -2
- simtools/production_configuration/interpolation_handler.py +0 -2
- simtools/ray_tracing/incident_angles.py +7 -7
- simtools/ray_tracing/mirror_panel_psf.py +1 -1
- simtools/ray_tracing/psf_analysis.py +0 -2
- simtools/ray_tracing/psf_parameter_optimisation.py +180 -73
- simtools/ray_tracing/ray_tracing.py +1 -5
- simtools/reporting/docs_auto_report_generator.py +108 -0
- simtools/reporting/docs_read_parameters.py +168 -104
- simtools/resources/array_elements.yml +26 -0
- simtools/runners/corsika_runner.py +0 -2
- simtools/runners/corsika_simtel_runner.py +11 -19
- simtools/runners/runner_services.py +5 -6
- simtools/runners/simtel_runner.py +0 -2
- simtools/runners/simtools_runner.py +0 -2
- simtools/schemas/application_workflow.metaschema.yml +1 -1
- simtools/schemas/common_definitions.schema.yml +39 -0
- simtools/schemas/model_parameter.metaschema.yml +19 -13
- simtools/schemas/model_parameter_and_data_schema.metaschema.yml +6 -12
- simtools/schemas/model_parameters/adjust_gain.schema.yml +0 -5
- simtools/schemas/model_parameters/altitude.schema.yml +0 -5
- simtools/schemas/model_parameters/array_coordinates.schema.yml +0 -5
- simtools/schemas/model_parameters/array_coordinates_UTM.schema.yml +0 -5
- simtools/schemas/model_parameters/array_element_position_ground.schema.yml +0 -7
- simtools/schemas/model_parameters/array_element_position_utm.schema.yml +0 -7
- simtools/schemas/model_parameters/array_layouts.schema.yml +0 -5
- simtools/schemas/model_parameters/array_triggers.schema.yml +0 -5
- simtools/schemas/model_parameters/array_window.schema.yml +0 -7
- simtools/schemas/model_parameters/asum_clipping.schema.yml +0 -3
- simtools/schemas/model_parameters/asum_offset.schema.yml +0 -7
- simtools/schemas/model_parameters/asum_shaping.schema.yml +0 -7
- simtools/schemas/model_parameters/asum_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/atmospheric_profile.schema.yml +0 -5
- simtools/schemas/model_parameters/atmospheric_transmission.schema.yml +0 -5
- simtools/schemas/model_parameters/axes_offsets.schema.yml +0 -7
- simtools/schemas/model_parameters/calibration_devices.schema.yml +30 -0
- simtools/schemas/model_parameters/camera_body_diameter.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_body_shape.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_config_file.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_config_rotate.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_degraded_efficiency.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_degraded_map.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_depth.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_filter.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_filter_incidence_angle.schema.yml +0 -3
- simtools/schemas/model_parameters/camera_pixels.schema.yml +0 -7
- simtools/schemas/model_parameters/camera_transmission.schema.yml +0 -7
- simtools/schemas/model_parameters/channels_per_chip.schema.yml +0 -7
- simtools/schemas/model_parameters/correct_nsb_spectrum_to_telescope_altitude.schema.yml +0 -7
- simtools/schemas/model_parameters/corsika_observation_level.schema.yml +0 -5
- simtools/schemas/model_parameters/dark_events.schema.yml +4 -3
- simtools/schemas/model_parameters/default_trigger.schema.yml +0 -7
- simtools/schemas/model_parameters/design_model.schema.yml +0 -7
- simtools/schemas/model_parameters/disc_ac_coupled.schema.yml +0 -7
- simtools/schemas/model_parameters/disc_bins.schema.yml +0 -7
- simtools/schemas/model_parameters/disc_start.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_amplitude.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_fall_time.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_gate_length.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_hysteresis.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_output_amplitude.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_output_var_percent.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_pulse_shape.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_rise_time.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_scale_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_sigsum_over_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_time_over_threshold.schema.yml +1 -9
- simtools/schemas/model_parameters/discriminator_var_gate_length.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_var_sigsum_over_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_var_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/discriminator_var_time_over_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/dish_shape_length.schema.yml +0 -5
- simtools/schemas/model_parameters/dsum_clipping.schema.yml +1 -5
- simtools/schemas/model_parameters/dsum_ignore_below.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_offset.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_pedsub.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_pre_clipping.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_prescale.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_presum_max.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_presum_shift.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_shaping.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_shaping_renormalize.schema.yml +0 -3
- simtools/schemas/model_parameters/dsum_threshold.schema.yml +2 -12
- simtools/schemas/model_parameters/dsum_zero_clip.schema.yml +0 -3
- simtools/schemas/model_parameters/effective_focal_length.schema.yml +0 -7
- simtools/schemas/model_parameters/epsg_code.schema.yml +0 -5
- simtools/schemas/model_parameters/fadc_ac_coupled.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_amplitude.schema.yml +2 -9
- simtools/schemas/model_parameters/fadc_bins.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_compensate_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_dev_pedestal.schema.yml +0 -2
- simtools/schemas/model_parameters/fadc_err_compensate_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_err_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_amplitude.schema.yml +2 -9
- simtools/schemas/model_parameters/fadc_lg_compensate_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_dev_pedestal.schema.yml +0 -2
- simtools/schemas/model_parameters/fadc_lg_err_compensate_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_err_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_max_signal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_max_sum.schema.yml +0 -2
- simtools/schemas/model_parameters/fadc_lg_noise.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_sensitivity.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_sysvar_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_var_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_lg_var_sensitivity.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_long_event_threshold.schema.yml +0 -3
- simtools/schemas/model_parameters/fadc_long_sum_bins.schema.yml +0 -3
- simtools/schemas/model_parameters/fadc_long_sum_offset.schema.yml +0 -3
- simtools/schemas/model_parameters/fadc_max_signal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_max_sum.schema.yml +0 -2
- simtools/schemas/model_parameters/fadc_mhz.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_noise.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_pulse_shape.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_sensitivity.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_sum_bins.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_sum_offset.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_sysvar_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_var_pedestal.schema.yml +0 -7
- simtools/schemas/model_parameters/fadc_var_sensitivity.schema.yml +0 -7
- simtools/schemas/model_parameters/fake_mirror_list.schema.yml +0 -3
- simtools/schemas/model_parameters/flasher_angular_distribution.schema.yml +32 -0
- simtools/schemas/model_parameters/flasher_angular_distribution_width.schema.yml +32 -0
- simtools/schemas/model_parameters/flasher_bunch_size.schema.yml +28 -0
- simtools/schemas/model_parameters/flasher_external_trigger.schema.yml +32 -0
- simtools/schemas/model_parameters/flasher_photons.schema.yml +34 -0
- simtools/schemas/model_parameters/flasher_position.schema.yml +43 -0
- simtools/schemas/model_parameters/flasher_pulse_exp_decay.schema.yml +29 -0
- simtools/schemas/model_parameters/flasher_pulse_offset.schema.yml +35 -0
- simtools/schemas/model_parameters/flasher_pulse_shape.schema.yml +30 -0
- simtools/schemas/model_parameters/flasher_pulse_width.schema.yml +32 -0
- simtools/schemas/model_parameters/flasher_type.schema.yml +28 -0
- simtools/schemas/model_parameters/flasher_var_photons.schema.yml +31 -0
- simtools/schemas/model_parameters/flasher_wavelength.schema.yml +33 -0
- simtools/schemas/model_parameters/flatfielding.schema.yml +0 -7
- simtools/schemas/model_parameters/focal_length.schema.yml +0 -7
- simtools/schemas/model_parameters/focal_surface_parameters.schema.yml +0 -3
- simtools/schemas/model_parameters/focal_surface_ref_radius.schema.yml +0 -3
- simtools/schemas/model_parameters/focus_offset.schema.yml +0 -7
- simtools/schemas/model_parameters/gain_variation.schema.yml +0 -7
- simtools/schemas/model_parameters/geomag_horizontal.schema.yml +2 -7
- simtools/schemas/model_parameters/geomag_rotation.schema.yml +2 -7
- simtools/schemas/model_parameters/geomag_vertical.schema.yml +2 -7
- simtools/schemas/model_parameters/hg_lg_variation.schema.yml +0 -5
- simtools/schemas/model_parameters/iobuf_maximum.schema.yml +0 -7
- simtools/schemas/model_parameters/iobuf_output_maximum.schema.yml +0 -7
- simtools/schemas/model_parameters/laser_events.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_external_trigger.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_photons.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_pulse_exptime.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_pulse_offset.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_pulse_sigtime.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_pulse_twidth.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_var_photons.schema.yml +4 -3
- simtools/schemas/model_parameters/laser_wavelength.schema.yml +4 -3
- simtools/schemas/model_parameters/led_events.schema.yml +4 -3
- simtools/schemas/model_parameters/led_photons.schema.yml +4 -3
- simtools/schemas/model_parameters/led_pulse_offset.schema.yml +4 -3
- simtools/schemas/model_parameters/led_pulse_sigtime.schema.yml +4 -3
- simtools/schemas/model_parameters/led_var_photons.schema.yml +4 -3
- simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml +0 -7
- simtools/schemas/model_parameters/lightguide_efficiency_vs_wavelength.schema.yml +0 -7
- simtools/schemas/model_parameters/min_photoelectrons.schema.yml +0 -7
- simtools/schemas/model_parameters/min_photons.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_align_random_distance.schema.yml +0 -5
- simtools/schemas/model_parameters/mirror_align_random_horizontal.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_align_random_vertical.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_class.schema.yml +2 -9
- simtools/schemas/model_parameters/mirror_degraded_reflection.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_focal_length.schema.yml +0 -5
- simtools/schemas/model_parameters/mirror_list.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_offset.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_reflection_random_angle.schema.yml +0 -7
- simtools/schemas/model_parameters/mirror_reflectivity.schema.yml +0 -7
- simtools/schemas/model_parameters/multiplicity_offset.schema.yml +0 -7
- simtools/schemas/model_parameters/muon_mono_threshold.schema.yml +0 -7
- simtools/schemas/model_parameters/nsb_autoscale_airmass.schema.yml +0 -7
- simtools/schemas/model_parameters/nsb_gain_drop_scale.schema.yml +0 -3
- simtools/schemas/model_parameters/nsb_offaxis.schema.yml +0 -7
- simtools/schemas/model_parameters/nsb_pixel_rate.schema.yml +0 -7
- simtools/schemas/model_parameters/nsb_reference_spectrum.schema.yml +0 -5
- simtools/schemas/model_parameters/nsb_reference_value.schema.yml +0 -5
- simtools/schemas/model_parameters/nsb_scaling_factor.schema.yml +0 -5
- simtools/schemas/model_parameters/nsb_sky_map.schema.yml +0 -5
- simtools/schemas/model_parameters/nsb_spectrum.schema.yml +0 -5
- simtools/schemas/model_parameters/num_gains.schema.yml +0 -7
- simtools/schemas/model_parameters/only_triggered_telescopes.schema.yml +0 -7
- simtools/schemas/model_parameters/optics_properties.schema.yml +0 -7
- simtools/schemas/model_parameters/parabolic_dish.schema.yml +0 -3
- simtools/schemas/model_parameters/pedestal_events.schema.yml +4 -7
- simtools/schemas/model_parameters/photon_delay.schema.yml +0 -7
- simtools/schemas/model_parameters/photons_per_run.schema.yml +4 -4
- simtools/schemas/model_parameters/pixel_cells.schema.yml +0 -3
- simtools/schemas/model_parameters/pixels_parallel.schema.yml +0 -3
- simtools/schemas/model_parameters/pixeltrg_time_step.schema.yml +0 -7
- simtools/schemas/model_parameters/pm_average_gain.schema.yml +0 -5
- simtools/schemas/model_parameters/pm_collection_efficiency.schema.yml +0 -5
- simtools/schemas/model_parameters/pm_gain_index.schema.yml +0 -5
- simtools/schemas/model_parameters/pm_photoelectron_spectrum.schema.yml +0 -7
- simtools/schemas/model_parameters/pm_transit_time.schema.yml +4 -9
- simtools/schemas/model_parameters/pm_voltage_variation.schema.yml +0 -5
- simtools/schemas/model_parameters/primary_mirror_degraded_map.schema.yml +0 -7
- simtools/schemas/model_parameters/primary_mirror_diameter.schema.yml +0 -3
- simtools/schemas/model_parameters/primary_mirror_hole_diameter.schema.yml +0 -3
- simtools/schemas/model_parameters/primary_mirror_incidence_angle.schema.yml +0 -3
- simtools/schemas/model_parameters/primary_mirror_parameters.schema.yml +0 -3
- simtools/schemas/model_parameters/primary_mirror_ref_radius.schema.yml +0 -3
- simtools/schemas/model_parameters/primary_mirror_segmentation.schema.yml +0 -3
- simtools/schemas/model_parameters/qe_variation.schema.yml +0 -7
- simtools/schemas/model_parameters/quantum_efficiency.schema.yml +0 -7
- simtools/schemas/model_parameters/random_focal_length.schema.yml +2 -7
- simtools/schemas/model_parameters/random_generator.schema.yml +0 -7
- simtools/schemas/model_parameters/random_mono_probability.schema.yml +0 -7
- simtools/schemas/model_parameters/reference_point_altitude.schema.yml +0 -5
- simtools/schemas/model_parameters/reference_point_latitude.schema.yml +0 -5
- simtools/schemas/model_parameters/reference_point_longitude.schema.yml +0 -5
- simtools/schemas/model_parameters/reference_point_utm_east.schema.yml +0 -5
- simtools/schemas/model_parameters/reference_point_utm_north.schema.yml +0 -5
- simtools/schemas/model_parameters/sampled_output.schema.yml +0 -7
- simtools/schemas/model_parameters/save_pe_with_amplitude.schema.yml +0 -7
- simtools/schemas/model_parameters/secondary_mirror_baffle.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_degraded_map.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_degraded_reflection.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_diameter.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_hole_diameter.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_incidence_angle.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_parameters.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_ref_radius.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_reflectivity.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_segmentation.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_shadow_diameter.schema.yml +0 -3
- simtools/schemas/model_parameters/secondary_mirror_shadow_offset.schema.yml +0 -3
- simtools/schemas/model_parameters/stars.schema.yml +0 -5
- simtools/schemas/model_parameters/store_photoelectrons.schema.yml +0 -7
- simtools/schemas/model_parameters/tailcut_scale.schema.yml +0 -7
- simtools/schemas/model_parameters/telescope_axis_height.schema.yml +0 -7
- simtools/schemas/model_parameters/telescope_random_angle.schema.yml +0 -7
- simtools/schemas/model_parameters/telescope_random_error.schema.yml +0 -7
- simtools/schemas/model_parameters/telescope_sphere_radius.schema.yml +0 -7
- simtools/schemas/model_parameters/telescope_transmission.schema.yml +0 -7
- simtools/schemas/model_parameters/teltrig_min_sigsum.schema.yml +0 -7
- simtools/schemas/model_parameters/teltrig_min_time.schema.yml +0 -7
- simtools/schemas/model_parameters/transit_time_calib_error.schema.yml +0 -7
- simtools/schemas/model_parameters/transit_time_compensate_error.schema.yml +0 -7
- simtools/schemas/model_parameters/transit_time_compensate_step.schema.yml +0 -7
- simtools/schemas/model_parameters/transit_time_error.schema.yml +0 -7
- simtools/schemas/model_parameters/transit_time_jitter.schema.yml +0 -7
- simtools/schemas/model_parameters/transit_time_random.schema.yml +29 -0
- simtools/schemas/model_parameters/trigger_current_limit.schema.yml +0 -7
- simtools/schemas/model_parameters/trigger_delay_compensation.schema.yml +0 -7
- simtools/schemas/model_parameters/trigger_pixels.schema.yml +0 -7
- simtools/schemas/production_tables.schema.yml +8 -8
- simtools/schemas/simulation_models_info.schema.yml +78 -0
- simtools/simtel/simtel_config_reader.py +0 -2
- simtools/simtel/simtel_config_writer.py +118 -26
- simtools/simtel/simtel_io_metadata.py +3 -3
- simtools/simtel/simulator_array.py +43 -85
- simtools/simtel/simulator_camera_efficiency.py +0 -2
- simtools/simtel/simulator_light_emission.py +336 -631
- simtools/simtel/simulator_ray_tracing.py +2 -4
- simtools/simulator.py +45 -19
- simtools/testing/assertions.py +2 -2
- simtools/testing/configuration.py +21 -6
- simtools/testing/sim_telarray_metadata.py +4 -4
- simtools/utils/general.py +5 -13
- simtools/utils/geometry.py +34 -5
- simtools/utils/names.py +1 -13
- simtools/version.py +83 -0
- simtools/visualization/plot_array_layout.py +129 -23
- simtools/visualization/plot_incident_angles.py +0 -2
- simtools/visualization/plot_psf.py +163 -61
- simtools/visualization/plot_simtel_events.py +1 -12
- simtools/visualization/visualize.py +0 -12
- gammasimtools-0.21.0.dist-info/RECORD +0 -396
- simtools/model/flasher_model.py +0 -106
- {gammasimtools-0.21.0.dist-info → gammasimtools-0.23.0.dist-info}/WHEEL +0 -0
- {gammasimtools-0.21.0.dist-info → gammasimtools-0.23.0.dist-info}/licenses/LICENSE +0 -0
- {gammasimtools-0.21.0.dist-info → gammasimtools-0.23.0.dist-info}/top_level.txt +0 -0
|
@@ -1,159 +1,100 @@
|
|
|
1
1
|
#!/usr/bin/python3
|
|
2
2
|
|
|
3
3
|
r"""
|
|
4
|
-
Simulate
|
|
4
|
+
Simulate illuminator (distant calibration light source).
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Illuminators are calibration light sources not attached to a particular telescope.
|
|
7
|
+
Two types of illuminators are supported:
|
|
8
8
|
|
|
9
|
-
1. Illuminator at
|
|
10
|
-
|
|
9
|
+
1. Illuminator as foreseen at CTAO with fixed positions as defined in the simulation models
|
|
10
|
+
database.
|
|
11
|
+
2. Illuminator at a configurable position relative to the array center. Note that in this case
|
|
12
|
+
the telescope pointing is fixed towards zenith.
|
|
11
13
|
|
|
12
14
|
Example Usage
|
|
13
15
|
-------------
|
|
14
16
|
|
|
15
|
-
1. Simulate
|
|
17
|
+
1. Simulate illuminator with positions as defined in the simulation models database:
|
|
16
18
|
|
|
17
19
|
.. code-block:: console
|
|
18
20
|
|
|
19
|
-
simtools-simulate-illuminator --
|
|
20
|
-
--
|
|
21
|
+
simtools-simulate-illuminator --light_source ILLN-01 \
|
|
22
|
+
--telescope MSTN-04 --site North \
|
|
21
23
|
--model_version 6.0.0
|
|
22
24
|
|
|
23
|
-
2. Simulate
|
|
25
|
+
2. Simulate at a configurable position (1km above array center) and pointing downwards:
|
|
24
26
|
|
|
25
27
|
.. code-block:: console
|
|
26
28
|
|
|
27
|
-
simtools-simulate-illuminator --
|
|
28
|
-
--
|
|
29
|
+
simtools-simulate-illuminator --light_source ILLN-01 \
|
|
30
|
+
--light_source_position 0. 0. 1000. \
|
|
31
|
+
--light_source_pointing 0. 0. -1. \
|
|
32
|
+
--telescope MSTN-15 --site North \
|
|
29
33
|
--model_version 6.0.0
|
|
30
34
|
|
|
31
35
|
Command Line Arguments
|
|
32
36
|
----------------------
|
|
37
|
+
light_source (str, optional)
|
|
38
|
+
Illuminator in array, e.g., ILLN-01.
|
|
39
|
+
number_of_events (int, optional)
|
|
40
|
+
Number of events to simulate.
|
|
33
41
|
telescope (str, required)
|
|
34
42
|
Telescope model name (e.g. LSTN-01, SSTS-design, SSTS-25, ...)
|
|
35
43
|
site (str, required)
|
|
36
44
|
Site name (North or South).
|
|
37
|
-
illuminator (str, optional)
|
|
38
|
-
Illuminator in array, e.g., ILLN-01.
|
|
39
|
-
light_source_setup (str, optional)
|
|
40
|
-
Select calibration light source positioning/setup:
|
|
41
|
-
- "variable" for varying distances.
|
|
42
|
-
- "layout" for actual telescope positions.
|
|
43
45
|
model_version (str, optional)
|
|
44
46
|
Version of the simulation model.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-------
|
|
53
|
-
|
|
54
|
-
Simulate isotropic light source at different distances for the MSTN-04:
|
|
55
|
-
|
|
56
|
-
.. code-block:: console
|
|
57
|
-
|
|
58
|
-
simtools-simulate-illuminator --telescope MSTN-04 --site North \
|
|
59
|
-
--illuminator ILLN-01 --light_source_setup variable \
|
|
60
|
-
--model_version 6.0.0 ```
|
|
61
|
-
|
|
62
|
-
Expected Output:
|
|
63
|
-
|
|
64
|
-
.. code-block:: console
|
|
65
|
-
|
|
66
|
-
light-emission package stage:
|
|
67
|
-
File '/workdir/external/simtools/simtools-output/light_emission/model/
|
|
68
|
-
atmprof_ecmwf_north_winter_fixed.dat' registered for atmospheric profile 99.
|
|
69
|
-
Atmospheric profile 99 to be read from file '/workdir/external/simtools/
|
|
70
|
-
simtools-output/light_emission/model/atmprof_ecmwf_north_winter_fixed.dat'.
|
|
71
|
-
Atmospheric profile 99 with 55 levels read from file /workdir/external/
|
|
72
|
-
simtools/simtools-output/light_emission/model/atmprof_ecmwf_north_winter_fixed.dat
|
|
73
|
-
Initialize atmosphere ranging from 0.000 to 120.000 km a.s.l.
|
|
74
|
-
IACT control parameter line: print_events 999 10 100 1000 0
|
|
75
|
-
Case 1: 1 event with 1e+10 photons.
|
|
76
|
-
Using IACT/ATMO package version 1.67 (2023-11-10) for CORSIKA 6.999
|
|
77
|
-
Output file /workdir/external/simtools/simtools-output/light_emission/xyzls.iact.gz
|
|
78
|
-
not yet created.
|
|
79
|
-
Telescope output file: '/workdir/external/simtools/simtools-output/
|
|
80
|
-
light_emission/xyzls.iact.gz'
|
|
81
|
-
....
|
|
82
|
-
....
|
|
83
|
-
Sim_telarray stage:
|
|
84
|
-
Telescope 1 triggered (1/0/0/0, mask 1), summation from 36 to 95 of 105
|
|
85
|
-
Event end data has been found.
|
|
86
|
-
Shower of 0.0000 TeV energy was seen in 1 of 1 cases.
|
|
87
|
-
Photon statistics:
|
|
88
|
-
All photons: 928518
|
|
89
|
-
Used photons: 928518
|
|
90
|
-
Not absorbed/max. Q.E.: 189560
|
|
91
|
-
Reflected on mirror: 26815
|
|
92
|
-
Camera hit: 25574
|
|
93
|
-
Pixel hit: 25574
|
|
94
|
-
Detected: 20998
|
|
95
|
-
Trigger statistics:
|
|
96
|
-
Tel. triggered: 1
|
|
97
|
-
Tel. + array: 1
|
|
98
|
-
Early readout: 0
|
|
99
|
-
Late readout: 0
|
|
100
|
-
Finish data conversion ...
|
|
101
|
-
Writing 13 histograms to output file.
|
|
102
|
-
|
|
47
|
+
light_source_position (float, float, float, optional)
|
|
48
|
+
Light source position (x,y,z) relative to the array center (ground coordinates) in
|
|
49
|
+
m. If not set, the position from the simulation model is used.
|
|
50
|
+
light_source_pointing (float, float, float, optional)
|
|
51
|
+
Light source pointing direction. If not set, the pointing from the simulation model is used.
|
|
52
|
+
output_prefix (str, optional)
|
|
53
|
+
Prefix for output files (default: empty).
|
|
103
54
|
"""
|
|
104
55
|
|
|
105
|
-
import
|
|
106
|
-
from pathlib import Path
|
|
107
|
-
|
|
108
|
-
import astropy.units as u
|
|
109
|
-
|
|
110
|
-
import simtools.utils.general as gen
|
|
56
|
+
from simtools.application_control import get_application_label, startup_application
|
|
111
57
|
from simtools.configuration import configurator
|
|
112
|
-
from simtools.model.calibration_model import CalibrationModel
|
|
113
|
-
from simtools.model.model_utils import initialize_simulation_models
|
|
114
58
|
from simtools.simtel.simulator_light_emission import SimulatorLightEmission
|
|
115
59
|
|
|
116
60
|
|
|
117
|
-
def _parse(
|
|
61
|
+
def _parse():
|
|
118
62
|
"""Parse command line configuration."""
|
|
119
63
|
config = configurator.Configurator(
|
|
120
|
-
label=
|
|
64
|
+
label=get_application_label(__file__),
|
|
121
65
|
description=(
|
|
122
|
-
"Simulate
|
|
66
|
+
"Simulate light emission by a calibration light source (not attached to a telescope)."
|
|
123
67
|
),
|
|
124
68
|
)
|
|
125
69
|
config.parser.add_argument(
|
|
126
|
-
"--
|
|
127
|
-
help="
|
|
128
|
-
type=float,
|
|
129
|
-
default=0.0,
|
|
130
|
-
required=False,
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
config.parser.add_argument(
|
|
134
|
-
"--light_source_setup",
|
|
135
|
-
help="Select calibration light source positioning/setup: \
|
|
136
|
-
varying distances (variable), layout positions (layout)",
|
|
70
|
+
"--light_source",
|
|
71
|
+
help="Illuminator name, i.e. ILLN-design",
|
|
137
72
|
type=str,
|
|
138
|
-
choices=["layout", "variable"],
|
|
139
73
|
default=None,
|
|
140
74
|
required=True,
|
|
141
75
|
)
|
|
142
|
-
config.parser.
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
76
|
+
configurable_light_source_args = config.parser.add_argument_group(
|
|
77
|
+
"Configurable light source position and pointing (override simulation model values)"
|
|
78
|
+
)
|
|
79
|
+
configurable_light_source_args.add_argument(
|
|
80
|
+
"--light_source_position",
|
|
81
|
+
help="Light source position (x,y,z) relative to the array center (ground coordinates) in m",
|
|
82
|
+
metavar=("X", "Y", "Z"),
|
|
83
|
+
nargs=3,
|
|
146
84
|
required=False,
|
|
147
85
|
)
|
|
148
|
-
|
|
149
|
-
"--
|
|
150
|
-
help=
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
86
|
+
configurable_light_source_args.add_argument(
|
|
87
|
+
"--light_source_pointing",
|
|
88
|
+
help=(
|
|
89
|
+
"Light source pointing direction "
|
|
90
|
+
"(Example for pointing downwards: --light_source_pointing 0 0 -1)"
|
|
91
|
+
),
|
|
92
|
+
metavar=("X", "Y", "Z"),
|
|
93
|
+
nargs=3,
|
|
94
|
+
required=False,
|
|
154
95
|
)
|
|
155
96
|
config.parser.add_argument(
|
|
156
|
-
"--
|
|
97
|
+
"--number_of_events",
|
|
157
98
|
help="Number of events to simulate",
|
|
158
99
|
type=int,
|
|
159
100
|
default=1,
|
|
@@ -173,98 +114,16 @@ def _parse(label):
|
|
|
173
114
|
)
|
|
174
115
|
|
|
175
116
|
|
|
176
|
-
def light_emission_configs(args_dict):
|
|
177
|
-
"""
|
|
178
|
-
Define default light emission configurations.
|
|
179
|
-
|
|
180
|
-
Predefined angular distribution names not requiring to read any table are
|
|
181
|
-
"Isotropic", "Gauss:<rms>", "Rayleigh", "Cone:<angle>", and "FilledCone:<angle>", "Parallel",
|
|
182
|
-
with all angles given in degrees, all with respect to the given direction vector
|
|
183
|
-
(vertically downwards if missing). If the light source has a non-zero length and velocity
|
|
184
|
-
(in units of the vacuum speed of light), it is handled as a moving source,
|
|
185
|
-
in the given direction.
|
|
186
|
-
|
|
187
|
-
Parameters
|
|
188
|
-
----------
|
|
189
|
-
args_dict: dict
|
|
190
|
-
Dictionary with command line arguments.
|
|
191
|
-
|
|
192
|
-
args_dict: dict
|
|
193
|
-
Dictionary with command line arguments.
|
|
194
|
-
|
|
195
|
-
Returns
|
|
196
|
-
-------
|
|
197
|
-
default_config: dict
|
|
198
|
-
Default light emission configuration.
|
|
199
|
-
"""
|
|
200
|
-
if args_dict["light_source_setup"] == "variable":
|
|
201
|
-
cfg = {
|
|
202
|
-
"x_pos": {"len": 1, "unit": u.Unit("cm"), "default": 0 * u.cm, "names": ["x_position"]},
|
|
203
|
-
"y_pos": {"len": 1, "unit": u.Unit("cm"), "default": 0 * u.cm, "names": ["y_position"]},
|
|
204
|
-
"z_pos": {
|
|
205
|
-
"len": 1,
|
|
206
|
-
"unit": u.Unit("cm"),
|
|
207
|
-
"default": [i * 100 for i in [200, 300, 400, 600, 800, 1200, 2000, 4000]] * u.cm,
|
|
208
|
-
"names": ["z_position"],
|
|
209
|
-
},
|
|
210
|
-
"direction": {
|
|
211
|
-
"len": 3,
|
|
212
|
-
"unit": u.dimensionless_unscaled,
|
|
213
|
-
"default": [0, 0, -1],
|
|
214
|
-
"names": ["direction", "cx,cy,cz"],
|
|
215
|
-
},
|
|
216
|
-
}
|
|
217
|
-
args_dict.update(cfg)
|
|
218
|
-
return args_dict
|
|
219
|
-
return args_dict
|
|
220
|
-
|
|
221
|
-
|
|
222
117
|
def main():
|
|
223
|
-
"""Simulate light emission."""
|
|
224
|
-
|
|
225
|
-
args_dict, db_config = _parse(label)
|
|
226
|
-
light_emission_config = light_emission_configs(args_dict)
|
|
227
|
-
print(light_emission_config)
|
|
228
|
-
logger = logging.getLogger()
|
|
229
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
230
|
-
|
|
231
|
-
telescope_model, site_model = initialize_simulation_models(
|
|
232
|
-
label=label,
|
|
233
|
-
db_config=db_config,
|
|
234
|
-
site=args_dict["site"],
|
|
235
|
-
telescope_name=args_dict["telescope"],
|
|
236
|
-
model_version=args_dict["model_version"],
|
|
237
|
-
)
|
|
238
|
-
|
|
239
|
-
calibration_model = CalibrationModel(
|
|
240
|
-
site=args_dict["site"],
|
|
241
|
-
calibration_device_model_name=args_dict["illuminator"],
|
|
242
|
-
mongo_db_config=db_config,
|
|
243
|
-
model_version=args_dict["model_version"],
|
|
244
|
-
label=label,
|
|
245
|
-
)
|
|
118
|
+
"""Simulate light emission from illuminator."""
|
|
119
|
+
app_context = startup_application(_parse)
|
|
246
120
|
|
|
247
121
|
light_source = SimulatorLightEmission(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
light_emission_config=light_emission_config,
|
|
252
|
-
light_source_setup=args_dict["light_source_setup"],
|
|
253
|
-
simtel_path=args_dict["simtel_path"],
|
|
254
|
-
light_source_type="illuminator",
|
|
255
|
-
label=label,
|
|
256
|
-
test=args_dict["test"],
|
|
122
|
+
light_emission_config=app_context.args,
|
|
123
|
+
db_config=app_context.db_config,
|
|
124
|
+
label=app_context.args.get("label"),
|
|
257
125
|
)
|
|
258
|
-
|
|
259
|
-
if args_dict["light_source_setup"] == "variable":
|
|
260
|
-
outputs = light_source.simulate_variable_distances(args_dict)
|
|
261
|
-
elif args_dict["light_source_setup"] == "layout":
|
|
262
|
-
outputs = light_source.simulate_layout_positions(args_dict)
|
|
263
|
-
else:
|
|
264
|
-
outputs = []
|
|
265
|
-
|
|
266
|
-
if outputs:
|
|
267
|
-
logger.info("Simulation outputs:\n%s", "\n".join(str(p) for p in outputs))
|
|
126
|
+
light_source.simulate()
|
|
268
127
|
|
|
269
128
|
|
|
270
129
|
if __name__ == "__main__":
|
|
@@ -1,47 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/python3
|
|
2
2
|
|
|
3
3
|
r"""
|
|
4
|
-
Simulate
|
|
4
|
+
Simulate pedestal events.
|
|
5
5
|
|
|
6
|
-
Use sim_telarray to simulate
|
|
7
|
-
The following types
|
|
6
|
+
Use sim_telarray to simulate pedestal events for an array of telescopes.
|
|
7
|
+
The following types are supported:
|
|
8
8
|
|
|
9
9
|
* Pedestal events (includes night-sky background and camera noise)
|
|
10
10
|
* Dark pedestal events (closed camera lid, camera noise only)
|
|
11
|
-
*
|
|
11
|
+
* NSB-only pedestal events (open camera lid, night-sky background only, no camera noise)
|
|
12
12
|
|
|
13
13
|
Example
|
|
14
14
|
-------
|
|
15
15
|
|
|
16
|
-
Simulate pedestal events for
|
|
16
|
+
Simulate pedestal events for Alpha North. The assumed level night-sky background is 2.0 times the
|
|
17
17
|
nominal value. A list of stars can be provided to simulate additional contributions.
|
|
18
18
|
|
|
19
19
|
.. code-block:: console
|
|
20
20
|
|
|
21
|
-
simtools-simulate-
|
|
21
|
+
simtools-simulate-pedestals --run_mode=pedestals \\
|
|
22
22
|
--run_number 10 --number_of_events 1000 \\
|
|
23
23
|
--array_layout_name alpha --site North \\
|
|
24
24
|
--model_version 6.0.0 \\
|
|
25
25
|
--zenith_angle 20 --azimuth_angle 0 \\
|
|
26
26
|
--nsb_scaling_factor 2.0
|
|
27
27
|
|
|
28
|
-
Simulate flasher events for alpha South. Note that the same flasher configuration is used
|
|
29
|
-
for all telescopes.
|
|
30
|
-
|
|
31
|
-
.. code-block:: console
|
|
32
|
-
|
|
33
|
-
simtools-simulate-calibration-events --run_mode=flasher \\
|
|
34
|
-
--run_number 10 --number_of_events 1000 \\
|
|
35
|
-
--array_layout_name subsystem_msts --site South \\
|
|
36
|
-
--model_version 6.0.0 \\
|
|
37
|
-
--zenith_angle 20 --azimuth_angle 0 \\
|
|
38
|
-
--flasher_photons 500 --flasher_var_photons 0.05 \\
|
|
39
|
-
--flasher_exp_time 1.59 --flasher_sig_time 0.4
|
|
40
28
|
|
|
41
29
|
Command Line Arguments
|
|
42
30
|
----------------------
|
|
43
31
|
run_mode (str, required)
|
|
44
|
-
Run mode, e.g. "pedestals"
|
|
32
|
+
Run mode, e.g. "pedestals"
|
|
45
33
|
run_number (int, required)
|
|
46
34
|
Run number for the simulation.
|
|
47
35
|
number_of_events (int, required)
|
|
@@ -64,38 +52,28 @@ zenith_angle (float, optional)
|
|
|
64
52
|
Zenith angle in degrees.
|
|
65
53
|
azimuth_angle (float, optional)
|
|
66
54
|
Azimuth angle in degrees.
|
|
67
|
-
flasher_photons (float, optional)
|
|
68
|
-
Number of photons in the flasher pulse at each photodetector.
|
|
69
|
-
flasher_var_photons (float, optional)
|
|
70
|
-
Relative variance of the number of photons in the flasher pulse.
|
|
71
|
-
flasher_exp_time (float, optional)
|
|
72
|
-
Exponential decay time of the flasher pulse in nano-seconds.
|
|
73
|
-
flasher_sig_time (float, optional)
|
|
74
|
-
Sigma of Gaussian-shaped flasher pulse in nano-seconds.
|
|
75
|
-
|
|
76
55
|
"""
|
|
77
56
|
|
|
78
|
-
import
|
|
79
|
-
from pathlib import Path
|
|
80
|
-
|
|
81
|
-
import simtools.utils.general as gen
|
|
57
|
+
from simtools.application_control import get_application_label, startup_application
|
|
82
58
|
from simtools.configuration import configurator
|
|
83
59
|
from simtools.simulator import Simulator
|
|
84
60
|
|
|
85
61
|
|
|
86
|
-
def _parse(
|
|
62
|
+
def _parse():
|
|
87
63
|
"""Parse command line configuration."""
|
|
88
|
-
config = configurator.Configurator(
|
|
64
|
+
config = configurator.Configurator(
|
|
65
|
+
label=get_application_label(__file__), description="Simulate calibration events."
|
|
66
|
+
)
|
|
89
67
|
config.parser.add_argument(
|
|
90
68
|
"--run_mode",
|
|
91
69
|
help="Calibration run mode",
|
|
92
70
|
type=str,
|
|
93
71
|
required=True,
|
|
94
|
-
choices=["pedestals", "dark_pedestals", "nsb_only_pedestals"
|
|
72
|
+
choices=["pedestals", "dark_pedestals", "nsb_only_pedestals"],
|
|
95
73
|
)
|
|
96
74
|
config.parser.add_argument(
|
|
97
75
|
"--number_of_events",
|
|
98
|
-
help="Number of
|
|
76
|
+
help="Number of pedestal events to simulate",
|
|
99
77
|
type=int,
|
|
100
78
|
required=True,
|
|
101
79
|
)
|
|
@@ -115,31 +93,6 @@ def _parse(label):
|
|
|
115
93
|
type=str,
|
|
116
94
|
default=None,
|
|
117
95
|
)
|
|
118
|
-
flasher_args = config.parser.add_argument_group("Flasher configuration")
|
|
119
|
-
flasher_args.add_argument(
|
|
120
|
-
"--flasher_photons",
|
|
121
|
-
help="Number of photons in the flasher pulse at each photodetector.",
|
|
122
|
-
type=float,
|
|
123
|
-
default=500.0,
|
|
124
|
-
)
|
|
125
|
-
flasher_args.add_argument(
|
|
126
|
-
"--flasher_var_photons",
|
|
127
|
-
help="Relative variance of the number of photons in the flasher pulse.",
|
|
128
|
-
type=float,
|
|
129
|
-
default=0.05,
|
|
130
|
-
)
|
|
131
|
-
flasher_args.add_argument(
|
|
132
|
-
"--flasher_exp_time",
|
|
133
|
-
help="Exponential decay time of the flasher pulse in nanoseconds.",
|
|
134
|
-
type=float,
|
|
135
|
-
default=0.0,
|
|
136
|
-
)
|
|
137
|
-
flasher_args.add_argument(
|
|
138
|
-
"--flasher_sig_time",
|
|
139
|
-
help="Sigma of Gaussian-shaped flasher pulse in nanoseconds.",
|
|
140
|
-
type=float,
|
|
141
|
-
default=0.0,
|
|
142
|
-
)
|
|
143
96
|
|
|
144
97
|
return config.initialize(
|
|
145
98
|
db_config=True,
|
|
@@ -151,14 +104,15 @@ def _parse(label):
|
|
|
151
104
|
)
|
|
152
105
|
|
|
153
106
|
|
|
154
|
-
def main():
|
|
155
|
-
|
|
156
|
-
|
|
107
|
+
def main():
|
|
108
|
+
"""Simulate pedestal events."""
|
|
109
|
+
app_context = startup_application(_parse)
|
|
157
110
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
111
|
+
simulator = Simulator(
|
|
112
|
+
label=app_context.args.get("label"),
|
|
113
|
+
args_dict=app_context.args,
|
|
114
|
+
db_config=app_context.db_config,
|
|
115
|
+
)
|
|
162
116
|
simulator.simulate()
|
|
163
117
|
|
|
164
118
|
|
|
@@ -67,29 +67,14 @@ r"""
|
|
|
67
67
|
will be written to data_directory/label/simtel-data.
|
|
68
68
|
"""
|
|
69
69
|
|
|
70
|
-
import
|
|
71
|
-
|
|
72
|
-
import simtools.utils.general as gen
|
|
70
|
+
from simtools.application_control import startup_application
|
|
73
71
|
from simtools.configuration import configurator
|
|
74
72
|
from simtools.simulator import Simulator
|
|
75
73
|
|
|
76
74
|
|
|
77
|
-
def _parse(
|
|
78
|
-
"""
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Parameters
|
|
82
|
-
----------
|
|
83
|
-
description: str
|
|
84
|
-
Application description.
|
|
85
|
-
|
|
86
|
-
Returns
|
|
87
|
-
-------
|
|
88
|
-
CommandLineParser
|
|
89
|
-
Command line parser object.
|
|
90
|
-
|
|
91
|
-
"""
|
|
92
|
-
config = configurator.Configurator(description=description)
|
|
75
|
+
def _parse():
|
|
76
|
+
"""Parse command line configuration."""
|
|
77
|
+
config = configurator.Configurator(description="Run simulations for productions")
|
|
93
78
|
config.parser.add_argument(
|
|
94
79
|
"--data_directory",
|
|
95
80
|
help=(
|
|
@@ -152,27 +137,30 @@ def _parse(description=None):
|
|
|
152
137
|
)
|
|
153
138
|
|
|
154
139
|
|
|
155
|
-
def main():
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
logger = logging.getLogger()
|
|
159
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
140
|
+
def main():
|
|
141
|
+
"""Run simulations for productions."""
|
|
142
|
+
app_context = startup_application(_parse, setup_io_handler=False)
|
|
160
143
|
|
|
161
|
-
simulator = Simulator(
|
|
144
|
+
simulator = Simulator(
|
|
145
|
+
label=app_context.args.get("label"),
|
|
146
|
+
args_dict=app_context.args,
|
|
147
|
+
db_config=app_context.db_config,
|
|
148
|
+
)
|
|
162
149
|
|
|
163
150
|
simulator.simulate()
|
|
164
151
|
simulator.validate_metadata()
|
|
165
152
|
|
|
166
|
-
logger.info(
|
|
167
|
-
f"Production run complete for primary {
|
|
168
|
-
f"from {
|
|
169
|
-
f"
|
|
153
|
+
app_context.logger.info(
|
|
154
|
+
f"Production run complete for primary {app_context.args['primary']} showers "
|
|
155
|
+
f"from {app_context.args['azimuth_angle']} azimuth and "
|
|
156
|
+
f"{app_context.args['zenith_angle']} zenith "
|
|
157
|
+
f"at {app_context.args['site']} site, using {app_context.args['model_version']} model."
|
|
170
158
|
)
|
|
171
|
-
if
|
|
159
|
+
if app_context.args["save_reduced_event_lists"]:
|
|
172
160
|
simulator.save_reduced_event_lists()
|
|
173
|
-
if
|
|
174
|
-
simulator.pack_for_register(
|
|
175
|
-
if
|
|
161
|
+
if app_context.args.get("pack_for_grid_register"):
|
|
162
|
+
simulator.pack_for_register(app_context.args["pack_for_grid_register"])
|
|
163
|
+
if app_context.args["save_file_lists"]:
|
|
176
164
|
simulator.save_file_lists()
|
|
177
165
|
|
|
178
166
|
|
|
@@ -45,29 +45,17 @@ priority (int, optional)
|
|
|
45
45
|
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
|
-
import
|
|
49
|
-
|
|
50
|
-
import simtools.utils.general as gen
|
|
48
|
+
from simtools.application_control import get_application_label, startup_application
|
|
51
49
|
from simtools.configuration import configurator
|
|
52
50
|
from simtools.job_execution import htcondor_script_generator
|
|
53
51
|
|
|
54
52
|
|
|
55
|
-
def _parse(
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
description: str
|
|
62
|
-
Application description.
|
|
63
|
-
|
|
64
|
-
Returns
|
|
65
|
-
-------
|
|
66
|
-
CommandLineParser
|
|
67
|
-
Command line parser object.
|
|
68
|
-
|
|
69
|
-
"""
|
|
70
|
-
config = configurator.Configurator(description=description)
|
|
53
|
+
def _parse():
|
|
54
|
+
"""Parse command line configuration."""
|
|
55
|
+
config = configurator.Configurator(
|
|
56
|
+
label=get_application_label(__file__),
|
|
57
|
+
description="Prepare simulations production for HT Condor job submission",
|
|
58
|
+
)
|
|
71
59
|
config.parser.add_argument(
|
|
72
60
|
"--apptainer_image",
|
|
73
61
|
help="Apptainer image to use for the simulation (full path).",
|
|
@@ -88,13 +76,11 @@ def _parse(description=None):
|
|
|
88
76
|
)
|
|
89
77
|
|
|
90
78
|
|
|
91
|
-
def main():
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
logger = logging.getLogger()
|
|
95
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
79
|
+
def main():
|
|
80
|
+
"""Generate HT Condor submission script and submit file."""
|
|
81
|
+
app_context = startup_application(_parse)
|
|
96
82
|
|
|
97
|
-
htcondor_script_generator.generate_submission_script(
|
|
83
|
+
htcondor_script_generator.generate_submission_script(app_context.args)
|
|
98
84
|
|
|
99
85
|
|
|
100
86
|
if __name__ == "__main__":
|
|
@@ -32,19 +32,19 @@ r"""
|
|
|
32
32
|
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
import
|
|
36
|
-
from pathlib import Path
|
|
37
|
-
|
|
38
|
-
import simtools.utils.general as gen
|
|
35
|
+
from simtools.application_control import get_application_label, startup_application
|
|
39
36
|
from simtools.configuration import configurator
|
|
40
37
|
from simtools.db import db_handler
|
|
41
38
|
from simtools.io import ascii_handler
|
|
42
39
|
from simtools.layout.array_layout_utils import validate_array_layouts_with_db, write_array_layouts
|
|
43
40
|
|
|
44
41
|
|
|
45
|
-
def _parse(
|
|
42
|
+
def _parse():
|
|
46
43
|
"""Parse command line configuration."""
|
|
47
|
-
config = configurator.Configurator(
|
|
44
|
+
config = configurator.Configurator(
|
|
45
|
+
label=get_application_label(__file__),
|
|
46
|
+
description="Submit and validate array layouts.",
|
|
47
|
+
)
|
|
48
48
|
|
|
49
49
|
config.parser.add_argument(
|
|
50
50
|
"--array_layouts",
|
|
@@ -69,25 +69,22 @@ def _parse(label, description):
|
|
|
69
69
|
return config.initialize(output=True, db_config=True, simulation_model=["model_version"])
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
def main():
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
description="Submit and validate array layouts.",
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
logger = logging.getLogger()
|
|
79
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
72
|
+
def main():
|
|
73
|
+
"""Submit and validate array layouts."""
|
|
74
|
+
app_context = startup_application(_parse)
|
|
80
75
|
|
|
81
|
-
db = db_handler.DatabaseHandler(mongo_db_config=db_config)
|
|
76
|
+
db = db_handler.DatabaseHandler(mongo_db_config=app_context.db_config)
|
|
82
77
|
|
|
83
78
|
array_layouts = validate_array_layouts_with_db(
|
|
84
79
|
production_table=db.read_production_table_from_mongo_db(
|
|
85
|
-
collection_name="telescopes", model_version=
|
|
80
|
+
collection_name="telescopes", model_version=app_context.args["model_version"]
|
|
86
81
|
),
|
|
87
|
-
array_layouts=ascii_handler.collect_data_from_file(
|
|
82
|
+
array_layouts=ascii_handler.collect_data_from_file(app_context.args["array_layouts"]),
|
|
88
83
|
)
|
|
89
84
|
|
|
90
|
-
write_array_layouts(
|
|
85
|
+
write_array_layouts(
|
|
86
|
+
array_layouts=array_layouts, args_dict=app_context.args, db_config=app_context.db_config
|
|
87
|
+
)
|
|
91
88
|
|
|
92
89
|
|
|
93
90
|
if __name__ == "__main__":
|