gammasimtools 0.6.1__py3-none-any.whl → 0.8.2__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.2.dist-info/METADATA +173 -0
- gammasimtools-0.8.2.dist-info/RECORD +345 -0
- {gammasimtools-0.6.1.dist-info → gammasimtools-0.8.2.dist-info}/WHEEL +1 -1
- gammasimtools-0.8.2.dist-info/entry_points.txt +31 -0
- simtools/_dev_version/__init__.py +9 -0
- simtools/_version.py +2 -2
- simtools/applications/calculate_trigger_rate.py +210 -0
- simtools/applications/convert_all_model_parameters_from_simtel.py +372 -0
- simtools/applications/{print_array_elements.py → convert_geo_coordinates_of_array_elements.py} +58 -63
- simtools/applications/convert_model_parameter_from_simtel.py +119 -0
- simtools/applications/{add_file_to_db.py → db_add_file_to_db.py} +70 -60
- simtools/applications/db_add_model_parameters_from_repository_to_db.py +184 -0
- simtools/applications/db_add_value_from_json_to_db.py +105 -0
- simtools/applications/db_development_tools/write_array_elements_positions_to_repository.py +180 -0
- simtools/applications/db_get_array_layouts_from_db.py +162 -0
- simtools/applications/{get_file_from_db.py → db_get_file_from_db.py} +30 -34
- simtools/applications/db_get_parameter_from_db.py +131 -0
- simtools/applications/db_inspect_databases.py +52 -0
- simtools/applications/derive_mirror_rnda.py +39 -255
- simtools/applications/derive_psf_parameters.py +441 -0
- simtools/applications/generate_array_config.py +82 -0
- simtools/applications/generate_corsika_histograms.py +52 -52
- simtools/applications/generate_default_metadata.py +5 -8
- simtools/applications/generate_regular_arrays.py +117 -0
- simtools/applications/generate_simtel_array_histograms.py +97 -56
- simtools/applications/plot_array_layout.py +345 -115
- simtools/applications/production_generate_simulation_config.py +158 -0
- simtools/applications/production_scale_events.py +168 -0
- simtools/applications/simulate_light_emission.py +478 -0
- simtools/applications/simulate_prod.py +97 -175
- simtools/applications/submit_data_from_external.py +9 -12
- simtools/applications/submit_model_parameter_from_external.py +122 -0
- simtools/applications/validate_camera_efficiency.py +35 -102
- simtools/applications/validate_camera_fov.py +20 -19
- simtools/applications/{compare_cumulative_psf.py → validate_cumulative_psf.py} +45 -44
- simtools/applications/validate_file_using_schema.py +111 -47
- simtools/applications/validate_optics.py +17 -22
- simtools/camera_efficiency.py +193 -202
- simtools/configuration/commandline_parser.py +384 -96
- simtools/configuration/configurator.py +55 -71
- simtools/constants.py +5 -5
- simtools/corsika/corsika_config.py +482 -342
- simtools/corsika/corsika_histograms.py +226 -204
- simtools/corsika/corsika_histograms_visualize.py +23 -24
- simtools/corsika/primary_particle.py +159 -0
- simtools/data_model/data_reader.py +25 -20
- simtools/data_model/format_checkers.py +52 -0
- simtools/data_model/metadata_collector.py +211 -185
- simtools/data_model/metadata_model.py +115 -37
- simtools/data_model/model_data_writer.py +335 -26
- simtools/data_model/validate_data.py +366 -154
- simtools/db/db_array_elements.py +130 -0
- simtools/db/db_from_repo_handler.py +106 -0
- simtools/db/db_handler.py +1246 -0
- simtools/io_operations/hdf5_handler.py +3 -1
- simtools/io_operations/io_handler.py +32 -57
- simtools/job_execution/job_manager.py +82 -69
- simtools/layout/array_layout.py +325 -537
- simtools/layout/geo_coordinates.py +8 -11
- simtools/layout/telescope_position.py +163 -86
- simtools/model/array_model.py +312 -259
- simtools/model/calibration_model.py +50 -0
- simtools/model/camera.py +277 -523
- simtools/model/mirrors.py +68 -49
- simtools/model/model_parameter.py +602 -0
- simtools/model/model_utils.py +11 -39
- simtools/model/site_model.py +161 -0
- simtools/model/telescope_model.py +143 -633
- simtools/production_configuration/calculate_statistical_errors_grid_point.py +454 -0
- simtools/production_configuration/event_scaler.py +146 -0
- simtools/production_configuration/generate_simulation_config.py +193 -0
- simtools/production_configuration/interpolation_handler.py +197 -0
- simtools/ray_tracing/__init__.py +0 -0
- simtools/ray_tracing/mirror_panel_psf.py +280 -0
- simtools/{psf_analysis.py → ray_tracing/psf_analysis.py} +133 -47
- simtools/ray_tracing/ray_tracing.py +646 -0
- simtools/runners/__init__.py +0 -0
- simtools/runners/corsika_runner.py +240 -0
- simtools/runners/corsika_simtel_runner.py +225 -0
- simtools/runners/runner_services.py +307 -0
- simtools/runners/simtel_runner.py +224 -0
- simtools/schemas/array_elements.yml +137 -0
- simtools/schemas/integration_tests_config.metaschema.yml +93 -0
- simtools/schemas/metadata.metaschema.yml +6 -0
- simtools/schemas/model_parameter.metaschema.yml +78 -0
- simtools/schemas/{data.metaschema.yml → model_parameter_and_data_schema.metaschema.yml} +27 -44
- simtools/schemas/model_parameters/adjust_gain.schema.yml +37 -0
- simtools/schemas/model_parameters/altitude.schema.yml +37 -0
- simtools/schemas/model_parameters/array_coordinates.schema.yml +33 -0
- simtools/schemas/model_parameters/array_coordinates_UTM.schema.yml +77 -0
- simtools/schemas/model_parameters/array_element_position_ground.schema.yml +39 -0
- simtools/schemas/model_parameters/array_element_position_utm.schema.yml +39 -0
- simtools/schemas/model_parameters/array_layouts.schema.yml +48 -0
- simtools/schemas/model_parameters/array_triggers.schema.yml +93 -0
- simtools/schemas/model_parameters/asum_clipping.schema.yml +38 -0
- simtools/schemas/model_parameters/asum_offset.schema.yml +35 -0
- simtools/schemas/model_parameters/asum_shaping.schema.yml +35 -0
- simtools/schemas/model_parameters/asum_threshold.schema.yml +38 -0
- simtools/schemas/model_parameters/atmospheric_profile.schema.yml +32 -0
- simtools/schemas/model_parameters/atmospheric_transmission.schema.yml +35 -0
- simtools/schemas/model_parameters/axes_offsets.schema.yml +53 -0
- simtools/schemas/model_parameters/camera_body_diameter.schema.yml +40 -0
- simtools/schemas/model_parameters/camera_body_shape.schema.yml +45 -0
- simtools/schemas/model_parameters/camera_config_file.schema.yml +40 -0
- simtools/schemas/model_parameters/camera_config_rotate.schema.yml +36 -0
- simtools/schemas/model_parameters/camera_degraded_efficiency.schema.yml +43 -0
- simtools/schemas/model_parameters/camera_degraded_map.schema.yml +42 -0
- simtools/schemas/model_parameters/camera_depth.schema.yml +42 -0
- simtools/schemas/model_parameters/camera_filter.schema.yml +45 -0
- simtools/schemas/model_parameters/camera_filter_incidence_angle.schema.yml +29 -0
- simtools/schemas/model_parameters/camera_pixels.schema.yml +36 -0
- simtools/schemas/model_parameters/camera_transmission.schema.yml +41 -0
- simtools/schemas/model_parameters/channels_per_chip.schema.yml +36 -0
- simtools/schemas/model_parameters/correct_nsb_spectrum_to_telescope_altitude.schema.yml +35 -0
- simtools/schemas/model_parameters/corsika_cherenkov_photon_bunch_size.schema.yml +27 -0
- simtools/schemas/model_parameters/corsika_cherenkov_photon_wavelength_range.schema.yml +38 -0
- simtools/schemas/model_parameters/corsika_first_interaction_height.schema.yml +28 -0
- simtools/schemas/model_parameters/corsika_iact_io_buffer.schema.yml +23 -0
- simtools/schemas/model_parameters/corsika_iact_max_bunches.schema.yml +27 -0
- simtools/schemas/model_parameters/corsika_iact_split_auto.schema.yml +28 -0
- simtools/schemas/model_parameters/corsika_longitudinal_shower_development.schema.yml +27 -0
- simtools/schemas/model_parameters/corsika_observation_level.schema.yml +38 -0
- simtools/schemas/model_parameters/corsika_particle_kinetic_energy_cutoff.schema.yml +52 -0
- simtools/schemas/model_parameters/corsika_starting_grammage.schema.yml +27 -0
- simtools/schemas/model_parameters/dark_events.schema.yml +32 -0
- simtools/schemas/model_parameters/default_trigger.schema.yml +35 -0
- simtools/schemas/model_parameters/design_model.schema.yml +31 -0
- simtools/schemas/model_parameters/disc_ac_coupled.schema.yml +32 -0
- simtools/schemas/model_parameters/disc_bins.schema.yml +39 -0
- simtools/schemas/model_parameters/disc_start.schema.yml +41 -0
- simtools/schemas/model_parameters/discriminator_amplitude.schema.yml +42 -0
- simtools/schemas/model_parameters/discriminator_fall_time.schema.yml +41 -0
- simtools/schemas/model_parameters/discriminator_gate_length.schema.yml +41 -0
- simtools/schemas/model_parameters/discriminator_hysteresis.schema.yml +39 -0
- simtools/schemas/model_parameters/discriminator_output_amplitude.schema.yml +40 -0
- simtools/schemas/model_parameters/discriminator_output_var_percent.schema.yml +41 -0
- simtools/schemas/model_parameters/discriminator_pulse_shape.schema.yml +33 -0
- simtools/schemas/model_parameters/discriminator_rise_time.schema.yml +42 -0
- simtools/schemas/model_parameters/discriminator_scale_threshold.schema.yml +37 -0
- simtools/schemas/model_parameters/discriminator_sigsum_over_threshold.schema.yml +44 -0
- simtools/schemas/model_parameters/discriminator_threshold.schema.yml +36 -0
- simtools/schemas/model_parameters/discriminator_time_over_threshold.schema.yml +45 -0
- simtools/schemas/model_parameters/discriminator_var_gate_length.schema.yml +40 -0
- simtools/schemas/model_parameters/discriminator_var_sigsum_over_threshold.schema.yml +41 -0
- simtools/schemas/model_parameters/discriminator_var_threshold.schema.yml +38 -0
- simtools/schemas/model_parameters/discriminator_var_time_over_threshold.schema.yml +38 -0
- simtools/schemas/model_parameters/dish_shape_length.schema.yml +41 -0
- simtools/schemas/model_parameters/dsum_clipping.schema.yml +38 -0
- simtools/schemas/model_parameters/dsum_ignore_below.schema.yml +38 -0
- simtools/schemas/model_parameters/dsum_offset.schema.yml +37 -0
- simtools/schemas/model_parameters/dsum_pedsub.schema.yml +33 -0
- simtools/schemas/model_parameters/dsum_pre_clipping.schema.yml +39 -0
- simtools/schemas/model_parameters/dsum_prescale.schema.yml +44 -0
- simtools/schemas/model_parameters/dsum_presum_max.schema.yml +38 -0
- simtools/schemas/model_parameters/dsum_presum_shift.schema.yml +45 -0
- simtools/schemas/model_parameters/dsum_shaping.schema.yml +44 -0
- simtools/schemas/model_parameters/dsum_shaping_renormalize.schema.yml +32 -0
- simtools/schemas/model_parameters/dsum_threshold.schema.yml +43 -0
- simtools/schemas/model_parameters/dsum_zero_clip.schema.yml +42 -0
- simtools/schemas/model_parameters/effective_focal_length.schema.yml +61 -0
- simtools/schemas/model_parameters/epsg_code.schema.yml +37 -0
- simtools/schemas/model_parameters/fadc_ac_coupled.schema.yml +35 -0
- simtools/schemas/model_parameters/fadc_amplitude.schema.yml +46 -0
- simtools/schemas/model_parameters/fadc_bins.schema.yml +40 -0
- simtools/schemas/model_parameters/fadc_compensate_pedestal.schema.yml +50 -0
- simtools/schemas/model_parameters/fadc_dev_pedestal.schema.yml +38 -0
- simtools/schemas/model_parameters/fadc_err_compensate_pedestal.schema.yml +42 -0
- simtools/schemas/model_parameters/fadc_err_pedestal.schema.yml +49 -0
- simtools/schemas/model_parameters/fadc_lg_amplitude.schema.yml +47 -0
- simtools/schemas/model_parameters/fadc_lg_compensate_pedestal.schema.yml +51 -0
- simtools/schemas/model_parameters/fadc_lg_dev_pedestal.schema.yml +37 -0
- simtools/schemas/model_parameters/fadc_lg_err_compensate_pedestal.schema.yml +43 -0
- simtools/schemas/model_parameters/fadc_lg_err_pedestal.schema.yml +49 -0
- simtools/schemas/model_parameters/fadc_lg_max_signal.schema.yml +43 -0
- simtools/schemas/model_parameters/fadc_lg_max_sum.schema.yml +39 -0
- simtools/schemas/model_parameters/fadc_lg_noise.schema.yml +42 -0
- simtools/schemas/model_parameters/fadc_lg_pedestal.schema.yml +40 -0
- simtools/schemas/model_parameters/fadc_lg_sensitivity.schema.yml +50 -0
- simtools/schemas/model_parameters/fadc_lg_sysvar_pedestal.schema.yml +42 -0
- simtools/schemas/model_parameters/fadc_lg_var_pedestal.schema.yml +41 -0
- simtools/schemas/model_parameters/fadc_lg_var_sensitivity.schema.yml +42 -0
- simtools/schemas/model_parameters/fadc_max_signal.schema.yml +43 -0
- simtools/schemas/model_parameters/fadc_max_sum.schema.yml +39 -0
- simtools/schemas/model_parameters/fadc_mhz.schema.yml +31 -0
- simtools/schemas/model_parameters/fadc_noise.schema.yml +41 -0
- simtools/schemas/model_parameters/fadc_pedestal.schema.yml +40 -0
- simtools/schemas/model_parameters/fadc_pulse_shape.schema.yml +39 -0
- simtools/schemas/model_parameters/fadc_sensitivity.schema.yml +50 -0
- simtools/schemas/model_parameters/fadc_sum_bins.schema.yml +43 -0
- simtools/schemas/model_parameters/fadc_sum_offset.schema.yml +43 -0
- simtools/schemas/model_parameters/fadc_sysvar_pedestal.schema.yml +42 -0
- simtools/schemas/model_parameters/fadc_var_pedestal.schema.yml +41 -0
- simtools/schemas/model_parameters/fadc_var_sensitivity.schema.yml +42 -0
- simtools/schemas/model_parameters/flatfielding.schema.yml +37 -0
- simtools/schemas/model_parameters/focal_length.schema.yml +45 -0
- simtools/schemas/model_parameters/focal_surface_parameters.schema.yml +158 -0
- simtools/schemas/model_parameters/focal_surface_ref_radius.schema.yml +29 -0
- simtools/schemas/model_parameters/focus_offset.schema.yml +66 -0
- simtools/schemas/model_parameters/gain_variation.schema.yml +43 -0
- simtools/schemas/model_parameters/geomag_horizontal.schema.yml +34 -0
- simtools/schemas/model_parameters/geomag_rotation.schema.yml +37 -0
- simtools/schemas/model_parameters/geomag_vertical.schema.yml +34 -0
- simtools/schemas/model_parameters/hg_lg_variation.schema.yml +36 -0
- simtools/schemas/model_parameters/iobuf_maximum.schema.yml +34 -0
- simtools/schemas/model_parameters/iobuf_output_maximum.schema.yml +34 -0
- simtools/schemas/model_parameters/laser_events.schema.yml +36 -0
- simtools/schemas/model_parameters/laser_external_trigger.schema.yml +35 -0
- simtools/schemas/model_parameters/laser_photons.schema.yml +32 -0
- simtools/schemas/model_parameters/laser_pulse_exptime.schema.yml +34 -0
- simtools/schemas/model_parameters/laser_pulse_offset.schema.yml +34 -0
- simtools/schemas/model_parameters/laser_pulse_sigtime.schema.yml +33 -0
- simtools/schemas/model_parameters/laser_pulse_twidth.schema.yml +33 -0
- simtools/schemas/model_parameters/laser_var_photons.schema.yml +33 -0
- simtools/schemas/model_parameters/laser_wavelength.schema.yml +33 -0
- simtools/schemas/model_parameters/led_events.schema.yml +34 -0
- simtools/schemas/model_parameters/led_photons.schema.yml +34 -0
- simtools/schemas/model_parameters/led_pulse_offset.schema.yml +32 -0
- simtools/schemas/model_parameters/led_pulse_sigtime.schema.yml +33 -0
- simtools/schemas/model_parameters/led_var_photons.schema.yml +34 -0
- simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml +41 -0
- simtools/schemas/model_parameters/lightguide_efficiency_vs_wavelength.schema.yml +43 -0
- simtools/schemas/model_parameters/min_photoelectrons.schema.yml +35 -0
- simtools/schemas/model_parameters/min_photons.schema.yml +32 -0
- simtools/schemas/model_parameters/mirror_align_random_distance.schema.yml +36 -0
- simtools/schemas/model_parameters/mirror_align_random_horizontal.schema.yml +64 -0
- simtools/schemas/model_parameters/mirror_align_random_vertical.schema.yml +64 -0
- simtools/schemas/model_parameters/mirror_class.schema.yml +41 -0
- simtools/schemas/model_parameters/mirror_degraded_reflection.schema.yml +51 -0
- simtools/schemas/model_parameters/mirror_focal_length.schema.yml +42 -0
- simtools/schemas/model_parameters/mirror_list.schema.yml +38 -0
- simtools/schemas/model_parameters/mirror_offset.schema.yml +41 -0
- simtools/schemas/model_parameters/mirror_panel_2f_measurements.schema.yml +39 -0
- simtools/schemas/model_parameters/mirror_reflection_random_angle.schema.yml +61 -0
- simtools/schemas/model_parameters/mirror_reflectivity.schema.yml +40 -0
- simtools/schemas/model_parameters/multiplicity_offset.schema.yml +46 -0
- simtools/schemas/model_parameters/nsb_autoscale_airmass.schema.yml +51 -0
- simtools/schemas/model_parameters/nsb_gain_drop_scale.schema.yml +37 -0
- simtools/schemas/model_parameters/nsb_offaxis.schema.yml +79 -0
- simtools/schemas/model_parameters/nsb_pixel_rate.schema.yml +47 -0
- simtools/schemas/model_parameters/nsb_reference_spectrum.schema.yml +34 -0
- simtools/schemas/model_parameters/nsb_reference_value.schema.yml +33 -0
- simtools/schemas/model_parameters/nsb_scaling_factor.schema.yml +35 -0
- simtools/schemas/model_parameters/nsb_skymap.schema.yml +39 -0
- simtools/schemas/model_parameters/nsb_spectrum.schema.yml +50 -0
- simtools/schemas/model_parameters/num_gains.schema.yml +34 -0
- simtools/schemas/model_parameters/only_triggered_telescopes.schema.yml +33 -0
- simtools/schemas/model_parameters/optics_properties.schema.yml +31 -0
- simtools/schemas/model_parameters/parabolic_dish.schema.yml +32 -0
- simtools/schemas/model_parameters/pedestal_events.schema.yml +32 -0
- simtools/schemas/model_parameters/photon_delay.schema.yml +38 -0
- simtools/schemas/model_parameters/photons_per_run.schema.yml +33 -0
- simtools/schemas/model_parameters/pixel_cells.schema.yml +35 -0
- simtools/schemas/model_parameters/pixels_parallel.schema.yml +54 -0
- simtools/schemas/model_parameters/pixeltrg_time_step.schema.yml +40 -0
- simtools/schemas/model_parameters/pm_average_gain.schema.yml +34 -0
- simtools/schemas/model_parameters/pm_collection_efficiency.schema.yml +40 -0
- simtools/schemas/model_parameters/pm_gain_index.schema.yml +36 -0
- simtools/schemas/model_parameters/pm_photoelectron_spectrum.schema.yml +41 -0
- simtools/schemas/model_parameters/pm_transit_time.schema.yml +63 -0
- simtools/schemas/model_parameters/pm_voltage_variation.schema.yml +39 -0
- simtools/schemas/model_parameters/primary_mirror_degraded_map.schema.yml +42 -0
- simtools/schemas/model_parameters/primary_mirror_diameter.schema.yml +33 -0
- simtools/schemas/model_parameters/primary_mirror_hole_diameter.schema.yml +33 -0
- simtools/schemas/model_parameters/primary_mirror_incidence_angle.schema.yml +29 -0
- simtools/schemas/model_parameters/primary_mirror_parameters.schema.yml +168 -0
- simtools/schemas/model_parameters/primary_mirror_ref_radius.schema.yml +36 -0
- simtools/schemas/model_parameters/primary_mirror_segmentation.schema.yml +34 -0
- simtools/schemas/model_parameters/qe_variation.schema.yml +43 -0
- simtools/schemas/model_parameters/quantum_efficiency.schema.yml +42 -0
- simtools/schemas/model_parameters/random_focal_length.schema.yml +45 -0
- simtools/schemas/model_parameters/random_generator.schema.yml +36 -0
- simtools/schemas/model_parameters/reference_point_altitude.schema.yml +35 -0
- simtools/schemas/model_parameters/reference_point_latitude.schema.yml +36 -0
- simtools/schemas/model_parameters/reference_point_longitude.schema.yml +36 -0
- simtools/schemas/model_parameters/reference_point_utm_east.schema.yml +34 -0
- simtools/schemas/model_parameters/reference_point_utm_north.schema.yml +34 -0
- simtools/schemas/model_parameters/sampled_output.schema.yml +31 -0
- simtools/schemas/model_parameters/save_pe_with_amplitude.schema.yml +34 -0
- simtools/schemas/model_parameters/secondary_mirror_baffle.schema.yml +79 -0
- simtools/schemas/model_parameters/secondary_mirror_degraded_map.schema.yml +42 -0
- simtools/schemas/model_parameters/secondary_mirror_degraded_reflection.schema.yml +41 -0
- simtools/schemas/model_parameters/secondary_mirror_diameter.schema.yml +33 -0
- simtools/schemas/model_parameters/secondary_mirror_hole_diameter.schema.yml +36 -0
- simtools/schemas/model_parameters/secondary_mirror_incidence_angle.schema.yml +29 -0
- simtools/schemas/model_parameters/secondary_mirror_parameters.schema.yml +168 -0
- simtools/schemas/model_parameters/secondary_mirror_ref_radius.schema.yml +36 -0
- simtools/schemas/model_parameters/secondary_mirror_reflectivity.schema.yml +35 -0
- simtools/schemas/model_parameters/secondary_mirror_segmentation.schema.yml +37 -0
- simtools/schemas/model_parameters/secondary_mirror_shadow_diameter.schema.yml +40 -0
- simtools/schemas/model_parameters/secondary_mirror_shadow_offset.schema.yml +40 -0
- simtools/schemas/model_parameters/store_photoelectrons.schema.yml +41 -0
- simtools/schemas/model_parameters/tailcut_scale.schema.yml +40 -0
- simtools/schemas/model_parameters/telescope_axis_height.schema.yml +31 -0
- simtools/schemas/model_parameters/telescope_random_angle.schema.yml +35 -0
- simtools/schemas/model_parameters/telescope_random_error.schema.yml +34 -0
- simtools/schemas/model_parameters/telescope_sphere_radius.schema.yml +37 -0
- simtools/schemas/model_parameters/telescope_transmission.schema.yml +113 -0
- simtools/schemas/model_parameters/teltrig_min_sigsum.schema.yml +41 -0
- simtools/schemas/model_parameters/teltrig_min_time.schema.yml +36 -0
- simtools/schemas/model_parameters/transit_time_calib_error.schema.yml +36 -0
- simtools/schemas/model_parameters/transit_time_compensate_error.schema.yml +37 -0
- simtools/schemas/model_parameters/transit_time_compensate_step.schema.yml +38 -0
- simtools/schemas/model_parameters/transit_time_error.schema.yml +45 -0
- simtools/schemas/model_parameters/transit_time_jitter.schema.yml +36 -0
- simtools/schemas/model_parameters/trigger_current_limit.schema.yml +32 -0
- simtools/schemas/model_parameters/trigger_delay_compensation.schema.yml +53 -0
- simtools/schemas/model_parameters/trigger_pixels.schema.yml +40 -0
- simtools/simtel/simtel_config_reader.py +353 -0
- simtools/simtel/simtel_config_writer.py +244 -63
- simtools/simtel/{simtel_events.py → simtel_io_events.py} +26 -25
- simtools/simtel/simtel_io_histogram.py +661 -0
- simtools/simtel/simtel_io_histograms.py +569 -0
- simtools/simtel/simulator_array.py +145 -0
- simtools/simtel/{simtel_runner_camera_efficiency.py → simulator_camera_efficiency.py} +76 -52
- simtools/simtel/simulator_light_emission.py +473 -0
- simtools/simtel/simulator_ray_tracing.py +262 -0
- simtools/simulator.py +220 -446
- simtools/testing/__init__.py +0 -0
- simtools/testing/assertions.py +151 -0
- simtools/testing/configuration.py +226 -0
- simtools/testing/helpers.py +42 -0
- simtools/testing/validate_output.py +240 -0
- simtools/utils/general.py +340 -437
- simtools/utils/geometry.py +12 -12
- simtools/utils/names.py +257 -644
- simtools/utils/value_conversion.py +176 -0
- simtools/version.py +3 -1
- simtools/visualization/legend_handlers.py +135 -152
- simtools/visualization/plot_camera.py +379 -0
- simtools/visualization/visualize.py +346 -167
- gammasimtools-0.6.1.dist-info/METADATA +0 -180
- gammasimtools-0.6.1.dist-info/RECORD +0 -91
- gammasimtools-0.6.1.dist-info/entry_points.txt +0 -23
- simtools/_dev_version/scm_version.py +0 -10
- simtools/applications/db_development_tools/add_new_parameter_to_db.py +0 -81
- simtools/applications/db_development_tools/add_unit_to_parameter_in_db.py +0 -59
- simtools/applications/db_development_tools/mark_non_optics_parameters_non_applicable.py +0 -102
- simtools/applications/get_parameter.py +0 -92
- simtools/applications/make_regular_arrays.py +0 -160
- simtools/applications/produce_array_config.py +0 -136
- simtools/applications/production.py +0 -313
- simtools/applications/sim_showers_for_trigger_rates.py +0 -187
- simtools/applications/tune_psf.py +0 -334
- simtools/corsika/corsika_default_config.py +0 -282
- simtools/corsika/corsika_runner.py +0 -450
- simtools/corsika_simtel/corsika_simtel_runner.py +0 -197
- simtools/db_handler.py +0 -1480
- simtools/ray_tracing.py +0 -525
- simtools/simtel/simtel_histograms.py +0 -414
- simtools/simtel/simtel_runner.py +0 -244
- simtools/simtel/simtel_runner_array.py +0 -293
- simtools/simtel/simtel_runner_ray_tracing.py +0 -277
- {gammasimtools-0.6.1.dist-info → gammasimtools-0.8.2.dist-info}/LICENSE +0 -0
- {gammasimtools-0.6.1.dist-info → gammasimtools-0.8.2.dist-info}/top_level.txt +0 -0
- /simtools/{corsika_simtel → db}/__init__.py +0 -0
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: gammasimtools
|
|
3
|
-
Version: 0.6.1
|
|
4
|
-
Summary: Tools for the Simulation System of the CTA Observatory
|
|
5
|
-
Author-email: simtools developers <simtools-developer@desy.de>
|
|
6
|
-
License: BSD 3-Clause License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2020, gammasim-tools, simtools developers
|
|
9
|
-
All rights reserved.
|
|
10
|
-
|
|
11
|
-
Redistribution and use in source and binary forms, with or without
|
|
12
|
-
modification, are permitted provided that the following conditions are met:
|
|
13
|
-
|
|
14
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
|
15
|
-
list of conditions and the following disclaimer.
|
|
16
|
-
|
|
17
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
18
|
-
this list of conditions and the following disclaimer in the documentation
|
|
19
|
-
and/or other materials provided with the distribution.
|
|
20
|
-
|
|
21
|
-
3. Neither the name of the copyright holder nor the names of its
|
|
22
|
-
contributors may be used to endorse or promote products derived from
|
|
23
|
-
this software without specific prior written permission.
|
|
24
|
-
|
|
25
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
26
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
27
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
28
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
29
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
30
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
31
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
32
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
33
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
34
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
-
|
|
36
|
-
Project-URL: bug tracker, https://github.com/gammasim/simtools/issues
|
|
37
|
-
Project-URL: documentation, https://gammasim.github.io/simtools/
|
|
38
|
-
Project-URL: repository, https://github.com/gammasim/simtools
|
|
39
|
-
Classifier: Intended Audience :: Science/Research
|
|
40
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
41
|
-
Classifier: Operating System :: OS Independent
|
|
42
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
43
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
44
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
45
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
46
|
-
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
47
|
-
Requires-Python: >=3.9
|
|
48
|
-
Description-Content-Type: text/x-rst
|
|
49
|
-
License-File: LICENSE
|
|
50
|
-
Requires-Dist: astropy
|
|
51
|
-
Requires-Dist: boost-histogram
|
|
52
|
-
Requires-Dist: ctapipe
|
|
53
|
-
Requires-Dist: eventio
|
|
54
|
-
Requires-Dist: jsonschema
|
|
55
|
-
Requires-Dist: matplotlib
|
|
56
|
-
Requires-Dist: numpy
|
|
57
|
-
Requires-Dist: pymongo
|
|
58
|
-
Requires-Dist: pyproj
|
|
59
|
-
Requires-Dist: python-dotenv
|
|
60
|
-
Requires-Dist: pyyaml
|
|
61
|
-
Requires-Dist: scipy
|
|
62
|
-
Requires-Dist: toml
|
|
63
|
-
Provides-Extra: dev
|
|
64
|
-
Requires-Dist: flake8 ; extra == 'dev'
|
|
65
|
-
Requires-Dist: pre-commit ; extra == 'dev'
|
|
66
|
-
Requires-Dist: pylint ; extra == 'dev'
|
|
67
|
-
Provides-Extra: doc
|
|
68
|
-
Requires-Dist: numpydoc ; extra == 'doc'
|
|
69
|
-
Requires-Dist: sphinx ; extra == 'doc'
|
|
70
|
-
Requires-Dist: sphinx-rtd-theme ; extra == 'doc'
|
|
71
|
-
Provides-Extra: tests
|
|
72
|
-
Requires-Dist: pytest ; extra == 'tests'
|
|
73
|
-
Requires-Dist: pytest-cov ; extra == 'tests'
|
|
74
|
-
Requires-Dist: pytest-random-order ; extra == 'tests'
|
|
75
|
-
Requires-Dist: pytest-xdist ; extra == 'tests'
|
|
76
|
-
|
|
77
|
-
==============
|
|
78
|
-
simtools
|
|
79
|
-
==============
|
|
80
|
-
|
|
81
|
-
.. image:: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
|
|
82
|
-
:target: https://github.com/gammasim/simtools/blob/main/LICENSE
|
|
83
|
-
|
|
84
|
-
.. image:: https://img.shields.io/github/v/release/gammasim/simtools
|
|
85
|
-
:target: https://github.com/gammasim/simtools/releases
|
|
86
|
-
|
|
87
|
-
.. image:: https://zenodo.org/badge/195011575.svg
|
|
88
|
-
:target: https://zenodo.org/badge/latestdoi/195011575
|
|
89
|
-
|
|
90
|
-
.. image:: https://badge.fury.io/py/gammasimtools.svg
|
|
91
|
-
:target: https://badge.fury.io/py/gammasimtools
|
|
92
|
-
|
|
93
|
-
.. image:: https://github.com/gammasim/simtools/actions/workflows/CI-unittests.yml/badge.svg
|
|
94
|
-
:target: https://github.com/gammasim/simtools/actions/workflows/CI-unittests.yml
|
|
95
|
-
|
|
96
|
-
.. image:: https://github.com/gammasim/simtools/actions/workflows/CI-integrationtests.yml/badge.svg
|
|
97
|
-
:target: https://github.com/gammasim/simtools/actions/workflows/CI-integrationtests.yml
|
|
98
|
-
|
|
99
|
-
.. image:: https://github.com/gammasim/simtools/actions/workflows/CI-docs.yml/badge.svg
|
|
100
|
-
:target: https://github.com/gammasim/simtools/actions/workflows/CI-docs.yml
|
|
101
|
-
|
|
102
|
-
.. image:: https://app.codacy.com/project/badge/Grade/a3f19df7454844059341edd0769e02a7
|
|
103
|
-
:target: https://app.codacy.com/gh/gammasim/simtools/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
|
|
104
|
-
|
|
105
|
-
.. image:: https://codecov.io/gh/gammasim/simtools/graph/badge.svg?token=AYAIRPARCH
|
|
106
|
-
:target: https://codecov.io/gh/gammasim/simtools
|
|
107
|
-
|
|
108
|
-
Simulation tools and applications for the `Cherenkov Telescope Array (CTAO) <https://www.cta-observatory.org>`_.
|
|
109
|
-
|
|
110
|
-
License: `BSD-3 <https://github.com/gammasim/simtools/blob/main/LICENSE>`_
|
|
111
|
-
|
|
112
|
-
Useful links:
|
|
113
|
-
`Documentation <https://gammasim.github.io/simtools/>`_
|
|
114
|
-
`Source code <https://github.com/gammasim/simtools>`_
|
|
115
|
-
`Issue tracker <https://github.com/gammasim/simtools/issues>`_
|
|
116
|
-
`Citation <https://github.com/gammasim/simtools/blob/main/CITATION.cff>`_
|
|
117
|
-
|
|
118
|
-
simtools provides:
|
|
119
|
-
|
|
120
|
-
* libraries for simulation model management and model database interface
|
|
121
|
-
* tools for the preparation and configuration of simulation productions
|
|
122
|
-
* applications for simulation model parameter derivation and validation
|
|
123
|
-
* standardized interfaces and data products independent of the underlying simulation software (e.g., `CORSIKA <https://www.iap.kit.edu/corsika/>`_, `sim_telarray <https://www.mpi-hd.mpg.de/hfm/~bernlohr/sim_telarray/>`_)
|
|
124
|
-
* I/O and reporting tools for the MC simulation model parameter and production database
|
|
125
|
-
|
|
126
|
-
simtools is one part of the CTAO Simulation Pipeline, which consist of the following components:
|
|
127
|
-
|
|
128
|
-
- `CORSIKA <https://www.iap.kit.edu/corsika/>`_ air shower simulation code and the `sim_telarray <https://www.mpi-hd.mpg.de/hfm/~bernlohr/sim_telarray/>`_ telescope simulation code
|
|
129
|
-
- `workflows <https://github.com/gammasim/workflows>`_ for setting, derivation and validation of simulation model parameters
|
|
130
|
-
- `simulation model parameter and input data schema <https://github.com/gammasim/workflows/tree/main/schemas>`_
|
|
131
|
-
- `databases <https://gammasim.github.io/simtools/databases.html>`_, especially the model parameter database
|
|
132
|
-
|
|
133
|
-
simtools is under rapid development with continuous changes and additions planned.
|
|
134
|
-
Please contact the developers before using it: simtools-developer@desy.de
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Quickstart
|
|
138
|
-
==========
|
|
139
|
-
|
|
140
|
-
.. warning::
|
|
141
|
-
|
|
142
|
-
The pip-installation of simtools provides limited functionality only
|
|
143
|
-
and is not as well tested as the conda/mamba installation.
|
|
144
|
-
|
|
145
|
-
Install simtools with pypi (recommended for users):
|
|
146
|
-
|
|
147
|
-
.. code-block:: bash
|
|
148
|
-
|
|
149
|
-
pip install gammasimtools
|
|
150
|
-
|
|
151
|
-
Install simtools with mamba (recommended for developers):
|
|
152
|
-
|
|
153
|
-
.. code-block:: bash
|
|
154
|
-
|
|
155
|
-
git clone https://github.com/gammasim/simtools.git
|
|
156
|
-
cd simtools
|
|
157
|
-
mamba env create -f environment.yml
|
|
158
|
-
conda activate simtools
|
|
159
|
-
pip install -e .
|
|
160
|
-
|
|
161
|
-
For more detail see the `Getting_Started <https://gammasim.github.io/simtools/getting_started.html>`_ section of the manual.
|
|
162
|
-
|
|
163
|
-
Authors
|
|
164
|
-
=======
|
|
165
|
-
|
|
166
|
-
* Raul R Prado (DESY)
|
|
167
|
-
* Orel Gueta (DESY)
|
|
168
|
-
* Tobias Kleiner (DESY)
|
|
169
|
-
* Victor B. Martins (DESY)
|
|
170
|
-
* Gernot Maier (DESY)
|
|
171
|
-
|
|
172
|
-
Citing this Software
|
|
173
|
-
====================
|
|
174
|
-
|
|
175
|
-
Please cite this software if it use used for a publication, see the `Zenodo record <https://doi.org/10.5281/zenodo.6346696>`_ and `CITATION.cff <https://github.com/gammasim/simtools/blob/main/CITATION.cff>`_ .
|
|
176
|
-
|
|
177
|
-
Acknowledgements
|
|
178
|
-
================
|
|
179
|
-
|
|
180
|
-
This project is supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - project number 460248186 (PUNCH4NFDI).
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
simtools/__init__.py,sha256=yvx0i5ygbllmMtF2Tzy7pohvhQNH_dBdj0Bt8bKFYpc,231
|
|
2
|
-
simtools/_version.py,sha256=lgiCYGSijhLK71WmuudWf_AyhNAutwQWx2V8bV6a5VQ,411
|
|
3
|
-
simtools/camera_efficiency.py,sha256=Bx9pCmx1egKzV3gtZKK4F3dea9ShauxqI17XTtCVAaQ,18817
|
|
4
|
-
simtools/constants.py,sha256=QJr7NvjmyXd-xHd1xP_KuJxRFTeysxRLBYbC5tctE6Y,326
|
|
5
|
-
simtools/db_handler.py,sha256=5MEAK_E__NLHmYn5oJPsgO0D3ZTwWvB2yIKxN9w8hxU,47912
|
|
6
|
-
simtools/psf_analysis.py,sha256=YnQJh_Xckp_TH5lMLB4EsmoUVIWECshFijYz5-zsBjM,14741
|
|
7
|
-
simtools/ray_tracing.py,sha256=_MYHzYW4l3dAgUu_X5eKirnX8VYFU81_VwRvtimL8zI,18278
|
|
8
|
-
simtools/simulator.py,sha256=Cor46oIrpPJebQOMYQkUwIUNyyu3m-4HUh_d5Y40e1k,25974
|
|
9
|
-
simtools/version.py,sha256=QH3JDagS1ROImltyE_xRzRZlDxIr90poVpXToqNQUFI,595
|
|
10
|
-
simtools/_dev_version/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
simtools/_dev_version/scm_version.py,sha256=o3HfXziUHq0iIHUQm1RBv_8HDEpckXHFl0kYgmmwdAA,375
|
|
12
|
-
simtools/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
simtools/applications/add_file_to_db.py,sha256=tedb3Shk9gvDM1VROZVM3ZAsCSboUu68iRVV2eg4P4o,4999
|
|
14
|
-
simtools/applications/compare_cumulative_psf.py,sha256=r0sjhyNKRkw1dfj-ytwnFOnehahgbq6gpzBGARILqu4,6581
|
|
15
|
-
simtools/applications/derive_mirror_rnda.py,sha256=pY-vfrW66OQEqYfhqEW0yFa2Cd3nOeJpsXFxDtfCAMQ,15883
|
|
16
|
-
simtools/applications/generate_corsika_histograms.py,sha256=ff15vw_dwc79cciCUxFQwpW_G8L5ZjGVTh0bX_pn8b4,18434
|
|
17
|
-
simtools/applications/generate_default_metadata.py,sha256=3y3ASHvX-LaPLsOILnGDcWuF20XAN89FdXIAVaNmyf8,2881
|
|
18
|
-
simtools/applications/generate_simtel_array_histograms.py,sha256=gk6rLhb24WUxUt0d71uRxZvcl_UwXFZ2u1o-8zuZLn4,6696
|
|
19
|
-
simtools/applications/get_file_from_db.py,sha256=hcTalUXActcU-85shfgKnQlcBwXIi984kOYUafOUOcU,2906
|
|
20
|
-
simtools/applications/get_parameter.py,sha256=kv8rIRcBJdZihlviOy1KPaPXAYM1HlBY3xOZgGko1W0,2867
|
|
21
|
-
simtools/applications/make_regular_arrays.py,sha256=rFtA8YGYLkk4rr-zVhc8ItYgYtF6_x4ymRE1TtPPjuQ,5641
|
|
22
|
-
simtools/applications/plot_array_layout.py,sha256=0i1jxvLSIDAyGm0yxWs3av6ICg4lpx7b1f9c77PIOgw,6364
|
|
23
|
-
simtools/applications/print_array_elements.py,sha256=es25azY_qvStjo3jKg3E7pNAOEUn97bGwbk-v3WWQmU,5934
|
|
24
|
-
simtools/applications/produce_array_config.py,sha256=9gL53I6XgAbktsQIEqj1DzHKRoBQUm_yN7hFRfg82_Q,4113
|
|
25
|
-
simtools/applications/production.py,sha256=2ItZJ1OsXP69JVMBLq71e1j44R5qan_6yDxuY_edsvE,10775
|
|
26
|
-
simtools/applications/sim_showers_for_trigger_rates.py,sha256=6KOrhpUSxUbHJKUvHY_-qb8aeSog9iraCgnK7Pq2i9c,6713
|
|
27
|
-
simtools/applications/simulate_prod.py,sha256=WbWHXNJsl5_cBMgANdoZC5X8E5KmrgOfL8cpTpwWlqY,11517
|
|
28
|
-
simtools/applications/submit_data_from_external.py,sha256=pvZbB1q4qDzqYpac-E90q0pxjkKwhG48JD_ynDZPRpc,3036
|
|
29
|
-
simtools/applications/tune_psf.py,sha256=XPspVTNPjTIwKQ2zj85Wf_OvWWCQeXgPRWTbocE9wS4,11466
|
|
30
|
-
simtools/applications/validate_camera_efficiency.py,sha256=Q-6yNyjWVy3NyP_KssCHlTyl3aKjERDNCdvoifNnNbE,6632
|
|
31
|
-
simtools/applications/validate_camera_fov.py,sha256=rVl2oM7oh1iec_SR8pdJIDIQ-LBdch19sQa8QqmCWMs,4659
|
|
32
|
-
simtools/applications/validate_file_using_schema.py,sha256=2861hiDv1rtZJFvDNHPpYqCQqEkOMRSL32mWcGiDg2M,3396
|
|
33
|
-
simtools/applications/validate_optics.py,sha256=Qq5kzYs8bpOZKMp9Y8gNmo8BMKwO4sutUQYoY_hWt4w,6468
|
|
34
|
-
simtools/applications/db_development_tools/add_new_parameter_to_db.py,sha256=p5rZZRH5y1YxVvmSiynaYILq1Qt2EfYesI_uIl_-UlY,2732
|
|
35
|
-
simtools/applications/db_development_tools/add_unit_to_parameter_in_db.py,sha256=eqcV_yFyaOl8GOEtQozY09J_IKFy9OtRNVekIcuX0m4,1809
|
|
36
|
-
simtools/applications/db_development_tools/mark_non_optics_parameters_non_applicable.py,sha256=-0ImMFRyHmhB9XGA9pgXHe2laqQo1EoL9Zy13e92Ogs,3001
|
|
37
|
-
simtools/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
-
simtools/configuration/commandline_parser.py,sha256=deSfgj-mYTKm6o0t1CP3ccKJrXWqGVOjUPa0ukTVOUU,13528
|
|
39
|
-
simtools/configuration/configurator.py,sha256=DVm9QWv_W53rdmAAxGS_6UlFptVH0R0U-1hRsajV7EQ,14918
|
|
40
|
-
simtools/corsika/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
|
-
simtools/corsika/corsika_config.py,sha256=crOg0y3CtES7eZLTiVXrJkoEqTLCO0U8E2-zlOyPeg0,19490
|
|
42
|
-
simtools/corsika/corsika_default_config.py,sha256=GYwVfD7TOriQ-780rWrfPtcJGEPgQjOlPRwfr-2Nysc,9367
|
|
43
|
-
simtools/corsika/corsika_histograms.py,sha256=BS6cQMf1rKe7ScIGnGyXwwRNHBwCnJcEEUHU1IL4Eng,67469
|
|
44
|
-
simtools/corsika/corsika_histograms_visualize.py,sha256=FTEmwdctfyn0ReBwQUdArWLlLTujYSXFEfDh8YmrP4k,18176
|
|
45
|
-
simtools/corsika/corsika_runner.py,sha256=NA5BolmQ7mbo2jdEjCdRKjX6aEbv6hCkZIa_9gIf9iA,17203
|
|
46
|
-
simtools/corsika_simtel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
|
-
simtools/corsika_simtel/corsika_simtel_runner.py,sha256=_7h3WHAATVCt8ChtR-2caGwPtHsY6PM-rhgorY1xLZo,7477
|
|
48
|
-
simtools/data_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
simtools/data_model/data_reader.py,sha256=HhsU8eLXvNux3JaIyeRhwhmHHlGFHS7_YI_Apurlcn4,4214
|
|
50
|
-
simtools/data_model/metadata_collector.py,sha256=ip3SIIs5Gc_bZfHA2d4M5MVwvaY0Lq2x_vWPTczLTvI,17615
|
|
51
|
-
simtools/data_model/metadata_model.py,sha256=8d5eXHXclAs1zHb7W4rWT_bgs8YlCcZlQkaWHfLNPFg,4973
|
|
52
|
-
simtools/data_model/model_data_writer.py,sha256=sAjmAkYjdz3R3mbZB3RbAsBRHrLZ5vl5m-3uR9-FjhY,6116
|
|
53
|
-
simtools/data_model/validate_data.py,sha256=4X20pAJV-5S7GylHHQT16Kmp8m2kVREeEgA4a058r0I,18650
|
|
54
|
-
simtools/io_operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
-
simtools/io_operations/hdf5_handler.py,sha256=a3-elgjdDwbm_6P4xVsTVIIqPZkCI0bnqYnf_lQWo2Y,3158
|
|
56
|
-
simtools/io_operations/io_handler.py,sha256=ZYVAtG7CMOXwMFv4gKSOg3dYdsP-DkvMMaZOiZjEDrI,5514
|
|
57
|
-
simtools/job_execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
-
simtools/job_execution/job_manager.py,sha256=oo0Ijj232w0dz7rqkTwsgg3jQhVEelug9aMYBfqBu4I,6050
|
|
59
|
-
simtools/layout/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
|
-
simtools/layout/array_layout.py,sha256=hpYFSdIIaO922V4X1JWvgnREqmTZ3r971fUWZCV5xlw,30997
|
|
61
|
-
simtools/layout/geo_coordinates.py,sha256=Ect3lioZyMFUfHYeWF9WDMZiVq7YwMaX1f7aHQYmDDQ,5929
|
|
62
|
-
simtools/layout/telescope_position.py,sha256=fiy9X_c0a9VitFGqXYa2hNQvYQvU_Ohq3M82Jnmscjc,17375
|
|
63
|
-
simtools/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
|
-
simtools/model/array_model.py,sha256=cqpHFmMpY_H7DkW5Y-Z52gWD45lWSfV8qYnfSSOz818,14249
|
|
65
|
-
simtools/model/camera.py,sha256=UpFG6AOzocwjN5fpoVvEXSDiGuri_gQP1OKs_amZ_4o,30777
|
|
66
|
-
simtools/model/mirrors.py,sha256=kHQXCoFfdSykXN1rwnPZorJDqAxU0KJ1gJ8hyQRspEA,8060
|
|
67
|
-
simtools/model/model_utils.py,sha256=3FT5hd8aCnLCmd0FlbOmCjLLa-0sCusclkdgU3w8hGc,2010
|
|
68
|
-
simtools/model/telescope_model.py,sha256=2Ae9ShuNUycNlTBdKszBRQmuiKIG3gKqCZbotaYSz-U,29313
|
|
69
|
-
simtools/schemas/data.metaschema.yml,sha256=sTq7g1oNG9ZZs6vaasWHPVDMFkXexepRukiKfh5Cwe8,10053
|
|
70
|
-
simtools/schemas/metadata.metaschema.yml,sha256=MrGxTkKAaJNqA5WAPLH20ACHvVVuqOrgukJX-kB0tXs,16494
|
|
71
|
-
simtools/simtel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
-
simtools/simtel/simtel_config_writer.py,sha256=pkK44zGXDAuwahVoZndYsQdUMDnLbNDAbngO7sQ5ukw,8160
|
|
73
|
-
simtools/simtel/simtel_events.py,sha256=YzIvZ0p96LclPBCGfw1zzRGIMjgVnh4xIurzYokM8q4,9091
|
|
74
|
-
simtools/simtel/simtel_histograms.py,sha256=yx4VaomlfwUz5FrmW-yByb-TBNOZRCj7lyYPRf-Jd3w,13761
|
|
75
|
-
simtools/simtel/simtel_runner.py,sha256=MHCExex9nEtWS2N-U_0qemkIf4vqI8ZRmuHkzcnK0SQ,7575
|
|
76
|
-
simtools/simtel/simtel_runner_array.py,sha256=dci_mpIBak6xcK2DscLZKUPPstddjCuAUI98VUN9gZI,10447
|
|
77
|
-
simtools/simtel/simtel_runner_camera_efficiency.py,sha256=CbFoXkyqv6jkd4tbEiAuHJYj3c4LHHG2Zb4NeN9Amy4,10145
|
|
78
|
-
simtools/simtel/simtel_runner_ray_tracing.py,sha256=q1hoMOBmGikCDjHirNIPL_mkRlF_0P7HXdxXee-1cRc,11009
|
|
79
|
-
simtools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
-
simtools/utils/general.py,sha256=zlYBVkZ5McTbPHe-eLYaM_rgmFV0fl1u_TEY8OHAKss,26011
|
|
81
|
-
simtools/utils/geometry.py,sha256=bj7ehKy89HuG0hk0Bc5JkJv_hpDFkfsSx_gV9D5pZjM,6300
|
|
82
|
-
simtools/utils/names.py,sha256=sc1DZ9FrAoyfhSgeg4cxrFHfF198KeKG-o7KI5WQH8A,23574
|
|
83
|
-
simtools/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
-
simtools/visualization/legend_handlers.py,sha256=2Ja0QE7nTDPhvgFjp1yvI_CC3P7peiJzMuqd1I-cFDU,12643
|
|
85
|
-
simtools/visualization/visualize.py,sha256=GP6djbTXzAePRszBD8XE9omg8ARNQXlvV-RSJBLMNiI,21815
|
|
86
|
-
gammasimtools-0.6.1.dist-info/LICENSE,sha256=idBrtxX6eQcUlG0YBTx-O2RNKNKg1Gidb8OQf9q0X7s,1543
|
|
87
|
-
gammasimtools-0.6.1.dist-info/METADATA,sha256=ODS_qH_gu9WVV_muqnRfGpgmKh81dsG8yJVk-gqIYP0,7888
|
|
88
|
-
gammasimtools-0.6.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
89
|
-
gammasimtools-0.6.1.dist-info/entry_points.txt,sha256=2Ph74hJHTVd6n_mDhOfzJzMRnoS_8OO1DvKDyhkhIi0,1770
|
|
90
|
-
gammasimtools-0.6.1.dist-info/top_level.txt,sha256=9Yi7Q7aQX6alvpP2YGQtIYo208wdGkXUApHboEdj-ys,9
|
|
91
|
-
gammasimtools-0.6.1.dist-info/RECORD,,
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
[console_scripts]
|
|
2
|
-
simtools-add-file-to-db = simtools.applications.add_file_to_db:main
|
|
3
|
-
simtools-compare-cumulative-psf = simtools.applications.compare_cumulative_psf:main
|
|
4
|
-
simtools-derive-mirror-rnda = simtools.applications.derive_mirror_rnda:main
|
|
5
|
-
simtools-generate-corsika-histograms = simtools.applications.generate_corsika_histograms:main
|
|
6
|
-
simtools-generate-default-metadata = simtools.applications.generate_default_metadata:main
|
|
7
|
-
simtools-generate-simtel-array-histograms = simtools.applications.generate_simtel_array_histograms:main
|
|
8
|
-
simtools-get-file-from-db = simtools.applications.get_file_from_db:main
|
|
9
|
-
simtools-get-parameter = simtools.applications.get_parameter:main
|
|
10
|
-
simtools-make-regular-arrays = simtools.applications.make_regular_arrays:main
|
|
11
|
-
simtools-plot-array-layout = simtools.applications.plot_array_layout:main
|
|
12
|
-
simtools-plot-simtel-histograms = simtools.applications.plot_simtel_histograms:main
|
|
13
|
-
simtools-print-array-elements = simtools.applications.print_array_elements:main
|
|
14
|
-
simtools-produce-array-config = simtools.applications.produce_array_config:main
|
|
15
|
-
simtools-production = simtools.applications.production:main
|
|
16
|
-
simtools-sim-showers-for-trigger-rates = simtools.applications.sim_showers_for_trigger_rates:main
|
|
17
|
-
simtools-simulate-prod = simtools.applications.simulate_prod:main
|
|
18
|
-
simtools-submit-data-from-external = simtools.applications.submit_data_from_external:main
|
|
19
|
-
simtools-tune-psf = simtools.applications.tune_psf:main
|
|
20
|
-
simtools-validate-camera-efficiency = simtools.applications.validate_camera_efficiency:main
|
|
21
|
-
simtools-validate-camera-fov = simtools.applications.validate_camera_fov:main
|
|
22
|
-
simtools-validate-file-using-schema = simtools.applications.validate_file_using_schema:main
|
|
23
|
-
simtools-validate-optics = simtools.applications.validate_optics:main
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Try to use setuptools_scm to get the current version; this is only used
|
|
2
|
-
# in development installations from the git repository.
|
|
3
|
-
import os.path as pth
|
|
4
|
-
|
|
5
|
-
try:
|
|
6
|
-
from setuptools_scm import get_version
|
|
7
|
-
|
|
8
|
-
version = get_version(root=pth.join("..", ".."), relative_to=__file__)
|
|
9
|
-
except Exception as exc:
|
|
10
|
-
raise ImportError("setuptools_scm broken or not installed") from exc
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python3
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Summary
|
|
5
|
-
-------
|
|
6
|
-
This application is used to add a new parameter to the sites collection in the DB.
|
|
7
|
-
|
|
8
|
-
This application should not be used by anyone but expert users and not often.
|
|
9
|
-
Therefore, no additional documentation about this applications will be given.
|
|
10
|
-
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
import logging
|
|
14
|
-
|
|
15
|
-
import astropy.units as u
|
|
16
|
-
|
|
17
|
-
import simtools.utils.general as gen
|
|
18
|
-
from simtools import db_handler
|
|
19
|
-
from simtools.configuration import configurator
|
|
20
|
-
from simtools.utils import names
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def main():
|
|
24
|
-
config = configurator.Configurator(
|
|
25
|
-
description=("Add a new parameter to the sites collection in the DB.")
|
|
26
|
-
)
|
|
27
|
-
args_dict, db_config = config.initialize(db_config=True, telescope_model=True)
|
|
28
|
-
|
|
29
|
-
logger = logging.getLogger()
|
|
30
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
31
|
-
|
|
32
|
-
db = db_handler.DatabaseHandler(mongo_db_config=db_config)
|
|
33
|
-
|
|
34
|
-
# epsgs = [32628, 32719]
|
|
35
|
-
parameter = {
|
|
36
|
-
"mirror_panel_shape": 1,
|
|
37
|
-
"mirror_panel_diameter": 84.6 * u.cm,
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
telescopes = [
|
|
41
|
-
"South-SST-Structure-D",
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
for telescope_now in telescopes:
|
|
45
|
-
for par_now, par_value in parameter.items():
|
|
46
|
-
all_versions = db.get_all_versions(
|
|
47
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
48
|
-
telescope_model_name="-".join(telescope_now.split("-")[1:]),
|
|
49
|
-
site=names.get_site_from_telescope_name(telescope_now),
|
|
50
|
-
parameter="camera_config_file", # Just a random parameter to get the versions
|
|
51
|
-
collection_name="telescopes",
|
|
52
|
-
)
|
|
53
|
-
for version_now in all_versions:
|
|
54
|
-
db.add_new_parameter(
|
|
55
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
56
|
-
telescope=telescope_now,
|
|
57
|
-
parameter=par_now,
|
|
58
|
-
version=version_now,
|
|
59
|
-
value=par_value,
|
|
60
|
-
collection_name="telescopes",
|
|
61
|
-
Applicable=True,
|
|
62
|
-
File=False,
|
|
63
|
-
file_prefix="./",
|
|
64
|
-
)
|
|
65
|
-
pars = db.read_mongo_db(
|
|
66
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
67
|
-
telescope_model_name_db=telescope_now,
|
|
68
|
-
model_version=version_now,
|
|
69
|
-
run_location="./",
|
|
70
|
-
collection_name="telescopes",
|
|
71
|
-
write_files=False,
|
|
72
|
-
)
|
|
73
|
-
if isinstance(par_value, u.Quantity):
|
|
74
|
-
assert pars[par_now]["Value"] == par_value.value
|
|
75
|
-
assert pars[par_now]["units"] == par_value.unit.to_string()
|
|
76
|
-
else:
|
|
77
|
-
assert pars[par_now]["Value"] == par_value
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if __name__ == "__main__":
|
|
81
|
-
main()
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python3
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Summary
|
|
5
|
-
-------
|
|
6
|
-
This application is used to add a unit to parameters in the DB.
|
|
7
|
-
|
|
8
|
-
This application should not be used by anyone but expert users and only in unusual cases.
|
|
9
|
-
Therefore, no additional documentation about this applications will be given.
|
|
10
|
-
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
import logging
|
|
14
|
-
|
|
15
|
-
import simtools.utils.general as gen
|
|
16
|
-
from simtools import db_handler
|
|
17
|
-
from simtools.configuration import configurator
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def main():
|
|
21
|
-
config = configurator.Configurator(description="Add a unit field to a parameter in the DB.")
|
|
22
|
-
args_dict, db_config = config.initialize(db_config=True, telescope_model=True)
|
|
23
|
-
|
|
24
|
-
logger = logging.getLogger()
|
|
25
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
26
|
-
|
|
27
|
-
db = db_handler.DatabaseHandler(mongo_db_config=db_config)
|
|
28
|
-
|
|
29
|
-
# pars_to_update = ["altitude"]
|
|
30
|
-
pars_to_update = ["ref_long", "ref_lat"]
|
|
31
|
-
|
|
32
|
-
# units = ["m"]
|
|
33
|
-
units = ["deg", "deg"]
|
|
34
|
-
|
|
35
|
-
for site in ["North", "South"]:
|
|
36
|
-
for par_now, unit_now in zip(pars_to_update, units):
|
|
37
|
-
all_versions = db.get_all_versions(
|
|
38
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
39
|
-
site=site,
|
|
40
|
-
parameter=par_now,
|
|
41
|
-
collection_name="sites",
|
|
42
|
-
)
|
|
43
|
-
for version_now in all_versions:
|
|
44
|
-
db.update_parameter_field(
|
|
45
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
46
|
-
site=site,
|
|
47
|
-
version=version_now,
|
|
48
|
-
parameter=par_now,
|
|
49
|
-
field="units",
|
|
50
|
-
new_value=unit_now,
|
|
51
|
-
collection_name="sites",
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
site_pars = db.get_site_parameters(site, version_now)
|
|
55
|
-
assert site_pars[par_now]["units"] == unit_now
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if __name__ == "__main__":
|
|
59
|
-
main()
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python3
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Summary
|
|
5
|
-
-------
|
|
6
|
-
This application is used to modify all non-optics parameters \
|
|
7
|
-
in the MST-Structure entries in the DB to non-applicable.
|
|
8
|
-
|
|
9
|
-
This application should not be used anymore by anyone.
|
|
10
|
-
|
|
11
|
-
Therefore, no additional documentation about this applications will be given.
|
|
12
|
-
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
import logging
|
|
16
|
-
|
|
17
|
-
import yaml
|
|
18
|
-
|
|
19
|
-
import simtools.utils.general as gen
|
|
20
|
-
from simtools import db_handler
|
|
21
|
-
from simtools.configuration import configurator
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def main():
|
|
25
|
-
config = configurator.Configurator(
|
|
26
|
-
description=(
|
|
27
|
-
"Mark all non-structure related parameters in the MST-Structure "
|
|
28
|
-
"DB entries as non-applicable. "
|
|
29
|
-
"The definition of what is non-structure related is given in the "
|
|
30
|
-
"input yaml file which should look like sections.yml "
|
|
31
|
-
"(see reports repo)."
|
|
32
|
-
)
|
|
33
|
-
)
|
|
34
|
-
config.parser.add_argument(
|
|
35
|
-
"--sections",
|
|
36
|
-
help="Provide a sections.yml file (see reports repo).",
|
|
37
|
-
type=str,
|
|
38
|
-
required=True,
|
|
39
|
-
)
|
|
40
|
-
args_dict, db_config = config.initialize(db_config=True, telescope_model=True)
|
|
41
|
-
|
|
42
|
-
logger = logging.getLogger()
|
|
43
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
44
|
-
|
|
45
|
-
db = db_handler.DatabaseHandler(mongo_db_config=db_config)
|
|
46
|
-
|
|
47
|
-
with open(args_dict["sections"], "r", encoding="utf-8") as stream:
|
|
48
|
-
parameter_catogeries = yaml.safe_load(stream)
|
|
49
|
-
|
|
50
|
-
non_optic_catagories = [
|
|
51
|
-
"Readout electronics",
|
|
52
|
-
"Trigger",
|
|
53
|
-
"Photon conversion",
|
|
54
|
-
"Camera",
|
|
55
|
-
"Unnecessary",
|
|
56
|
-
]
|
|
57
|
-
non_optic_parameters = []
|
|
58
|
-
for category in non_optic_catagories:
|
|
59
|
-
for par_now in parameter_catogeries[category]:
|
|
60
|
-
non_optic_parameters.append(par_now)
|
|
61
|
-
|
|
62
|
-
versions = [
|
|
63
|
-
"default",
|
|
64
|
-
"2016-12-20",
|
|
65
|
-
"prod3_compatible",
|
|
66
|
-
"post_prod3_updates",
|
|
67
|
-
"2018-11-07",
|
|
68
|
-
"2019-02-22",
|
|
69
|
-
"2019-05-13",
|
|
70
|
-
"2019-11-20",
|
|
71
|
-
"2019-12-30",
|
|
72
|
-
"2020-02-26",
|
|
73
|
-
"2020-06-28",
|
|
74
|
-
"prod4",
|
|
75
|
-
]
|
|
76
|
-
|
|
77
|
-
for version_now in versions:
|
|
78
|
-
for site in ["North", "South"]:
|
|
79
|
-
for par_now in non_optic_parameters:
|
|
80
|
-
db.update_parameter_field(
|
|
81
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
82
|
-
telescope=f"{site}-MST-Structure-D",
|
|
83
|
-
version=version_now,
|
|
84
|
-
parameter=par_now,
|
|
85
|
-
field="Applicable",
|
|
86
|
-
new_value=False,
|
|
87
|
-
)
|
|
88
|
-
pars = db.read_mongo_db(
|
|
89
|
-
db_name=db.DB_CTA_SIMULATION_MODEL,
|
|
90
|
-
telescope_model_name_db=f"{site}-MST-Structure-D",
|
|
91
|
-
model_version=version_now,
|
|
92
|
-
run_location="",
|
|
93
|
-
write_files=False,
|
|
94
|
-
only_applicable=False,
|
|
95
|
-
)
|
|
96
|
-
for par_now in non_optic_parameters:
|
|
97
|
-
if par_now in pars:
|
|
98
|
-
assert pars[par_now]["Applicable"] is False
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if __name__ == "__main__":
|
|
102
|
-
main()
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/python3
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Summary
|
|
5
|
-
-------
|
|
6
|
-
Get a parameter entry from DB for a specific telescope or a site.
|
|
7
|
-
The application receives a parameter name, a site, a telescope (if applicable) and \
|
|
8
|
-
optionally a version. It then prints out the parameter entry.
|
|
9
|
-
If no version is provided, the value of the released model is printed..
|
|
10
|
-
|
|
11
|
-
Command line arguments
|
|
12
|
-
----------------------
|
|
13
|
-
parameter (str, required)
|
|
14
|
-
Parameter name
|
|
15
|
-
|
|
16
|
-
site (str, required)
|
|
17
|
-
South or North.
|
|
18
|
-
|
|
19
|
-
telescope (str, optional)
|
|
20
|
-
Telescope model name (e.g. LST-1, SST-D, ...)
|
|
21
|
-
|
|
22
|
-
log_level (str, optional)
|
|
23
|
-
Log level to print.
|
|
24
|
-
|
|
25
|
-
Raises
|
|
26
|
-
------
|
|
27
|
-
KeyError in case the parameter requested does not exist in the model parameters.
|
|
28
|
-
|
|
29
|
-
Example
|
|
30
|
-
-------
|
|
31
|
-
Get the mirror_list parameter from the DB.
|
|
32
|
-
|
|
33
|
-
.. code-block:: console
|
|
34
|
-
|
|
35
|
-
simtools-get-parameter --parameter mirror_list --site North --telescope LST-1\
|
|
36
|
-
--model_version prod5
|
|
37
|
-
|
|
38
|
-
Expected final print-out message:
|
|
39
|
-
|
|
40
|
-
.. code-block:: console
|
|
41
|
-
|
|
42
|
-
{'Applicable': True,
|
|
43
|
-
'File': True,
|
|
44
|
-
'Type': 'str',
|
|
45
|
-
'Value': 'mirror_CTA-N-LST1_v2019-03-31.dat',
|
|
46
|
-
'Version': '2020-06-28',
|
|
47
|
-
'_id': ObjectId('608834f257df2db2531b8e78'),
|
|
48
|
-
'entry_date': datetime.datetime(2021, 4, 27, 15, 59, 46, tzinfo=<bson.tz_util.FixedOffset \
|
|
49
|
-
object at 0x7f601dd51d80>)}
|
|
50
|
-
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
import logging
|
|
54
|
-
from pprint import pprint
|
|
55
|
-
|
|
56
|
-
import simtools.utils.general as gen
|
|
57
|
-
from simtools import db_handler
|
|
58
|
-
from simtools.configuration import configurator
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
def main():
|
|
62
|
-
config = configurator.Configurator(
|
|
63
|
-
description=(
|
|
64
|
-
"Get a parameter entry from DB for a specific telescope or a site. "
|
|
65
|
-
"The application receives a parameter name a site, a telescope (if applicable), "
|
|
66
|
-
" and optionally a version. It then prints out the parameter entry. "
|
|
67
|
-
"If no version is provided, the value of the released model is printed. "
|
|
68
|
-
)
|
|
69
|
-
)
|
|
70
|
-
config.parser.add_argument("--parameter", help="Parameter name", type=str, required=True)
|
|
71
|
-
args_dict, db_config = config.initialize(db_config=True, telescope_model=True)
|
|
72
|
-
|
|
73
|
-
logger = logging.getLogger()
|
|
74
|
-
logger.setLevel(gen.get_log_level_from_user(args_dict["log_level"]))
|
|
75
|
-
|
|
76
|
-
db = db_handler.DatabaseHandler(mongo_db_config=db_config)
|
|
77
|
-
|
|
78
|
-
if args_dict["telescope"] is not None:
|
|
79
|
-
pars = db.get_model_parameters(
|
|
80
|
-
args_dict["site"], args_dict["telescope"], args_dict["model_version"]
|
|
81
|
-
)
|
|
82
|
-
else:
|
|
83
|
-
pars = db.get_site_parameters(args_dict["site"], args_dict["model_version"])
|
|
84
|
-
if args_dict["parameter"] not in pars:
|
|
85
|
-
raise KeyError(f"The requested parameter, {args_dict['parameter']}, does not exist.")
|
|
86
|
-
print()
|
|
87
|
-
pprint(pars[args_dict["parameter"]])
|
|
88
|
-
print()
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if __name__ == "__main__":
|
|
92
|
-
main()
|