gammasimtools 0.8.1__py3-none-any.whl → 0.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/METADATA +4 -3
- gammasimtools-0.9.0.dist-info/RECORD +350 -0
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/WHEEL +1 -1
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/entry_points.txt +2 -0
- simtools/_dev_version/__init__.py +9 -0
- simtools/_version.py +2 -2
- simtools/applications/convert_all_model_parameters_from_simtel.py +1 -1
- simtools/applications/convert_geo_coordinates_of_array_elements.py +8 -9
- simtools/applications/convert_model_parameter_from_simtel.py +1 -1
- simtools/applications/db_add_model_parameters_from_repository_to_db.py +2 -10
- simtools/applications/db_add_value_from_json_to_db.py +1 -9
- simtools/applications/db_get_array_layouts_from_db.py +3 -1
- simtools/applications/db_get_parameter_from_db.py +1 -1
- simtools/applications/derive_mirror_rnda.py +10 -1
- simtools/applications/derive_psf_parameters.py +1 -1
- simtools/applications/generate_array_config.py +1 -5
- simtools/applications/generate_regular_arrays.py +9 -6
- simtools/applications/generate_simtel_array_histograms.py +1 -1
- simtools/applications/plot_array_layout.py +3 -1
- simtools/applications/plot_tabular_data.py +84 -0
- simtools/applications/production_scale_events.py +1 -2
- simtools/applications/simulate_light_emission.py +2 -2
- simtools/applications/simulate_prod.py +24 -59
- simtools/applications/simulate_prod_htcondor_generator.py +95 -0
- simtools/applications/submit_data_from_external.py +1 -1
- simtools/applications/validate_camera_efficiency.py +1 -1
- simtools/applications/validate_camera_fov.py +4 -8
- simtools/applications/validate_cumulative_psf.py +3 -7
- simtools/applications/validate_file_using_schema.py +31 -23
- simtools/applications/validate_optics.py +3 -4
- simtools/camera_efficiency.py +1 -4
- simtools/configuration/commandline_parser.py +9 -15
- simtools/configuration/configurator.py +6 -19
- simtools/constants.py +3 -3
- simtools/data_model/metadata_collector.py +19 -1
- simtools/data_model/metadata_model.py +18 -5
- simtools/data_model/model_data_writer.py +1 -1
- simtools/data_model/validate_data.py +67 -10
- simtools/db/db_handler.py +92 -315
- simtools/io_operations/legacy_data_handler.py +61 -0
- simtools/job_execution/htcondor_script_generator.py +133 -0
- simtools/job_execution/job_manager.py +77 -50
- simtools/model/array_model.py +30 -26
- simtools/model/calibration_model.py +10 -10
- simtools/model/camera.py +79 -63
- simtools/model/mirrors.py +8 -6
- simtools/model/model_parameter.py +42 -12
- simtools/model/model_utils.py +6 -6
- simtools/model/site_model.py +2 -2
- simtools/model/telescope_model.py +26 -22
- simtools/ray_tracing/mirror_panel_psf.py +47 -27
- simtools/runners/corsika_runner.py +14 -3
- simtools/runners/runner_services.py +3 -3
- simtools/runners/simtel_runner.py +27 -8
- simtools/schemas/integration_tests_config.metaschema.yml +15 -5
- simtools/schemas/model_parameter.metaschema.yml +90 -2
- simtools/schemas/model_parameters/adjust_gain.schema.yml +1 -1
- simtools/schemas/model_parameters/altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/array_coordinates.schema.yml +1 -1
- simtools/schemas/model_parameters/array_coordinates_UTM.schema.yml +1 -1
- simtools/schemas/model_parameters/array_element_position_ground.schema.yml +1 -1
- simtools/schemas/model_parameters/array_element_position_utm.schema.yml +1 -1
- simtools/schemas/model_parameters/array_layouts.schema.yml +1 -1
- simtools/schemas/model_parameters/array_triggers.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_shaping.schema.yml +1 -1
- simtools/schemas/model_parameters/asum_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/atmospheric_profile.schema.yml +1 -1
- simtools/schemas/model_parameters/atmospheric_transmission.schema.yml +1 -1
- simtools/schemas/model_parameters/axes_offsets.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_body_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_body_shape.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_config_file.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_config_rotate.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_degraded_efficiency.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_degraded_map.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_depth.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_filter.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_filter_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_pixels.schema.yml +1 -1
- simtools/schemas/model_parameters/camera_transmission.schema.yml +1 -1
- simtools/schemas/model_parameters/channels_per_chip.schema.yml +1 -1
- simtools/schemas/model_parameters/correct_nsb_spectrum_to_telescope_altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_cherenkov_photon_bunch_size.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_cherenkov_photon_wavelength_range.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_first_interaction_height.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_iact_io_buffer.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_iact_max_bunches.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_iact_split_auto.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_longitudinal_shower_development.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_observation_level.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_particle_kinetic_energy_cutoff.schema.yml +1 -1
- simtools/schemas/model_parameters/corsika_starting_grammage.schema.yml +1 -1
- simtools/schemas/model_parameters/dark_events.schema.yml +1 -1
- simtools/schemas/model_parameters/default_trigger.schema.yml +1 -1
- simtools/schemas/model_parameters/design_model.schema.yml +1 -1
- simtools/schemas/model_parameters/disc_ac_coupled.schema.yml +1 -1
- simtools/schemas/model_parameters/disc_bins.schema.yml +1 -1
- simtools/schemas/model_parameters/disc_start.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_fall_time.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_gate_length.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_hysteresis.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_output_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_output_var_percent.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_pulse_shape.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_rise_time.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_scale_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_sigsum_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_time_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_gate_length.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_sigsum_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/discriminator_var_time_over_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/dish_shape_length.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_ignore_below.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_pedsub.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_pre_clipping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_prescale.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_presum_max.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_presum_shift.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_shaping.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_shaping_renormalize.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_threshold.schema.yml +1 -1
- simtools/schemas/model_parameters/dsum_zero_clip.schema.yml +1 -1
- simtools/schemas/model_parameters/effective_focal_length.schema.yml +32 -2
- simtools/schemas/model_parameters/epsg_code.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_ac_coupled.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_bins.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_dev_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_err_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_err_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_dev_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_err_compensate_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_err_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_max_signal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_max_sum.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_noise.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_sysvar_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_var_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_lg_var_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_max_signal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_max_sum.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_mhz.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_noise.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_pulse_shape.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sum_bins.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sum_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_sysvar_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_var_pedestal.schema.yml +1 -1
- simtools/schemas/model_parameters/fadc_var_sensitivity.schema.yml +1 -1
- simtools/schemas/model_parameters/flatfielding.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_surface_parameters.schema.yml +1 -1
- simtools/schemas/model_parameters/focal_surface_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/focus_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/gain_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/geomag_horizontal.schema.yml +1 -1
- simtools/schemas/model_parameters/geomag_rotation.schema.yml +1 -1
- simtools/schemas/model_parameters/geomag_vertical.schema.yml +1 -1
- simtools/schemas/model_parameters/hg_lg_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/iobuf_maximum.schema.yml +1 -1
- simtools/schemas/model_parameters/iobuf_output_maximum.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_events.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_external_trigger.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_exptime.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_sigtime.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_pulse_twidth.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_var_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/laser_wavelength.schema.yml +1 -1
- simtools/schemas/model_parameters/led_events.schema.yml +1 -1
- simtools/schemas/model_parameters/led_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/led_pulse_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/led_pulse_sigtime.schema.yml +1 -1
- simtools/schemas/model_parameters/led_var_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/lightguide_efficiency_vs_wavelength.schema.yml +1 -1
- simtools/schemas/model_parameters/min_photoelectrons.schema.yml +1 -1
- simtools/schemas/model_parameters/min_photons.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_align_random_distance.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_align_random_horizontal.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_align_random_vertical.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_class.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_degraded_reflection.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_list.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_panel_2f_measurements.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_reflection_random_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/mirror_reflectivity.schema.yml +1 -1
- simtools/schemas/model_parameters/multiplicity_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_autoscale_airmass.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_gain_drop_scale.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_offaxis.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_pixel_rate.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_reference_spectrum.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_reference_value.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_scaling_factor.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_skymap.schema.yml +1 -1
- simtools/schemas/model_parameters/nsb_spectrum.schema.yml +1 -1
- simtools/schemas/model_parameters/num_gains.schema.yml +1 -1
- simtools/schemas/model_parameters/only_triggered_telescopes.schema.yml +1 -1
- simtools/schemas/model_parameters/optics_properties.schema.yml +1 -1
- simtools/schemas/model_parameters/parabolic_dish.schema.yml +1 -1
- simtools/schemas/model_parameters/pedestal_events.schema.yml +1 -1
- simtools/schemas/model_parameters/photon_delay.schema.yml +1 -1
- simtools/schemas/model_parameters/photons_per_run.schema.yml +1 -1
- simtools/schemas/model_parameters/pixel_cells.schema.yml +1 -1
- simtools/schemas/model_parameters/pixels_parallel.schema.yml +1 -1
- simtools/schemas/model_parameters/pixeltrg_time_step.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_average_gain.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_collection_efficiency.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_gain_index.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_photoelectron_spectrum.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_transit_time.schema.yml +1 -1
- simtools/schemas/model_parameters/pm_voltage_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_degraded_map.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_hole_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_parameters.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/primary_mirror_segmentation.schema.yml +1 -1
- simtools/schemas/model_parameters/qe_variation.schema.yml +1 -1
- simtools/schemas/model_parameters/quantum_efficiency.schema.yml +1 -1
- simtools/schemas/model_parameters/random_focal_length.schema.yml +1 -1
- simtools/schemas/model_parameters/random_generator.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_altitude.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_latitude.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_longitude.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_utm_east.schema.yml +1 -1
- simtools/schemas/model_parameters/reference_point_utm_north.schema.yml +1 -1
- simtools/schemas/model_parameters/sampled_output.schema.yml +1 -1
- simtools/schemas/model_parameters/save_pe_with_amplitude.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_baffle.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_degraded_map.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_degraded_reflection.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_hole_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_incidence_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_parameters.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_ref_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_reflectivity.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_segmentation.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_shadow_diameter.schema.yml +1 -1
- simtools/schemas/model_parameters/secondary_mirror_shadow_offset.schema.yml +1 -1
- simtools/schemas/model_parameters/store_photoelectrons.schema.yml +1 -1
- simtools/schemas/model_parameters/tailcut_scale.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_axis_height.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_random_angle.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_random_error.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_sphere_radius.schema.yml +1 -1
- simtools/schemas/model_parameters/telescope_transmission.schema.yml +1 -1
- simtools/schemas/model_parameters/teltrig_min_sigsum.schema.yml +1 -1
- simtools/schemas/model_parameters/teltrig_min_time.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_calib_error.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_compensate_error.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_compensate_step.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_error.schema.yml +1 -1
- simtools/schemas/model_parameters/transit_time_jitter.schema.yml +1 -1
- simtools/schemas/model_parameters/trigger_current_limit.schema.yml +1 -1
- simtools/schemas/model_parameters/trigger_delay_compensation.schema.yml +1 -1
- simtools/schemas/model_parameters/trigger_pixels.schema.yml +1 -1
- simtools/simtel/simtel_table_reader.py +410 -0
- simtools/simtel/simulator_camera_efficiency.py +6 -4
- simtools/simtel/simulator_light_emission.py +2 -2
- simtools/simtel/simulator_ray_tracing.py +1 -2
- simtools/simulator.py +80 -33
- simtools/testing/configuration.py +12 -8
- simtools/testing/helpers.py +5 -5
- simtools/testing/validate_output.py +28 -28
- simtools/utils/general.py +50 -3
- simtools/utils/names.py +3 -4
- simtools/utils/value_conversion.py +9 -1
- simtools/version.py +1 -1
- simtools/visualization/plot_tables.py +106 -0
- simtools/visualization/visualize.py +43 -5
- gammasimtools-0.8.1.dist-info/RECORD +0 -346
- simtools/_dev_version/scm_version.py +0 -10
- simtools/db/db_from_repo_handler.py +0 -106
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/LICENSE +0 -0
- {gammasimtools-0.8.1.dist-info → gammasimtools-0.9.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"""HT Condor script generator for simulation production."""
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
import astropy.units as u
|
|
7
|
+
|
|
8
|
+
_logger = logging.getLogger(__name__)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def generate_submission_script(args_dict):
|
|
12
|
+
"""
|
|
13
|
+
Generate the HT Condor submission script.
|
|
14
|
+
|
|
15
|
+
Parameters
|
|
16
|
+
----------
|
|
17
|
+
args_dict: dict
|
|
18
|
+
Arguments dictionary.
|
|
19
|
+
"""
|
|
20
|
+
_logger.info("Generating HT Condor submission scripts ")
|
|
21
|
+
|
|
22
|
+
work_dir = Path(args_dict["output_path"])
|
|
23
|
+
log_dir = work_dir / "logs"
|
|
24
|
+
work_dir.mkdir(parents=True, exist_ok=True)
|
|
25
|
+
log_dir.mkdir(parents=True, exist_ok=True)
|
|
26
|
+
submit_file_name = "simulate_prod.submit"
|
|
27
|
+
|
|
28
|
+
with open(work_dir / f"{submit_file_name}.condor", "w", encoding="utf-8") as submit_file_handle:
|
|
29
|
+
submit_file_handle.write(
|
|
30
|
+
_get_submit_file(
|
|
31
|
+
f"{submit_file_name}.sh",
|
|
32
|
+
args_dict["apptainer_image"],
|
|
33
|
+
args_dict["priority"],
|
|
34
|
+
+args_dict["number_of_runs"],
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
with open(work_dir / f"{submit_file_name}.sh", "w", encoding="utf-8") as submit_script_handle:
|
|
39
|
+
submit_script_handle.write(_get_submit_script(args_dict))
|
|
40
|
+
|
|
41
|
+
Path(work_dir / f"{submit_file_name}.sh").chmod(0o755)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _get_submit_file(executable, apptainer_image, priority, n_jobs):
|
|
45
|
+
"""
|
|
46
|
+
Return HT Condor submit file.
|
|
47
|
+
|
|
48
|
+
Database access variables are passed through the environment file.
|
|
49
|
+
|
|
50
|
+
Parameters
|
|
51
|
+
----------
|
|
52
|
+
executable: str
|
|
53
|
+
Name of the executable script.
|
|
54
|
+
apptainer_image: str
|
|
55
|
+
Path to the Apptainer image.
|
|
56
|
+
priority: int
|
|
57
|
+
Priority of the job.
|
|
58
|
+
n_jobs: int
|
|
59
|
+
Number of jobs to queue.
|
|
60
|
+
|
|
61
|
+
Returns
|
|
62
|
+
-------
|
|
63
|
+
str
|
|
64
|
+
HT Condor submit file content.
|
|
65
|
+
"""
|
|
66
|
+
return f"""universe = container
|
|
67
|
+
container_image = {apptainer_image}
|
|
68
|
+
transfer_container = false
|
|
69
|
+
|
|
70
|
+
executable = {executable}
|
|
71
|
+
error = logs/err.$(cluster)_$(process)
|
|
72
|
+
output = logs/out.$(cluster)_$(process)
|
|
73
|
+
log = logs/log.$(cluster)_$(process)
|
|
74
|
+
|
|
75
|
+
priority = {priority}
|
|
76
|
+
arguments = "$(process) env.txt"
|
|
77
|
+
|
|
78
|
+
queue {n_jobs}
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _get_submit_script(args_dict):
|
|
83
|
+
"""
|
|
84
|
+
Return HT Condor submit script.
|
|
85
|
+
|
|
86
|
+
Parameters
|
|
87
|
+
----------
|
|
88
|
+
args_dict: dict
|
|
89
|
+
Arguments dictionary.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
str
|
|
94
|
+
HT Condor submit script content.
|
|
95
|
+
"""
|
|
96
|
+
azimuth_angle_string = f"{args_dict['azimuth_angle'].to(u.deg).value}"
|
|
97
|
+
zenith_angle_string = f"{args_dict['zenith_angle'].to(u.deg).value}"
|
|
98
|
+
energy_range = args_dict["energy_range"]
|
|
99
|
+
energy_range_string = (
|
|
100
|
+
f'"{energy_range[0].to(u.GeV).value} GeV {energy_range[1].to(u.GeV).value} GeV"'
|
|
101
|
+
)
|
|
102
|
+
core_scatter = args_dict["core_scatter"]
|
|
103
|
+
core_scatter_string = f'"{core_scatter[0]} {core_scatter[1].to(u.m).value} m"'
|
|
104
|
+
|
|
105
|
+
label = args_dict["label"] if args_dict["label"] else "simulate-prod"
|
|
106
|
+
|
|
107
|
+
return f"""#!/usr/bin/env bash
|
|
108
|
+
|
|
109
|
+
# Process ID used to generate run number
|
|
110
|
+
process_id="$1"
|
|
111
|
+
# Load environment variables (for DB access)
|
|
112
|
+
set -a; source "$2"
|
|
113
|
+
|
|
114
|
+
simtools-simulate-prod \\
|
|
115
|
+
--simulation_software {args_dict["simulation_software"]} \\
|
|
116
|
+
--label {label} \\
|
|
117
|
+
--model_version {args_dict["model_version"]} \\
|
|
118
|
+
--site {args_dict["site"]} \\
|
|
119
|
+
--array_layout_name {args_dict["array_layout_name"]} \\
|
|
120
|
+
--primary {args_dict["primary"]} \\
|
|
121
|
+
--azimuth_angle {azimuth_angle_string} \\
|
|
122
|
+
--zenith_angle {zenith_angle_string} \\
|
|
123
|
+
--nshow {args_dict["nshow"]} \\
|
|
124
|
+
--energy_range {energy_range_string} \\
|
|
125
|
+
--core_scatter {core_scatter_string} \\
|
|
126
|
+
--run_number_start $((process_id + {args_dict["run_number_start"]})) \\
|
|
127
|
+
--number_of_runs 1 \\
|
|
128
|
+
--submit_engine \"local\" \\
|
|
129
|
+
--data_directory /tmp/simtools-data \\
|
|
130
|
+
--output_path /tmp/simtools-output \\
|
|
131
|
+
--log_level {args_dict["log_level"]} \\
|
|
132
|
+
--pack_for_grid_register simtools-output
|
|
133
|
+
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Interface to workload managers like gridengine or HTCondor."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
import
|
|
4
|
+
import subprocess
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
import simtools.utils.general as gen
|
|
@@ -65,11 +65,9 @@ class JobManager:
|
|
|
65
65
|
ValueError
|
|
66
66
|
if invalid submit engine.
|
|
67
67
|
"""
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
raise ValueError(f"Invalid submit command: {value}")
|
|
72
|
-
self._submit_engine = value
|
|
68
|
+
self._submit_engine = value or "local"
|
|
69
|
+
if self._submit_engine not in self.engines:
|
|
70
|
+
raise ValueError(f"Invalid submit command: {self._submit_engine}")
|
|
73
71
|
|
|
74
72
|
def check_submission_system(self):
|
|
75
73
|
"""
|
|
@@ -77,14 +75,17 @@ class JobManager:
|
|
|
77
75
|
|
|
78
76
|
Raises
|
|
79
77
|
------
|
|
80
|
-
|
|
78
|
+
JobExecutionError
|
|
81
79
|
if workflow manager is not found.
|
|
82
80
|
"""
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
try:
|
|
82
|
+
if self.submit_engine in (None, "local") or gen.program_is_executable(
|
|
83
|
+
self.engines[self.submit_engine]
|
|
84
|
+
):
|
|
85
|
+
return
|
|
86
|
+
except KeyError:
|
|
87
|
+
pass
|
|
88
|
+
raise JobExecutionError(f"Submit engine {self.submit_engine} not found")
|
|
88
89
|
|
|
89
90
|
def submit(self, run_script=None, run_out_file=None, log_file=None):
|
|
90
91
|
"""
|
|
@@ -109,12 +110,14 @@ class JobManager:
|
|
|
109
110
|
self._logger.info(f"Job error stream {self.run_out_file + '.err'}")
|
|
110
111
|
self._logger.info(f"Job log stream {self.run_out_file + '.job'}")
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
submit_result = 0
|
|
114
|
+
if self.submit_engine == "local":
|
|
115
|
+
submit_result = self._submit_local(log_file)
|
|
116
|
+
else:
|
|
117
|
+
submit_result = getattr(self, f"_submit_{self.submit_engine}")()
|
|
118
|
+
|
|
119
|
+
if submit_result != 0:
|
|
120
|
+
raise JobExecutionError(f"Job submission failed with return code {submit_result}")
|
|
118
121
|
|
|
119
122
|
def _submit_local(self, log_file):
|
|
120
123
|
"""
|
|
@@ -125,50 +128,72 @@ class JobManager:
|
|
|
125
128
|
log_file: str or Path
|
|
126
129
|
The log file of the actual simulator (CORSIKA or sim_telarray).
|
|
127
130
|
Provided in order to print the log excerpt in case of run time error.
|
|
131
|
+
|
|
132
|
+
Returns
|
|
133
|
+
-------
|
|
134
|
+
int
|
|
135
|
+
Return code of the executed script
|
|
128
136
|
"""
|
|
129
137
|
self._logger.info("Running script locally")
|
|
130
138
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if not self.test:
|
|
134
|
-
sys_output = os.system(shell_command)
|
|
135
|
-
if sys_output != 0:
|
|
136
|
-
msg = gen.get_log_excerpt(f"{self.run_out_file}.err")
|
|
137
|
-
self._logger.error(msg)
|
|
138
|
-
if log_file.exists() and gen.get_file_age(log_file) < 5:
|
|
139
|
-
msg = gen.get_log_excerpt(log_file)
|
|
140
|
-
self._logger.error(msg)
|
|
141
|
-
raise JobExecutionError("See excerpt from log file above\n")
|
|
142
|
-
else:
|
|
139
|
+
if self.test:
|
|
143
140
|
self._logger.info("Testing (local)")
|
|
141
|
+
return 0
|
|
142
|
+
|
|
143
|
+
result = None
|
|
144
|
+
try:
|
|
145
|
+
with (
|
|
146
|
+
open(f"{self.run_out_file}.out", "w", encoding="utf-8") as stdout,
|
|
147
|
+
open(f"{self.run_out_file}.err", "w", encoding="utf-8") as stderr,
|
|
148
|
+
):
|
|
149
|
+
result = subprocess.run(
|
|
150
|
+
f"{self.run_script}",
|
|
151
|
+
shell=True,
|
|
152
|
+
check=True,
|
|
153
|
+
text=True,
|
|
154
|
+
stdout=stdout,
|
|
155
|
+
stderr=stderr,
|
|
156
|
+
)
|
|
157
|
+
except subprocess.CalledProcessError as exc:
|
|
158
|
+
self._logger.error(gen.get_log_excerpt(f"{self.run_out_file}.err"))
|
|
159
|
+
if log_file.exists() and gen.get_file_age(log_file) < 5:
|
|
160
|
+
self._logger.error(gen.get_log_excerpt(log_file))
|
|
161
|
+
raise JobExecutionError("See excerpt from log file above\n") from exc
|
|
162
|
+
|
|
163
|
+
return result.returncode if result else 0
|
|
144
164
|
|
|
145
165
|
def _submit_htcondor(self):
|
|
146
166
|
"""Submit a job described by a shell script to HTcondor."""
|
|
147
167
|
_condor_file = self.run_script + ".condor"
|
|
168
|
+
lines = [
|
|
169
|
+
f"Executable = {self.run_script}",
|
|
170
|
+
f"Output = {self.run_out_file}.out",
|
|
171
|
+
f"Error = {self.run_out_file}.err",
|
|
172
|
+
f"Log = {self.run_out_file}.job",
|
|
173
|
+
]
|
|
174
|
+
if self.submit_options:
|
|
175
|
+
lines.extend(option.lstrip() for option in self.submit_options.split(","))
|
|
176
|
+
lines.append("queue 1")
|
|
148
177
|
try:
|
|
149
178
|
with open(_condor_file, "w", encoding="utf-8") as file:
|
|
150
|
-
file.write(
|
|
151
|
-
file.write(f"Output = {self.run_out_file + '.out'}\n")
|
|
152
|
-
file.write(f"Error = {self.run_out_file + '.err'}\n")
|
|
153
|
-
file.write(f"Log = {self.run_out_file + '.job'}\n")
|
|
154
|
-
if self.submit_options:
|
|
155
|
-
submit_option_list = self.submit_options.split(",")
|
|
156
|
-
for option in submit_option_list:
|
|
157
|
-
file.write(option.lstrip() + "\n")
|
|
158
|
-
file.write("queue 1\n")
|
|
179
|
+
file.write("\n".join(lines) + "\n")
|
|
159
180
|
except FileNotFoundError as exc:
|
|
160
181
|
self._logger.error(f"Failed creating condor submission file {_condor_file}")
|
|
161
182
|
raise JobExecutionError from exc
|
|
162
183
|
|
|
163
|
-
self._execute(self.submit_engine, self.engines[self.submit_engine]
|
|
184
|
+
return self._execute(self.submit_engine, [self.engines[self.submit_engine], _condor_file])
|
|
164
185
|
|
|
165
186
|
def _submit_gridengine(self):
|
|
166
187
|
"""Submit a job described by a shell script to gridengine."""
|
|
167
|
-
this_sub_cmd =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
188
|
+
this_sub_cmd = [
|
|
189
|
+
self.engines[self.submit_engine],
|
|
190
|
+
"-o",
|
|
191
|
+
self.run_out_file + ".out",
|
|
192
|
+
"-e",
|
|
193
|
+
self.run_out_file + ".err",
|
|
194
|
+
self.run_script,
|
|
195
|
+
]
|
|
196
|
+
return self._execute(self.submit_engine, this_sub_cmd)
|
|
172
197
|
|
|
173
198
|
def _execute(self, engine, shell_command):
|
|
174
199
|
"""
|
|
@@ -178,13 +203,15 @@ class JobManager:
|
|
|
178
203
|
----------
|
|
179
204
|
engine : str
|
|
180
205
|
Engine to use.
|
|
181
|
-
shell_command :
|
|
182
|
-
|
|
206
|
+
shell_command : list
|
|
207
|
+
List of shell command plus arguments.
|
|
183
208
|
"""
|
|
184
209
|
self._logger.info(f"Submitting script to {engine}")
|
|
185
210
|
self._logger.debug(shell_command)
|
|
211
|
+
result = None
|
|
186
212
|
if not self.test:
|
|
187
|
-
|
|
213
|
+
result = subprocess.run(shell_command, shell=True, check=True)
|
|
188
214
|
else:
|
|
189
|
-
self._logger.info(f"Testing ({engine})")
|
|
190
|
-
|
|
215
|
+
self._logger.info(f"Testing ({engine}: {shell_command})")
|
|
216
|
+
|
|
217
|
+
return result.returncode if result else 0
|
simtools/model/array_model.py
CHANGED
|
@@ -27,25 +27,25 @@ class ArrayModel:
|
|
|
27
27
|
MongoDB configuration.
|
|
28
28
|
model_version: str
|
|
29
29
|
Model version.
|
|
30
|
-
label: str
|
|
30
|
+
label: str, optional
|
|
31
31
|
Instance label. Used for output file naming.
|
|
32
|
-
site: str
|
|
32
|
+
site: str, optional
|
|
33
33
|
Site name.
|
|
34
|
-
layout_name: str
|
|
34
|
+
layout_name: str, optional
|
|
35
35
|
Layout name.
|
|
36
|
-
array_elements: str, Path,
|
|
36
|
+
array_elements: Union[str, Path, List[str]], optional
|
|
37
37
|
Array element definitions (list of array element or path to file with
|
|
38
38
|
the array element positions).
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
41
|
def __init__(
|
|
42
42
|
self,
|
|
43
|
-
mongo_db_config,
|
|
44
|
-
model_version,
|
|
45
|
-
label=None,
|
|
46
|
-
site=None,
|
|
47
|
-
layout_name=None,
|
|
48
|
-
array_elements=None,
|
|
43
|
+
mongo_db_config: dict,
|
|
44
|
+
model_version: str,
|
|
45
|
+
label: str | None = None,
|
|
46
|
+
site: str | None = None,
|
|
47
|
+
layout_name: str | None = None,
|
|
48
|
+
array_elements: str | Path | list[str] | None = None,
|
|
49
49
|
):
|
|
50
50
|
"""Initialize ArrayModel."""
|
|
51
51
|
self._logger = logging.getLogger(__name__)
|
|
@@ -53,7 +53,7 @@ class ArrayModel:
|
|
|
53
53
|
self.mongo_db_config = mongo_db_config
|
|
54
54
|
self.model_version = model_version
|
|
55
55
|
self.label = label
|
|
56
|
-
self.layout_name = layout_name
|
|
56
|
+
self.layout_name = layout_name
|
|
57
57
|
self._config_file_path = None
|
|
58
58
|
self._config_file_directory = None
|
|
59
59
|
self.io_handler = io_handler.IOHandler()
|
|
@@ -66,7 +66,7 @@ class ArrayModel:
|
|
|
66
66
|
self._telescope_model_files_exported = False
|
|
67
67
|
self._array_model_file_exported = False
|
|
68
68
|
|
|
69
|
-
def _initialize(self, site, array_elements_config):
|
|
69
|
+
def _initialize(self, site: str, array_elements_config: str | Path | list[str]):
|
|
70
70
|
"""
|
|
71
71
|
Initialize ArrayModel taking different configuration options into account.
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ class ArrayModel:
|
|
|
74
74
|
----------
|
|
75
75
|
site: str
|
|
76
76
|
Site name.
|
|
77
|
-
array_elements_config: str, Path,
|
|
77
|
+
array_elements_config: Union[str, Path, List[str]]
|
|
78
78
|
Array element definitions.
|
|
79
79
|
|
|
80
80
|
Returns
|
|
@@ -108,7 +108,7 @@ class ArrayModel:
|
|
|
108
108
|
array_elements = self._get_array_elements_from_list(
|
|
109
109
|
site_model.get_array_elements_for_layout(self.layout_name)
|
|
110
110
|
)
|
|
111
|
-
if array_elements
|
|
111
|
+
if not array_elements:
|
|
112
112
|
raise ValueError(
|
|
113
113
|
"No array elements found. "
|
|
114
114
|
"Possibly missing valid layout name or missing telescope list."
|
|
@@ -117,7 +117,7 @@ class ArrayModel:
|
|
|
117
117
|
return array_elements, site_model, telescope_model
|
|
118
118
|
|
|
119
119
|
@property
|
|
120
|
-
def number_of_telescopes(self):
|
|
120
|
+
def number_of_telescopes(self) -> int:
|
|
121
121
|
"""
|
|
122
122
|
Return the number of telescopes.
|
|
123
123
|
|
|
@@ -129,7 +129,7 @@ class ArrayModel:
|
|
|
129
129
|
return len(self.telescope_model)
|
|
130
130
|
|
|
131
131
|
@property
|
|
132
|
-
def site(self):
|
|
132
|
+
def site(self) -> str:
|
|
133
133
|
"""
|
|
134
134
|
Return site.
|
|
135
135
|
|
|
@@ -140,7 +140,7 @@ class ArrayModel:
|
|
|
140
140
|
"""
|
|
141
141
|
return self.site_model.site
|
|
142
142
|
|
|
143
|
-
def _build_telescope_models(self, site_model, array_elements):
|
|
143
|
+
def _build_telescope_models(self, site_model: SiteModel, array_elements: dict) -> dict:
|
|
144
144
|
"""
|
|
145
145
|
Build the the telescope models for all telescopes of this array.
|
|
146
146
|
|
|
@@ -150,7 +150,7 @@ class ArrayModel:
|
|
|
150
150
|
|
|
151
151
|
Parameters
|
|
152
152
|
----------
|
|
153
|
-
site_model:
|
|
153
|
+
site_model: SiteModel
|
|
154
154
|
Site model.
|
|
155
155
|
array_elements: dict
|
|
156
156
|
Dict with array elements.
|
|
@@ -233,7 +233,7 @@ class ArrayModel:
|
|
|
233
233
|
if not self._array_model_file_exported:
|
|
234
234
|
self.export_simtel_array_config_file()
|
|
235
235
|
|
|
236
|
-
def get_config_file(self):
|
|
236
|
+
def get_config_file(self) -> Path:
|
|
237
237
|
"""
|
|
238
238
|
Return the path of the array config file for sim_telarray.
|
|
239
239
|
|
|
@@ -247,7 +247,7 @@ class ArrayModel:
|
|
|
247
247
|
self.export_all_simtel_config_files()
|
|
248
248
|
return self._config_file_path
|
|
249
249
|
|
|
250
|
-
def get_config_directory(self):
|
|
250
|
+
def get_config_directory(self) -> Path:
|
|
251
251
|
"""
|
|
252
252
|
Get the path of the array config directory for sim_telarray.
|
|
253
253
|
|
|
@@ -260,7 +260,9 @@ class ArrayModel:
|
|
|
260
260
|
self._config_file_directory = self.io_handler.get_output_directory(self.label, "model")
|
|
261
261
|
return self._config_file_directory
|
|
262
262
|
|
|
263
|
-
def _load_array_element_positions_from_file(
|
|
263
|
+
def _load_array_element_positions_from_file(
|
|
264
|
+
self, array_elements_file: str | Path, site: str
|
|
265
|
+
) -> dict:
|
|
264
266
|
"""
|
|
265
267
|
Load array element (e.g. telescope) positions from a file into a dict.
|
|
266
268
|
|
|
@@ -268,7 +270,7 @@ class ArrayModel:
|
|
|
268
270
|
|
|
269
271
|
Parameters
|
|
270
272
|
----------
|
|
271
|
-
array_elements_file: str
|
|
273
|
+
array_elements_file: Union[str, Path]
|
|
272
274
|
Path to the file with the array element positions.
|
|
273
275
|
site: str
|
|
274
276
|
Site name.
|
|
@@ -287,7 +289,9 @@ class ArrayModel:
|
|
|
287
289
|
for row in table
|
|
288
290
|
}
|
|
289
291
|
|
|
290
|
-
def _get_telescope_position_parameter(
|
|
292
|
+
def _get_telescope_position_parameter(
|
|
293
|
+
self, telescope_name: str, site: str, x: u.Quantity, y: u.Quantity, z: u.Quantity
|
|
294
|
+
) -> dict:
|
|
291
295
|
"""
|
|
292
296
|
Return dictionary with telescope position parameters (following DB model database format).
|
|
293
297
|
|
|
@@ -323,7 +327,7 @@ class ArrayModel:
|
|
|
323
327
|
"file": False,
|
|
324
328
|
}
|
|
325
329
|
|
|
326
|
-
def _get_array_elements_from_list(self, array_elements_list):
|
|
330
|
+
def _get_array_elements_from_list(self, array_elements_list: list[str]) -> dict:
|
|
327
331
|
"""
|
|
328
332
|
Return dictionary with array elements from a list of telescope names.
|
|
329
333
|
|
|
@@ -349,7 +353,7 @@ class ArrayModel:
|
|
|
349
353
|
array_elements_dict.update(self._get_all_array_elements_of_type(name))
|
|
350
354
|
return array_elements_dict
|
|
351
355
|
|
|
352
|
-
def _get_all_array_elements_of_type(self, array_element_type):
|
|
356
|
+
def _get_all_array_elements_of_type(self, array_element_type: str) -> dict:
|
|
353
357
|
"""
|
|
354
358
|
Return all array elements of a specific type using the database.
|
|
355
359
|
|
|
@@ -371,7 +375,7 @@ class ArrayModel:
|
|
|
371
375
|
)
|
|
372
376
|
return self._get_array_elements_from_list(all_elements)
|
|
373
377
|
|
|
374
|
-
def export_array_elements_as_table(self, coordinate_system="ground"):
|
|
378
|
+
def export_array_elements_as_table(self, coordinate_system: str = "ground") -> QTable:
|
|
375
379
|
"""
|
|
376
380
|
Export array elements positions to astropy table.
|
|
377
381
|
|
|
@@ -23,23 +23,20 @@ class CalibrationModel(ModelParameter):
|
|
|
23
23
|
MongoDB configuration.
|
|
24
24
|
model_version: str
|
|
25
25
|
Model version.
|
|
26
|
-
label: str
|
|
26
|
+
label: str, optional
|
|
27
27
|
Instance label. Important for output file naming.
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
def __init__(
|
|
31
31
|
self,
|
|
32
|
-
site,
|
|
33
|
-
calibration_device_model_name,
|
|
34
|
-
mongo_db_config,
|
|
35
|
-
model_version,
|
|
36
|
-
label=None,
|
|
32
|
+
site: str,
|
|
33
|
+
calibration_device_model_name: str,
|
|
34
|
+
mongo_db_config: dict,
|
|
35
|
+
model_version: str,
|
|
36
|
+
label: str | None = None,
|
|
37
37
|
):
|
|
38
38
|
"""Initialize CalibrationModel."""
|
|
39
|
-
|
|
40
|
-
self._logger.debug("Init CalibrationModel %s %s", site, calibration_device_model_name)
|
|
41
|
-
ModelParameter.__init__(
|
|
42
|
-
self,
|
|
39
|
+
super().__init__(
|
|
43
40
|
site=site,
|
|
44
41
|
array_element_name=calibration_device_model_name,
|
|
45
42
|
collection="calibration_devices",
|
|
@@ -48,3 +45,6 @@ class CalibrationModel(ModelParameter):
|
|
|
48
45
|
db=None,
|
|
49
46
|
label=label,
|
|
50
47
|
)
|
|
48
|
+
|
|
49
|
+
self._logger = logging.getLogger(__name__)
|
|
50
|
+
self._logger.debug("Init CalibrationModel %s %s", site, calibration_device_model_name)
|