gammasimtools 0.16.0__py3-none-any.whl → 0.18.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.16.0.dist-info → gammasimtools-0.18.0.dist-info}/METADATA +5 -2
- {gammasimtools-0.16.0.dist-info → gammasimtools-0.18.0.dist-info}/RECORD +82 -74
- {gammasimtools-0.16.0.dist-info → gammasimtools-0.18.0.dist-info}/WHEEL +1 -1
- {gammasimtools-0.16.0.dist-info → gammasimtools-0.18.0.dist-info}/entry_points.txt +4 -1
- simtools/_version.py +2 -2
- simtools/applications/db_add_simulation_model_from_repository_to_db.py +10 -1
- simtools/applications/derive_ctao_array_layouts.py +5 -5
- simtools/applications/derive_mirror_rnda.py +1 -1
- simtools/applications/generate_simtel_event_data.py +128 -46
- simtools/applications/merge_tables.py +102 -0
- simtools/applications/plot_array_layout.py +145 -258
- simtools/applications/plot_tabular_data.py +12 -1
- simtools/applications/plot_tabular_data_for_model_parameter.py +103 -0
- simtools/applications/production_derive_corsika_limits.py +78 -225
- simtools/applications/production_derive_statistics.py +77 -43
- simtools/applications/simulate_light_emission.py +1 -0
- simtools/applications/simulate_prod.py +30 -18
- simtools/applications/simulate_prod_htcondor_generator.py +0 -1
- simtools/applications/submit_array_layouts.py +93 -0
- simtools/applications/verify_simulation_model_production_tables.py +52 -0
- simtools/camera/camera_efficiency.py +3 -3
- simtools/configuration/commandline_parser.py +30 -35
- simtools/configuration/configurator.py +0 -4
- simtools/constants.py +2 -0
- simtools/corsika/corsika_config.py +17 -12
- simtools/corsika/primary_particle.py +46 -13
- simtools/data_model/metadata_collector.py +7 -3
- simtools/data_model/schema.py +15 -1
- simtools/db/db_handler.py +16 -11
- simtools/db/db_model_upload.py +2 -2
- simtools/io_operations/io_handler.py +2 -2
- simtools/io_operations/io_table_handler.py +345 -0
- simtools/job_execution/htcondor_script_generator.py +2 -2
- simtools/job_execution/job_manager.py +7 -121
- simtools/layout/array_layout_utils.py +389 -0
- simtools/model/array_model.py +10 -1
- simtools/model/model_repository.py +134 -0
- simtools/production_configuration/{calculate_statistical_errors_grid_point.py → calculate_statistical_uncertainties_grid_point.py} +101 -112
- simtools/production_configuration/derive_corsika_limits.py +239 -111
- simtools/production_configuration/derive_corsika_limits_grid.py +232 -0
- simtools/production_configuration/derive_production_statistics.py +57 -26
- simtools/production_configuration/derive_production_statistics_handler.py +70 -37
- simtools/production_configuration/interpolation_handler.py +296 -94
- simtools/ray_tracing/ray_tracing.py +7 -6
- simtools/reporting/docs_read_parameters.py +104 -62
- simtools/resources/array-element-ids.json +126 -0
- simtools/runners/corsika_simtel_runner.py +4 -1
- simtools/runners/runner_services.py +5 -4
- simtools/schemas/model_parameter_and_data_schema.metaschema.yml +5 -1
- simtools/schemas/model_parameters/atmospheric_profile.schema.yml +41 -0
- simtools/schemas/model_parameters/atmospheric_transmission.schema.yml +43 -0
- simtools/schemas/model_parameters/camera_filter.schema.yml +10 -0
- simtools/schemas/model_parameters/camera_filter_incidence_angle.schema.yml +10 -0
- simtools/schemas/model_parameters/discriminator_pulse_shape.schema.yml +31 -0
- simtools/schemas/model_parameters/dsum_threshold.schema.yml +41 -0
- simtools/schemas/model_parameters/fadc_pulse_shape.schema.yml +12 -0
- simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml +10 -0
- simtools/schemas/model_parameters/mirror_reflectivity.schema.yml +10 -0
- simtools/schemas/model_parameters/nsb_reference_spectrum.schema.yml +12 -0
- simtools/schemas/model_parameters/pm_photoelectron_spectrum.schema.yml +19 -0
- simtools/schemas/model_parameters/quantum_efficiency.schema.yml +10 -0
- simtools/schemas/plot_configuration.metaschema.yml +46 -57
- simtools/schemas/production_configuration_metrics.schema.yml +2 -2
- simtools/simtel/simtel_config_writer.py +34 -14
- simtools/simtel/simtel_io_event_reader.py +301 -194
- simtools/simtel/simtel_io_event_writer.py +237 -221
- simtools/simtel/simtel_io_file_info.py +9 -4
- simtools/simtel/simtel_io_metadata.py +119 -8
- simtools/simtel/simulator_array.py +2 -2
- simtools/simtel/simulator_light_emission.py +79 -34
- simtools/simtel/simulator_ray_tracing.py +2 -2
- simtools/simulator.py +101 -68
- simtools/testing/validate_output.py +4 -1
- simtools/utils/general.py +1 -3
- simtools/utils/names.py +76 -7
- simtools/visualization/plot_array_layout.py +242 -0
- simtools/visualization/plot_pixels.py +680 -0
- simtools/visualization/plot_tables.py +81 -2
- simtools/visualization/visualize.py +3 -219
- simtools/applications/production_generate_simulation_config.py +0 -152
- simtools/layout/ctao_array_layouts.py +0 -172
- simtools/production_configuration/generate_simulation_config.py +0 -158
- {gammasimtools-0.16.0.dist-info → gammasimtools-0.18.0.dist-info}/licenses/LICENSE +0 -0
- {gammasimtools-0.16.0.dist-info → gammasimtools-0.18.0.dist-info}/top_level.txt +0 -0
- /simtools/{schemas → resources}/array_elements.yml +0 -0
|
@@ -12,11 +12,13 @@ from pathlib import Path
|
|
|
12
12
|
import numpy as np
|
|
13
13
|
|
|
14
14
|
from simtools.db import db_handler
|
|
15
|
+
from simtools.io_operations import io_handler
|
|
15
16
|
from simtools.model.telescope_model import TelescopeModel
|
|
17
|
+
from simtools.utils import general as gen
|
|
16
18
|
from simtools.utils import names
|
|
19
|
+
from simtools.visualization import plot_pixels
|
|
17
20
|
|
|
18
21
|
logger = logging.getLogger()
|
|
19
|
-
IMAGE_PATH = "../../_images"
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
class ReadParameters:
|
|
@@ -62,41 +64,61 @@ class ReadParameters:
|
|
|
62
64
|
)
|
|
63
65
|
self._model_version = model_version
|
|
64
66
|
|
|
65
|
-
def _convert_to_md(self, parameter, input_file):
|
|
67
|
+
def _convert_to_md(self, parameter, parameter_version, input_file):
|
|
66
68
|
"""Convert a file to a Markdown file, preserving formatting."""
|
|
67
69
|
input_file = Path(input_file)
|
|
70
|
+
|
|
68
71
|
output_data_path = Path(self.output_path / "_data_files")
|
|
69
72
|
output_data_path.mkdir(parents=True, exist_ok=True)
|
|
70
73
|
output_file_name = Path(input_file.stem + ".md")
|
|
71
74
|
output_file = output_data_path / output_file_name
|
|
75
|
+
image_name = f"{self.array_element}_{parameter}_{self.model_version.replace('.', '-')}"
|
|
76
|
+
outpath = Path(io_handler.IOHandler().get_output_directory().parent / "_images")
|
|
77
|
+
outpath.mkdir(parents=True, exist_ok=True)
|
|
78
|
+
image_path = Path(f"{outpath}/{image_name}")
|
|
79
|
+
|
|
80
|
+
if parameter == "camera_config_file" and parameter_version:
|
|
81
|
+
image_path = Path(f"{outpath}/{input_file.stem.replace('.', '-')}")
|
|
82
|
+
if not (image_path.with_suffix(".png")).exists():
|
|
83
|
+
logger.info("Plotting camera configuration file: %s", input_file.name)
|
|
84
|
+
plot_config = {
|
|
85
|
+
"file_name": input_file.name,
|
|
86
|
+
"telescope": self.array_element,
|
|
87
|
+
"parameter_version": parameter_version,
|
|
88
|
+
"site": self.site,
|
|
89
|
+
"model_version": self.model_version,
|
|
90
|
+
"parameter": parameter,
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
plot_pixels.plot(
|
|
94
|
+
config=plot_config,
|
|
95
|
+
output_file=image_path,
|
|
96
|
+
db_config=self.db_config,
|
|
97
|
+
)
|
|
98
|
+
else:
|
|
99
|
+
logger.info(
|
|
100
|
+
"Camera configuration file plot already exists: %s",
|
|
101
|
+
image_path.with_suffix(".png"),
|
|
102
|
+
)
|
|
72
103
|
|
|
73
104
|
try:
|
|
74
|
-
#
|
|
75
|
-
|
|
76
|
-
with input_file.open("r", encoding="utf-8") as infile:
|
|
77
|
-
file_contents = infile.read()
|
|
78
|
-
except UnicodeDecodeError:
|
|
79
|
-
# If utf-8 fails, try with latin-1 (which can read any byte sequence)
|
|
80
|
-
with input_file.open("r", encoding="latin-1") as infile:
|
|
81
|
-
file_contents = infile.read()
|
|
105
|
+
# with input_file.open("r", encoding="utf-8") as infile:
|
|
106
|
+
file_contents = gen.read_file_encoded_in_utf_or_latin(input_file)
|
|
82
107
|
|
|
83
108
|
if self.model_version is not None:
|
|
84
109
|
with output_file.open("w", encoding="utf-8") as outfile:
|
|
85
110
|
outfile.write(f"# {input_file.stem}\n")
|
|
111
|
+
outfile.write(f"\n\n")
|
|
86
112
|
outfile.write(
|
|
87
|
-
"
|
|
113
|
+
"\n\nThe full file can be found in the Simulation Model repository [here]"
|
|
88
114
|
"(https://gitlab.cta-observatory.org/cta-science/simulations/"
|
|
89
115
|
"simulation-model/simulation-models/-/blob/main/simulation-models/"
|
|
90
116
|
f"model_parameters/Files/{input_file.name}).\n\n"
|
|
91
117
|
)
|
|
92
|
-
outfile.write(
|
|
93
|
-
f"}.png)\n"
|
|
95
|
-
)
|
|
96
118
|
outfile.write("\n\n")
|
|
97
119
|
outfile.write("The first 30 lines of the file are:\n")
|
|
98
120
|
outfile.write("```\n")
|
|
99
|
-
first_30_lines = "
|
|
121
|
+
first_30_lines = "".join(file_contents[:30])
|
|
100
122
|
outfile.write(first_30_lines)
|
|
101
123
|
outfile.write("\n```")
|
|
102
124
|
|
|
@@ -106,11 +128,19 @@ class ReadParameters:
|
|
|
106
128
|
|
|
107
129
|
return f"_data_files/{output_file_name}"
|
|
108
130
|
|
|
109
|
-
def _format_parameter_value(
|
|
131
|
+
def _format_parameter_value(
|
|
132
|
+
self, parameter, value_data, unit, file_flag, parameter_version=None
|
|
133
|
+
):
|
|
110
134
|
"""Format parameter value based on type."""
|
|
111
135
|
if file_flag:
|
|
112
136
|
input_file_name = f"{self.output_path}/model/{value_data}"
|
|
113
|
-
|
|
137
|
+
if parameter_version is None:
|
|
138
|
+
return (
|
|
139
|
+
f"[{Path(value_data).name}](https://gitlab.cta-observatory.org/"
|
|
140
|
+
"cta-science/simulations/simulation-model/simulation-models/-/blob/main/"
|
|
141
|
+
f"simulation-models/model_parameters/Files/{value_data})"
|
|
142
|
+
).strip()
|
|
143
|
+
output_file_name = self._convert_to_md(parameter, parameter_version, input_file_name)
|
|
114
144
|
return f"[{Path(value_data).name}]({output_file_name})".strip()
|
|
115
145
|
if isinstance(value_data, (str | int | float)):
|
|
116
146
|
return f"{value_data} {unit}".strip()
|
|
@@ -217,8 +247,10 @@ class ReadParameters:
|
|
|
217
247
|
continue
|
|
218
248
|
|
|
219
249
|
file_flag = parameter_data.get("file", False)
|
|
220
|
-
value = self._format_parameter_value(parameter_name, value_data, unit, file_flag)
|
|
221
250
|
parameter_version = parameter_data.get("parameter_version")
|
|
251
|
+
value = self._format_parameter_value(
|
|
252
|
+
parameter_name, value_data, unit, file_flag, parameter_version=None
|
|
253
|
+
)
|
|
222
254
|
model_version = version
|
|
223
255
|
|
|
224
256
|
# Group the data by parameter version and store model versions as a list
|
|
@@ -234,25 +266,28 @@ class ReadParameters:
|
|
|
234
266
|
return self._group_model_versions_by_parameter_version(grouped_data)
|
|
235
267
|
|
|
236
268
|
def get_all_parameter_descriptions(self, collection="telescopes"):
|
|
237
|
-
"""
|
|
238
|
-
Get descriptions for all model parameters.
|
|
269
|
+
"""Get descriptions for all model parameters.
|
|
239
270
|
|
|
240
271
|
Returns
|
|
241
272
|
-------
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
273
|
+
dict
|
|
274
|
+
Nested dictionaries with first key as the parameter name and
|
|
275
|
+
the following dictionary as the value:
|
|
276
|
+
- key: description, value: description of the parameter.
|
|
277
|
+
- key: short_description, value: short description of the parameter.
|
|
278
|
+
- key: inst_class, value: class, for eg. Structure, Camera, etc.
|
|
246
279
|
"""
|
|
247
|
-
|
|
280
|
+
parameter_dict = {}
|
|
248
281
|
|
|
249
282
|
for instrument_class in names.db_collection_to_instrument_class_key(collection):
|
|
250
283
|
for parameter, details in names.model_parameters(instrument_class).items():
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
284
|
+
parameter_dict[parameter] = {
|
|
285
|
+
"description": details.get("description"),
|
|
286
|
+
"short_description": details.get("short_description"),
|
|
287
|
+
"inst_class": instrument_class,
|
|
288
|
+
}
|
|
254
289
|
|
|
255
|
-
return
|
|
290
|
+
return parameter_dict
|
|
256
291
|
|
|
257
292
|
def get_array_element_parameter_data(self, telescope_model, collection="telescopes"):
|
|
258
293
|
"""
|
|
@@ -292,13 +327,15 @@ class ReadParameters:
|
|
|
292
327
|
continue
|
|
293
328
|
|
|
294
329
|
file_flag = parameter_data.get("file", False)
|
|
295
|
-
value = self._format_parameter_value(
|
|
330
|
+
value = self._format_parameter_value(
|
|
331
|
+
parameter, value_data, unit, file_flag, parameter_version
|
|
332
|
+
)
|
|
296
333
|
|
|
297
|
-
description = parameter_descriptions
|
|
298
|
-
short_description =
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
inst_class = parameter_descriptions
|
|
334
|
+
description = parameter_descriptions.get(parameter).get("description")
|
|
335
|
+
short_description = (
|
|
336
|
+
parameter_descriptions.get(parameter).get("short_description") or description
|
|
337
|
+
)
|
|
338
|
+
inst_class = parameter_descriptions.get(parameter).get("inst_class")
|
|
302
339
|
|
|
303
340
|
matching_instrument = parameter_data["instrument"] == telescope_model.name
|
|
304
341
|
if not names.is_design_type(telescope_model.name) and matching_instrument:
|
|
@@ -376,8 +413,10 @@ class ReadParameters:
|
|
|
376
413
|
|
|
377
414
|
data = []
|
|
378
415
|
for parameter, parameter_data in param_dict.items():
|
|
379
|
-
description = parameter_descriptions
|
|
380
|
-
short_description = parameter_descriptions
|
|
416
|
+
description = parameter_descriptions.get(parameter).get("description")
|
|
417
|
+
short_description = parameter_descriptions.get(parameter).get(
|
|
418
|
+
"short_description", description
|
|
419
|
+
)
|
|
381
420
|
value_data = parameter_data.get("value")
|
|
382
421
|
|
|
383
422
|
if value_data is None:
|
|
@@ -386,7 +425,9 @@ class ReadParameters:
|
|
|
386
425
|
unit = parameter_data.get("unit") or " "
|
|
387
426
|
file_flag = parameter_data.get("file", False)
|
|
388
427
|
parameter_version = parameter_data.get("parameter_version")
|
|
389
|
-
value = self._format_parameter_value(
|
|
428
|
+
value = self._format_parameter_value(
|
|
429
|
+
parameter, value_data, unit, file_flag, parameter_version
|
|
430
|
+
)
|
|
390
431
|
|
|
391
432
|
data.append(
|
|
392
433
|
[
|
|
@@ -508,10 +549,12 @@ class ReadParameters:
|
|
|
508
549
|
continue
|
|
509
550
|
|
|
510
551
|
output_filename = output_path / f"{parameter}.md"
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
)
|
|
552
|
+
|
|
553
|
+
parameter_descriptions = self.get_all_parameter_descriptions(collection=collection).get(
|
|
554
|
+
parameter
|
|
555
|
+
) or self.get_all_parameter_descriptions(collection="telescopes").get(parameter)
|
|
556
|
+
|
|
557
|
+
description = parameter_descriptions.get("description")
|
|
515
558
|
with output_filename.open("w", encoding="utf-8") as file:
|
|
516
559
|
# Write header
|
|
517
560
|
file.write(
|
|
@@ -534,14 +577,12 @@ class ReadParameters:
|
|
|
534
577
|
file.write(
|
|
535
578
|
f"| {item['parameter_version']} |"
|
|
536
579
|
f" {item['model_version']} |"
|
|
537
|
-
f"{item['value']
|
|
580
|
+
f"{item['value']} |\n"
|
|
538
581
|
)
|
|
539
582
|
|
|
540
583
|
file.write("\n")
|
|
541
584
|
if comparison_data.get(parameter)[0]["file_flag"]:
|
|
542
|
-
file.write(
|
|
543
|
-
f""
|
|
544
|
-
)
|
|
585
|
+
file.write(f"")
|
|
545
586
|
|
|
546
587
|
def _write_array_layouts_section(self, file, layouts):
|
|
547
588
|
"""Write the array layouts section of the report."""
|
|
@@ -556,7 +597,7 @@ class ReadParameters:
|
|
|
556
597
|
file.write("\n")
|
|
557
598
|
version = self.model_version.replace(".", "-")
|
|
558
599
|
filename = f"OBS-{self.site}_{layout_name}_{version}.png"
|
|
559
|
-
image_path = f"
|
|
600
|
+
image_path = f"/_images/{filename}"
|
|
560
601
|
file.write(f"\n\n")
|
|
561
602
|
file.write("\n")
|
|
562
603
|
|
|
@@ -606,7 +647,9 @@ class ReadParameters:
|
|
|
606
647
|
f"(#array-trigger-configurations) | {parameter_version} |\n"
|
|
607
648
|
)
|
|
608
649
|
else:
|
|
609
|
-
formatted_value = self._format_parameter_value(
|
|
650
|
+
formatted_value = self._format_parameter_value(
|
|
651
|
+
param_name, value, unit, file_flag, parameter_version
|
|
652
|
+
)
|
|
610
653
|
file.write(f"| {param_name} | {formatted_value} | {parameter_version} |\n")
|
|
611
654
|
file.write("\n")
|
|
612
655
|
|
|
@@ -645,7 +688,7 @@ class ReadParameters:
|
|
|
645
688
|
|
|
646
689
|
def get_calibration_data(self, all_parameter_data, array_element):
|
|
647
690
|
"""Get calibration data and descriptions for a given array element."""
|
|
648
|
-
|
|
691
|
+
calibration_descriptions = self.get_all_parameter_descriptions(
|
|
649
692
|
collection="calibration_devices"
|
|
650
693
|
)
|
|
651
694
|
# get descriptions of array element positions from the telescope collection
|
|
@@ -654,6 +697,10 @@ class ReadParameters:
|
|
|
654
697
|
class_grouped_data = {}
|
|
655
698
|
|
|
656
699
|
for parameter in all_parameter_data.keys():
|
|
700
|
+
parameter_descriptions = calibration_descriptions.get(
|
|
701
|
+
parameter
|
|
702
|
+
) or telescope_descriptions.get(parameter)
|
|
703
|
+
|
|
657
704
|
parameter_data = all_parameter_data.get(parameter)
|
|
658
705
|
parameter_version = parameter_data.get("parameter_version")
|
|
659
706
|
unit = parameter_data.get("unit") or " "
|
|
@@ -663,19 +710,15 @@ class ReadParameters:
|
|
|
663
710
|
continue
|
|
664
711
|
|
|
665
712
|
file_flag = parameter_data.get("file", False)
|
|
666
|
-
value = self._format_parameter_value(
|
|
667
|
-
|
|
668
|
-
description = parameter_descriptions[0].get(
|
|
669
|
-
parameter, telescope_descriptions[0].get(parameter)
|
|
670
|
-
)
|
|
671
|
-
short_description = (
|
|
672
|
-
parameter_descriptions[1].get(parameter, telescope_descriptions[1].get(parameter))
|
|
673
|
-
or description
|
|
674
|
-
)
|
|
675
|
-
inst_class = parameter_descriptions[2].get(
|
|
676
|
-
parameter, telescope_descriptions[2].get(parameter)
|
|
713
|
+
value = self._format_parameter_value(
|
|
714
|
+
parameter, value_data, unit, file_flag, parameter_version
|
|
677
715
|
)
|
|
678
716
|
|
|
717
|
+
description = parameter_descriptions.get("description")
|
|
718
|
+
short_description = parameter_descriptions.get("short_description") or description
|
|
719
|
+
|
|
720
|
+
inst_class = parameter_descriptions.get("inst_class")
|
|
721
|
+
|
|
679
722
|
matching_instrument = parameter_data["instrument"] == array_element
|
|
680
723
|
if not names.is_design_type(array_element) and matching_instrument:
|
|
681
724
|
parameter = f"***{parameter}***"
|
|
@@ -764,5 +807,4 @@ class ReadParameters:
|
|
|
764
807
|
for calibration_device in array_elements:
|
|
765
808
|
self.site = names.get_site_from_array_element_name(calibration_device)
|
|
766
809
|
self.array_element = calibration_device
|
|
767
|
-
print("cal: ", calibration_device)
|
|
768
810
|
self.produce_model_parameter_reports(collection="calibration_devices")
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"CTA DATA MODEL NAME": "ctao.common.identifiers.array_elements",
|
|
4
|
+
"CTA DATA MODEL URL": "https://gitlab.cta-observatory.org/cta-computing/common",
|
|
5
|
+
"CTA DATA MODEL VERSION": 2,
|
|
6
|
+
"CTA DATA PRODUCT DESCRIPTION": "This file contains a mapping of array element ID number to human-readable name. The ids define the telescopes and other array elements at CTAO-North and CTAO-South",
|
|
7
|
+
"CTA PRODUCT ID": "350917c3-fb77-453d-b1bc-296471f5e7fb"
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"array_elements": [
|
|
11
|
+
{"id": 1, "name": "LSTN-01"},
|
|
12
|
+
{"id": 2, "name": "LSTN-02"},
|
|
13
|
+
{"id": 3, "name": "LSTN-03"},
|
|
14
|
+
{"id": 4, "name": "LSTN-04"},
|
|
15
|
+
{"id": 5, "name": "MSTN-01"},
|
|
16
|
+
{"id": 6, "name": "MSTN-02"},
|
|
17
|
+
{"id": 7, "name": "MSTN-03"},
|
|
18
|
+
{"id": 8, "name": "MSTN-04"},
|
|
19
|
+
{"id": 9, "name": "MSTN-05"},
|
|
20
|
+
{"id": 10, "name": "MSTN-06"},
|
|
21
|
+
{"id": 11, "name": "MSTN-07"},
|
|
22
|
+
{"id": 12, "name": "MSTN-08"},
|
|
23
|
+
{"id": 13, "name": "MSTN-09"},
|
|
24
|
+
{"id": 14, "name": "MSTN-10"},
|
|
25
|
+
{"id": 15, "name": "MSTN-11"},
|
|
26
|
+
{"id": 16, "name": "MSTN-12"},
|
|
27
|
+
{"id": 17, "name": "MSTN-13"},
|
|
28
|
+
{"id": 18, "name": "MSTN-14"},
|
|
29
|
+
{"id": 19, "name": "MSTN-15"},
|
|
30
|
+
{"id": 20, "name": "RLDN-01"},
|
|
31
|
+
{"id": 21, "name": "STPN-01"},
|
|
32
|
+
{"id": 22, "name": "MSPN-01"},
|
|
33
|
+
{"id": 23, "name": "ILLN-01"},
|
|
34
|
+
{"id": 24, "name": "ILLN-02"},
|
|
35
|
+
{"id": 25, "name": "CEIN-01"},
|
|
36
|
+
{"id": 26, "name": "WSTN-01"},
|
|
37
|
+
{"id": 27, "name": "WSTN-02"},
|
|
38
|
+
{"id": 28, "name": "WSTN-03"},
|
|
39
|
+
{"id": 29, "name": "ASCN-01"},
|
|
40
|
+
{"id": 30, "name": "DUSN-01"},
|
|
41
|
+
{"id": 31, "name": "LISN-01"},
|
|
42
|
+
{"id": 101, "name": "LSTS-01"},
|
|
43
|
+
{"id": 102, "name": "LSTS-02"},
|
|
44
|
+
{"id": 103, "name": "LSTS-03"},
|
|
45
|
+
{"id": 104, "name": "LSTS-04"},
|
|
46
|
+
{"id": 105, "name": "MSTS-01"},
|
|
47
|
+
{"id": 106, "name": "MSTS-02"},
|
|
48
|
+
{"id": 107, "name": "MSTS-03"},
|
|
49
|
+
{"id": 108, "name": "MSTS-04"},
|
|
50
|
+
{"id": 109, "name": "MSTS-05"},
|
|
51
|
+
{"id": 110, "name": "MSTS-06"},
|
|
52
|
+
{"id": 111, "name": "MSTS-07"},
|
|
53
|
+
{"id": 112, "name": "MSTS-08"},
|
|
54
|
+
{"id": 113, "name": "MSTS-09"},
|
|
55
|
+
{"id": 114, "name": "MSTS-10"},
|
|
56
|
+
{"id": 115, "name": "MSTS-11"},
|
|
57
|
+
{"id": 116, "name": "MSTS-12"},
|
|
58
|
+
{"id": 117, "name": "MSTS-13"},
|
|
59
|
+
{"id": 118, "name": "MSTS-14"},
|
|
60
|
+
{"id": 119, "name": "SSTS-01"},
|
|
61
|
+
{"id": 120, "name": "SSTS-02"},
|
|
62
|
+
{"id": 121, "name": "SSTS-03"},
|
|
63
|
+
{"id": 122, "name": "SSTS-04"},
|
|
64
|
+
{"id": 123, "name": "SSTS-05"},
|
|
65
|
+
{"id": 124, "name": "SSTS-06"},
|
|
66
|
+
{"id": 125, "name": "SSTS-07"},
|
|
67
|
+
{"id": 126, "name": "SSTS-08"},
|
|
68
|
+
{"id": 127, "name": "SSTS-09"},
|
|
69
|
+
{"id": 128, "name": "SSTS-10"},
|
|
70
|
+
{"id": 129, "name": "SSTS-11"},
|
|
71
|
+
{"id": 130, "name": "SSTS-12"},
|
|
72
|
+
{"id": 131, "name": "SSTS-13"},
|
|
73
|
+
{"id": 132, "name": "SSTS-14"},
|
|
74
|
+
{"id": 133, "name": "SSTS-15"},
|
|
75
|
+
{"id": 134, "name": "SSTS-16"},
|
|
76
|
+
{"id": 135, "name": "SSTS-17"},
|
|
77
|
+
{"id": 136, "name": "SSTS-18"},
|
|
78
|
+
{"id": 137, "name": "SSTS-19"},
|
|
79
|
+
{"id": 138, "name": "SSTS-20"},
|
|
80
|
+
{"id": 139, "name": "SSTS-21"},
|
|
81
|
+
{"id": 140, "name": "SSTS-22"},
|
|
82
|
+
{"id": 141, "name": "SSTS-23"},
|
|
83
|
+
{"id": 142, "name": "SSTS-24"},
|
|
84
|
+
{"id": 143, "name": "SSTS-25"},
|
|
85
|
+
{"id": 144, "name": "SSTS-26"},
|
|
86
|
+
{"id": 145, "name": "SSTS-27"},
|
|
87
|
+
{"id": 146, "name": "SSTS-28"},
|
|
88
|
+
{"id": 147, "name": "SSTS-29"},
|
|
89
|
+
{"id": 148, "name": "SSTS-30"},
|
|
90
|
+
{"id": 149, "name": "SSTS-31"},
|
|
91
|
+
{"id": 150, "name": "SSTS-32"},
|
|
92
|
+
{"id": 151, "name": "SSTS-33"},
|
|
93
|
+
{"id": 152, "name": "SSTS-34"},
|
|
94
|
+
{"id": 153, "name": "SSTS-35"},
|
|
95
|
+
{"id": 154, "name": "SSTS-36"},
|
|
96
|
+
{"id": 155, "name": "SSTS-37"},
|
|
97
|
+
{"id": 156, "name": "SSTS-38"},
|
|
98
|
+
{"id": 157, "name": "SSTS-39"},
|
|
99
|
+
{"id": 158, "name": "SSTS-40"},
|
|
100
|
+
{"id": 159, "name": "SSTS-41"},
|
|
101
|
+
{"id": 160, "name": "SSTS-42"},
|
|
102
|
+
{"id": 161, "name": "SSTS-43"},
|
|
103
|
+
{"id": 162, "name": "SSTS-44"},
|
|
104
|
+
{"id": 163, "name": "SSTS-45"},
|
|
105
|
+
{"id": 164, "name": "SSTS-46"},
|
|
106
|
+
{"id": 165, "name": "SSTS-47"},
|
|
107
|
+
{"id": 166, "name": "SSTS-48"},
|
|
108
|
+
{"id": 167, "name": "SSTS-49"},
|
|
109
|
+
{"id": 168, "name": "SSTS-50"},
|
|
110
|
+
{"id": 169, "name": "CEIS-01"},
|
|
111
|
+
{"id": 170, "name": "RLDS-01"},
|
|
112
|
+
{"id": 171, "name": "RLDS-02"},
|
|
113
|
+
{"id": 172, "name": "STPS-01"},
|
|
114
|
+
{"id": 173, "name": "STPS-02"},
|
|
115
|
+
{"id": 174, "name": "MSPS-01"},
|
|
116
|
+
{"id": 175, "name": "ILLS-01"},
|
|
117
|
+
{"id": 176, "name": "ILLS-02"},
|
|
118
|
+
{"id": 177, "name": "ILLS-03"},
|
|
119
|
+
{"id": 178, "name": "ILLS-04"},
|
|
120
|
+
{"id": 179, "name": "WSTS-01"},
|
|
121
|
+
{"id": 180, "name": "WSTS-02"},
|
|
122
|
+
{"id": 181, "name": "WSTS-03"},
|
|
123
|
+
{"id": 182, "name": "ASCS-01"},
|
|
124
|
+
{"id": 183, "name": "DUSS-01"}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
@@ -42,6 +42,7 @@ class CorsikaSimtelRunner:
|
|
|
42
42
|
keep_seeds=False,
|
|
43
43
|
use_multipipe=False,
|
|
44
44
|
sim_telarray_seeds=None,
|
|
45
|
+
sequential=False,
|
|
45
46
|
):
|
|
46
47
|
self._logger = logging.getLogger(__name__)
|
|
47
48
|
self.corsika_config = (
|
|
@@ -53,6 +54,7 @@ class CorsikaSimtelRunner:
|
|
|
53
54
|
self._simtel_path = simtel_path
|
|
54
55
|
self.sim_telarray_seeds = sim_telarray_seeds
|
|
55
56
|
self.label = label
|
|
57
|
+
self.sequential = "--sequential" if sequential else ""
|
|
56
58
|
|
|
57
59
|
self.base_corsika_config.set_output_file_and_directory(use_multipipe)
|
|
58
60
|
self.corsika_runner = CorsikaRunner(
|
|
@@ -167,7 +169,8 @@ class CorsikaSimtelRunner:
|
|
|
167
169
|
)
|
|
168
170
|
with open(multipipe_script, "w", encoding="utf-8") as file:
|
|
169
171
|
multipipe_command = Path(self._simtel_path).joinpath(
|
|
170
|
-
f"sim_telarray/bin/multipipe_corsika -c {multipipe_file}
|
|
172
|
+
f"sim_telarray/bin/multipipe_corsika -c {multipipe_file} {self.sequential} "
|
|
173
|
+
"|| echo 'Fan-out failed'"
|
|
171
174
|
)
|
|
172
175
|
file.write(f"{multipipe_command}")
|
|
173
176
|
|
|
@@ -138,9 +138,9 @@ class RunnerServices:
|
|
|
138
138
|
file_label = f"_{info_for_file_name['label']}" if info_for_file_name.get("label") else ""
|
|
139
139
|
zenith = self.corsika_config.get_config_parameter("THETAP")[0]
|
|
140
140
|
azimuth = self.corsika_config.azimuth_angle
|
|
141
|
-
|
|
141
|
+
run_number_string = self._get_run_number_string(info_for_file_name["run_number"])
|
|
142
142
|
return (
|
|
143
|
-
f"{
|
|
143
|
+
f"{info_for_file_name['primary']}_{run_number_string}_"
|
|
144
144
|
f"za{round(zenith):02}deg_azm{azimuth:03}deg_"
|
|
145
145
|
f"{info_for_file_name['site']}_{info_for_file_name['array_name']}_"
|
|
146
146
|
f"{info_for_file_name['model_version']}{file_label}"
|
|
@@ -189,8 +189,9 @@ class RunnerServices:
|
|
|
189
189
|
"""
|
|
190
190
|
data_suffixes = {
|
|
191
191
|
"output": ".zst",
|
|
192
|
-
"corsika_output": ".zst",
|
|
192
|
+
"corsika_output": ".corsika.zst",
|
|
193
193
|
"simtel_output": ".simtel.zst",
|
|
194
|
+
"event_data": ".reduced_event_data.hdf5",
|
|
194
195
|
}
|
|
195
196
|
run_dir = self._get_run_number_string(run_number)
|
|
196
197
|
data_run_dir = self.directory["data"].joinpath(run_dir)
|
|
@@ -261,7 +262,7 @@ class RunnerServices:
|
|
|
261
262
|
if file_type in ["log", "histogram", "corsika_log"]:
|
|
262
263
|
return self._get_log_file_path(file_type, file_name)
|
|
263
264
|
|
|
264
|
-
if file_type in ["output", "corsika_output", "simtel_output"]:
|
|
265
|
+
if file_type in ["output", "corsika_output", "simtel_output", "event_data"]:
|
|
265
266
|
return self._get_data_file_path(file_type, file_name, run_number)
|
|
266
267
|
|
|
267
268
|
if file_type in ("sub_log", "sub_script"):
|
|
@@ -6,7 +6,6 @@ description: YAML representation of data and model parameter metaschema
|
|
|
6
6
|
version: 0.1.0
|
|
7
7
|
name: model_parameter_and_data_schema.metaschema
|
|
8
8
|
type: object
|
|
9
|
-
additionalProperties: false
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
definitions:
|
|
@@ -59,6 +58,11 @@ definitions:
|
|
|
59
58
|
type: array
|
|
60
59
|
items:
|
|
61
60
|
$ref: '#/definitions/SimulationSoftware'
|
|
61
|
+
plot_configuration:
|
|
62
|
+
type: array
|
|
63
|
+
items:
|
|
64
|
+
$ref: 'plot_configuration.metaschema.yml#/definitions/plot'
|
|
65
|
+
description: "List of plotting configurations"
|
|
62
66
|
required:
|
|
63
67
|
- version
|
|
64
68
|
- meta_schema
|
|
@@ -30,3 +30,44 @@ source:
|
|
|
30
30
|
- Calibration
|
|
31
31
|
simulation_software:
|
|
32
32
|
- name: corsika
|
|
33
|
+
plot_configuration:
|
|
34
|
+
- type: density_vs_altitude
|
|
35
|
+
title: 'Atmospheric density profile'
|
|
36
|
+
xtitle: 'Height [km]'
|
|
37
|
+
ytitle: 'Density [g/cm^3]'
|
|
38
|
+
yscale: 'log'
|
|
39
|
+
no_markers: true
|
|
40
|
+
tables:
|
|
41
|
+
- parameter: atmospheric_profile
|
|
42
|
+
column_x: 'altitude'
|
|
43
|
+
column_y: 'density'
|
|
44
|
+
- type: refractive_index_vs_altitude
|
|
45
|
+
title: 'Atmospheric refractive index profile'
|
|
46
|
+
xtitle: 'Height [km]'
|
|
47
|
+
ytitle: 'refractive index (n-1)'
|
|
48
|
+
yscale: 'log'
|
|
49
|
+
no_markers: true
|
|
50
|
+
tables:
|
|
51
|
+
- parameter: atmospheric_profile
|
|
52
|
+
column_x: 'altitude'
|
|
53
|
+
column_y: 'refractive_index'
|
|
54
|
+
- type: pressure_vs_altitude
|
|
55
|
+
title: 'Atmospheric pressure profile'
|
|
56
|
+
xtitle: 'Height [km]'
|
|
57
|
+
ytitle: 'Pressure [mbar]'
|
|
58
|
+
yscale: 'log'
|
|
59
|
+
no_markers: true
|
|
60
|
+
tables:
|
|
61
|
+
- parameter: atmospheric_profile
|
|
62
|
+
column_x: 'altitude'
|
|
63
|
+
column_y: 'pressure'
|
|
64
|
+
- type: thickness_vs_altitude
|
|
65
|
+
title: 'Atmospheric thickness profile'
|
|
66
|
+
xtitle: 'Height [km]'
|
|
67
|
+
ytitle: 'Thickness [g/cm^2]'
|
|
68
|
+
yscale: 'log'
|
|
69
|
+
no_markers: true
|
|
70
|
+
tables:
|
|
71
|
+
- parameter: atmospheric_profile
|
|
72
|
+
column_x: 'altitude'
|
|
73
|
+
column_y: 'thickness'
|
|
@@ -33,3 +33,46 @@ source:
|
|
|
33
33
|
simulation_software:
|
|
34
34
|
- name: corsika
|
|
35
35
|
- name: sim_telarray
|
|
36
|
+
plot_configuration:
|
|
37
|
+
- type: atmospheric_transmission
|
|
38
|
+
title: 'Atmospheric transmission profile'
|
|
39
|
+
xtitle: 'Wavelength [nm]'
|
|
40
|
+
ytitle: 'Extinction'
|
|
41
|
+
yscale: 'log'
|
|
42
|
+
no_markers: true
|
|
43
|
+
tables:
|
|
44
|
+
- parameter: atmospheric_transmission
|
|
45
|
+
label: '30 km'
|
|
46
|
+
column_x: 'wavelength'
|
|
47
|
+
column_y: 'extinction'
|
|
48
|
+
select_values:
|
|
49
|
+
column_name: 'altitude'
|
|
50
|
+
value: 30.0
|
|
51
|
+
- parameter: atmospheric_transmission
|
|
52
|
+
label: '15 km'
|
|
53
|
+
column_x: 'wavelength'
|
|
54
|
+
column_y: 'extinction'
|
|
55
|
+
select_values:
|
|
56
|
+
column_name: 'altitude'
|
|
57
|
+
value: 15.0
|
|
58
|
+
- parameter: atmospheric_transmission
|
|
59
|
+
label: '10 km'
|
|
60
|
+
column_x: 'wavelength'
|
|
61
|
+
column_y: 'extinction'
|
|
62
|
+
select_values:
|
|
63
|
+
column_name: 'altitude'
|
|
64
|
+
value: 10.0
|
|
65
|
+
- parameter: atmospheric_transmission
|
|
66
|
+
label: '5 km'
|
|
67
|
+
column_x: 'wavelength'
|
|
68
|
+
column_y: 'extinction'
|
|
69
|
+
select_values:
|
|
70
|
+
column_name: 'altitude'
|
|
71
|
+
value: 5.0
|
|
72
|
+
- parameter: atmospheric_transmission
|
|
73
|
+
label: '2.4 km'
|
|
74
|
+
column_x: 'wavelength'
|
|
75
|
+
column_y: 'extinction'
|
|
76
|
+
select_values:
|
|
77
|
+
column_name: 'altitude'
|
|
78
|
+
value: 2.358
|
|
@@ -43,3 +43,13 @@ source:
|
|
|
43
43
|
- Calibration
|
|
44
44
|
simulation_software:
|
|
45
45
|
- name: sim_telarray
|
|
46
|
+
plot_configuration:
|
|
47
|
+
- type: camera_filter
|
|
48
|
+
title: 'Camera filter'
|
|
49
|
+
xtitle: 'Wavelength (nm)'
|
|
50
|
+
ytitle: 'Transmission'
|
|
51
|
+
no_markers: true
|
|
52
|
+
tables:
|
|
53
|
+
- parameter: camera_filter
|
|
54
|
+
column_x: 'wavelength'
|
|
55
|
+
column_y: 'transmission'
|
|
@@ -27,3 +27,13 @@ source:
|
|
|
27
27
|
- SimPipe Derived
|
|
28
28
|
simulation_software:
|
|
29
29
|
- name: simtools
|
|
30
|
+
plot_configuration:
|
|
31
|
+
- type: camera_filter_incidence_angle
|
|
32
|
+
title: 'Photon incident angles'
|
|
33
|
+
xtitle: 'Photon incident angle [deg]'
|
|
34
|
+
ytitle: 'Fraction'
|
|
35
|
+
no_markers: true
|
|
36
|
+
tables:
|
|
37
|
+
- parameter: camera_filter_incidence_angle
|
|
38
|
+
column_x: 'Incidence angle'
|
|
39
|
+
column_y: 'Fraction'
|