gammasimtools 0.10.0__py3-none-any.whl → 0.12.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.10.0.dist-info → gammasimtools-0.12.0.dist-info}/METADATA +3 -1
- {gammasimtools-0.10.0.dist-info → gammasimtools-0.12.0.dist-info}/RECORD +84 -77
- {gammasimtools-0.10.0.dist-info → gammasimtools-0.12.0.dist-info}/WHEEL +1 -1
- {gammasimtools-0.10.0.dist-info → gammasimtools-0.12.0.dist-info}/entry_points.txt +4 -0
- simtools/_version.py +9 -4
- simtools/applications/convert_all_model_parameters_from_simtel.py +0 -1
- simtools/applications/convert_model_parameter_from_simtel.py +0 -1
- simtools/applications/db_add_file_to_db.py +0 -1
- simtools/applications/db_get_parameter_from_db.py +7 -28
- simtools/applications/derive_mirror_rnda.py +1 -2
- simtools/applications/derive_psf_parameters.py +1 -0
- simtools/applications/docs_produce_array_element_report.py +71 -0
- simtools/applications/docs_produce_model_parameter_reports.py +63 -0
- simtools/applications/generate_corsika_histograms.py +2 -2
- simtools/applications/generate_regular_arrays.py +4 -2
- simtools/applications/production_derive_limits.py +95 -0
- simtools/applications/production_generate_simulation_config.py +15 -29
- simtools/applications/production_scale_events.py +2 -7
- simtools/applications/run_application.py +165 -0
- simtools/applications/simulate_light_emission.py +0 -4
- simtools/applications/submit_model_parameter_from_external.py +11 -6
- simtools/applications/validate_file_using_schema.py +3 -3
- simtools/configuration/commandline_parser.py +30 -1
- simtools/configuration/configurator.py +8 -10
- simtools/corsika/corsika_config.py +11 -10
- simtools/corsika/corsika_histograms.py +4 -6
- simtools/corsika/corsika_histograms_visualize.py +2 -4
- simtools/data_model/metadata_collector.py +18 -9
- simtools/data_model/model_data_writer.py +67 -15
- simtools/data_model/schema.py +10 -3
- simtools/data_model/validate_data.py +70 -24
- simtools/db/db_handler.py +46 -14
- simtools/dependencies.py +112 -0
- simtools/layout/array_layout.py +5 -4
- simtools/model/model_parameter.py +35 -2
- simtools/production_configuration/calculate_statistical_errors_grid_point.py +5 -6
- simtools/production_configuration/event_scaler.py +3 -19
- simtools/production_configuration/generate_simulation_config.py +4 -12
- simtools/production_configuration/interpolation_handler.py +2 -5
- simtools/production_configuration/limits_calculation.py +202 -0
- simtools/reporting/docs_read_parameters.py +310 -0
- simtools/runners/corsika_simtel_runner.py +1 -3
- simtools/schemas/{integration_tests_config.metaschema.yml → application_workflow.metaschema.yml} +51 -27
- simtools/schemas/array_elements.yml +8 -0
- simtools/schemas/model_parameter.metaschema.yml +96 -0
- simtools/schemas/model_parameter_and_data_schema.metaschema.yml +2 -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 +2 -0
- simtools/schemas/model_parameters/corsika_cherenkov_photon_wavelength_range.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_first_interaction_height.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_iact_io_buffer.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_iact_max_bunches.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_iact_split_auto.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_longitudinal_shower_development.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_particle_kinetic_energy_cutoff.schema.yml +2 -0
- simtools/schemas/model_parameters/corsika_starting_grammage.schema.yml +2 -0
- 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/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/random_generator.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/store_photoelectrons.schema.yml +1 -1
- simtools/schemas/model_parameters/tailcut_scale.schema.yml +1 -1
- simtools/schemas/production_tables.schema.yml +1 -1
- simtools/simtel/simtel_config_reader.py +1 -2
- simtools/simtel/simtel_config_writer.py +1 -2
- simtools/simtel/simtel_io_histogram.py +0 -1
- simtools/simtel/simtel_io_histograms.py +2 -4
- simtools/simtel/simulator_camera_efficiency.py +1 -3
- simtools/simtel/simulator_light_emission.py +2 -5
- simtools/simtel/simulator_ray_tracing.py +1 -3
- simtools/testing/configuration.py +2 -1
- simtools/testing/validate_output.py +23 -13
- simtools/utils/general.py +12 -2
- simtools/utils/names.py +290 -152
- simtools/utils/value_conversion.py +20 -14
- simtools/version.py +2 -2
- simtools/visualization/legend_handlers.py +2 -0
- {gammasimtools-0.10.0.dist-info → gammasimtools-0.12.0.dist-info}/LICENSE +0 -0
- {gammasimtools-0.10.0.dist-info → gammasimtools-0.12.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
#!/usr/bin/python3
|
|
2
|
+
|
|
3
|
+
r"""Class to read and manage relevant model parameters for a given telescope model."""
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
import textwrap
|
|
7
|
+
from itertools import groupby
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
from simtools.io_operations import io_handler
|
|
11
|
+
from simtools.model.telescope_model import TelescopeModel
|
|
12
|
+
from simtools.utils import names
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ReadParameters:
|
|
18
|
+
"""Read and manage model parameter data."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, db_config, telescope_model, output_path):
|
|
21
|
+
"""Initialise class with a telescope model."""
|
|
22
|
+
self._logger = logging.getLogger(__name__)
|
|
23
|
+
self.db_config = db_config
|
|
24
|
+
self.telescope_model = telescope_model
|
|
25
|
+
self.output_path = output_path
|
|
26
|
+
|
|
27
|
+
def _convert_to_md(self, input_file):
|
|
28
|
+
"""
|
|
29
|
+
Convert a '.dat' or '.ecsv' file to a Markdown file, preserving formatting.
|
|
30
|
+
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
input_file: Path, str
|
|
34
|
+
Simulation data file (in '.dat' or '.ecsv' format).
|
|
35
|
+
|
|
36
|
+
Returns
|
|
37
|
+
-------
|
|
38
|
+
- Path to the created Markdown file.
|
|
39
|
+
"""
|
|
40
|
+
input_file = Path(input_file)
|
|
41
|
+
output_data_path = Path(self.output_path / "_data_files")
|
|
42
|
+
output_data_path.mkdir(parents=True, exist_ok=True)
|
|
43
|
+
output_file_name = Path(input_file.stem + ".md")
|
|
44
|
+
output_file = output_data_path / output_file_name
|
|
45
|
+
|
|
46
|
+
try:
|
|
47
|
+
with (
|
|
48
|
+
input_file.open("r", encoding="utf-8") as infile,
|
|
49
|
+
output_file.open("w", encoding="utf-8") as outfile,
|
|
50
|
+
):
|
|
51
|
+
outfile.write(f"# {input_file.stem}")
|
|
52
|
+
outfile.write("\n")
|
|
53
|
+
outfile.write("```")
|
|
54
|
+
outfile.write("\n")
|
|
55
|
+
file_contents = infile.read()
|
|
56
|
+
outfile.write(file_contents)
|
|
57
|
+
outfile.write("\n")
|
|
58
|
+
outfile.write("```")
|
|
59
|
+
|
|
60
|
+
except FileNotFoundError as exc:
|
|
61
|
+
logger.exception(f"Data file not found: {input_file}.")
|
|
62
|
+
raise FileNotFoundError(f"Data file not found: {input_file}.") from exc
|
|
63
|
+
|
|
64
|
+
return f"_data_files/{output_file_name}"
|
|
65
|
+
|
|
66
|
+
def get_all_parameter_descriptions(self):
|
|
67
|
+
"""
|
|
68
|
+
Get descriptions for all model parameters.
|
|
69
|
+
|
|
70
|
+
Returns
|
|
71
|
+
-------
|
|
72
|
+
tuple: A tuple containing two dictionaries:
|
|
73
|
+
- parameter_description: Maps parameter names to their descriptions.
|
|
74
|
+
- short_description: Maps parameter names to their short descriptions.
|
|
75
|
+
- inst_class: Maps parameter names to their respective class.
|
|
76
|
+
"""
|
|
77
|
+
parameter_description, short_description, inst_class = {}, {}, {}
|
|
78
|
+
|
|
79
|
+
for instrument_class in names.db_collection_to_instrument_class_key("telescopes"):
|
|
80
|
+
for parameter, details in names.model_parameters(instrument_class).items():
|
|
81
|
+
parameter_description[parameter] = details.get("description")
|
|
82
|
+
short_description[parameter] = details.get("short_description")
|
|
83
|
+
inst_class[parameter] = instrument_class
|
|
84
|
+
|
|
85
|
+
return parameter_description, short_description, inst_class
|
|
86
|
+
|
|
87
|
+
def get_array_element_parameter_data(self, telescope_model, collection="telescopes"):
|
|
88
|
+
"""
|
|
89
|
+
Get model parameter data for a given array element.
|
|
90
|
+
|
|
91
|
+
Currently only configures for telescope.
|
|
92
|
+
|
|
93
|
+
Parameters
|
|
94
|
+
----------
|
|
95
|
+
telescope_model : TelescopeModel
|
|
96
|
+
The telescope model instance.
|
|
97
|
+
|
|
98
|
+
Returns
|
|
99
|
+
-------
|
|
100
|
+
list: A list of lists containing parameter names, values with units,
|
|
101
|
+
descriptions, and short descriptions.
|
|
102
|
+
"""
|
|
103
|
+
all_params = telescope_model.db.get_model_parameters(
|
|
104
|
+
site=telescope_model.site,
|
|
105
|
+
array_element_name=telescope_model.name,
|
|
106
|
+
collection=collection,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
telescope_model.export_model_files()
|
|
110
|
+
parameter_descriptions = self.get_all_parameter_descriptions()
|
|
111
|
+
data = []
|
|
112
|
+
|
|
113
|
+
for parameter in all_params:
|
|
114
|
+
if all_params[parameter]["instrument"] != telescope_model.name:
|
|
115
|
+
continue
|
|
116
|
+
parameter_version = telescope_model.get_parameter_version(parameter)
|
|
117
|
+
value = telescope_model.get_parameter_value_with_unit(parameter)
|
|
118
|
+
if telescope_model.get_parameter_file_flag(parameter) and value:
|
|
119
|
+
input_file_name = telescope_model.config_file_directory / Path(value)
|
|
120
|
+
output_file_name = self._convert_to_md(input_file_name)
|
|
121
|
+
value = f"[{Path(value).name}]({output_file_name})"
|
|
122
|
+
elif isinstance(value, list):
|
|
123
|
+
value = ", ".join(str(q) for q in value)
|
|
124
|
+
else:
|
|
125
|
+
value = str(value)
|
|
126
|
+
|
|
127
|
+
description = parameter_descriptions[0].get(parameter)
|
|
128
|
+
short_description = parameter_descriptions[1].get(parameter, description)
|
|
129
|
+
inst_class = parameter_descriptions[2].get(parameter)
|
|
130
|
+
data.append(
|
|
131
|
+
[
|
|
132
|
+
inst_class,
|
|
133
|
+
parameter,
|
|
134
|
+
parameter_version,
|
|
135
|
+
value,
|
|
136
|
+
description,
|
|
137
|
+
short_description,
|
|
138
|
+
]
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
return data
|
|
142
|
+
|
|
143
|
+
def _compare_parameter_across_versions(self, parameter_name):
|
|
144
|
+
"""
|
|
145
|
+
Compare a parameter's value across different model versions.
|
|
146
|
+
|
|
147
|
+
Parameters
|
|
148
|
+
----------
|
|
149
|
+
parameter_name : str
|
|
150
|
+
The name of the parameter to compare.
|
|
151
|
+
|
|
152
|
+
Returns
|
|
153
|
+
-------
|
|
154
|
+
list
|
|
155
|
+
A list of dictionaries containing model version, parameter value, and description.
|
|
156
|
+
"""
|
|
157
|
+
all_versions = self.telescope_model.db.get_model_versions()
|
|
158
|
+
all_versions.reverse()
|
|
159
|
+
comparison_data = []
|
|
160
|
+
|
|
161
|
+
for model_version in all_versions:
|
|
162
|
+
telescope_model = TelescopeModel(
|
|
163
|
+
site=self.telescope_model.site,
|
|
164
|
+
telescope_name=self.telescope_model.name,
|
|
165
|
+
model_version=model_version,
|
|
166
|
+
label="reports",
|
|
167
|
+
mongo_db_config=self.db_config,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
if not telescope_model.has_parameter(parameter_name):
|
|
171
|
+
return comparison_data
|
|
172
|
+
|
|
173
|
+
parameter_data = self.get_array_element_parameter_data(telescope_model)
|
|
174
|
+
for param in parameter_data:
|
|
175
|
+
if param[1] == parameter_name:
|
|
176
|
+
comparison_data.append(
|
|
177
|
+
{
|
|
178
|
+
"model_version": model_version,
|
|
179
|
+
"parameter_version": param[2],
|
|
180
|
+
"value": param[3],
|
|
181
|
+
"description": param[4],
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
break
|
|
185
|
+
return comparison_data
|
|
186
|
+
|
|
187
|
+
def produce_array_element_report(self):
|
|
188
|
+
"""
|
|
189
|
+
Produce a markdown report of all model parameters per array element.
|
|
190
|
+
|
|
191
|
+
Output
|
|
192
|
+
----------
|
|
193
|
+
One markdown report of a given array element listing parameter values,
|
|
194
|
+
versions, and descriptions.
|
|
195
|
+
"""
|
|
196
|
+
output_filename = Path(self.output_path / (self.telescope_model.name + ".md"))
|
|
197
|
+
output_filename.parent.mkdir(parents=True, exist_ok=True)
|
|
198
|
+
data = self.get_array_element_parameter_data(self.telescope_model)
|
|
199
|
+
# Sort data by class to prepare for grouping
|
|
200
|
+
if not isinstance(data, str):
|
|
201
|
+
data.sort(key=lambda x: (x[0], x[1]), reverse=True)
|
|
202
|
+
|
|
203
|
+
with output_filename.open("w", encoding="utf-8") as file:
|
|
204
|
+
# Group by class and write sections
|
|
205
|
+
file.write(f"# {self.telescope_model.name}\n")
|
|
206
|
+
|
|
207
|
+
if self.telescope_model.name != self.telescope_model.design_model:
|
|
208
|
+
file.write(
|
|
209
|
+
"The design model can be found here: "
|
|
210
|
+
f"[{self.telescope_model.design_model}]"
|
|
211
|
+
f"({self.telescope_model.design_model}.md).\n"
|
|
212
|
+
)
|
|
213
|
+
file.write("\n\n")
|
|
214
|
+
|
|
215
|
+
for class_name, group in groupby(data, key=lambda x: x[0]):
|
|
216
|
+
group = sorted(group, key=lambda x: x[1])
|
|
217
|
+
file.write(f"## {class_name}\n\n")
|
|
218
|
+
|
|
219
|
+
# Write table header and separator row
|
|
220
|
+
file.write(
|
|
221
|
+
"| Parameter Name | Parameter Version "
|
|
222
|
+
"| Values | Short Description |\n"
|
|
223
|
+
"|---------------------|------------------------"
|
|
224
|
+
"|-------------|-----------------------------|\n"
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
# Write table rows
|
|
228
|
+
column_widths = [20, 20, 20, 70]
|
|
229
|
+
for (
|
|
230
|
+
_,
|
|
231
|
+
parameter_name,
|
|
232
|
+
parameter_version,
|
|
233
|
+
value,
|
|
234
|
+
description,
|
|
235
|
+
short_description,
|
|
236
|
+
) in group:
|
|
237
|
+
text = short_description if short_description else description
|
|
238
|
+
wrapped_text = textwrap.fill(str(text), column_widths[3]).split("\n")
|
|
239
|
+
wrapped_text = " ".join(wrapped_text)
|
|
240
|
+
file.write(
|
|
241
|
+
f"| {parameter_name:{column_widths[0]}} |"
|
|
242
|
+
f" {parameter_version:{column_widths[1]}} |"
|
|
243
|
+
f" {value:{column_widths[2]}} |"
|
|
244
|
+
f" {wrapped_text} |\n"
|
|
245
|
+
)
|
|
246
|
+
file.write("\n\n")
|
|
247
|
+
|
|
248
|
+
def produce_model_parameter_reports(self):
|
|
249
|
+
"""
|
|
250
|
+
Produce a markdown report per parameter for a given array element.
|
|
251
|
+
|
|
252
|
+
Output
|
|
253
|
+
----------
|
|
254
|
+
One markdown report per model parameter of a given array element comparing
|
|
255
|
+
values across model versions.
|
|
256
|
+
"""
|
|
257
|
+
logger.info(
|
|
258
|
+
f"Comparing parameters across model versions for Telescope: {self.telescope_model.name}"
|
|
259
|
+
f" and Site: {self.telescope_model.site}."
|
|
260
|
+
)
|
|
261
|
+
io_handler_instance = io_handler.IOHandler()
|
|
262
|
+
output_path = io_handler_instance.get_output_directory(
|
|
263
|
+
label="reports", sub_dir=f"parameters/{self.telescope_model.name}"
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
all_params = self.telescope_model.db.get_model_parameters(
|
|
267
|
+
site=self.telescope_model.site,
|
|
268
|
+
array_element_name=self.telescope_model.name,
|
|
269
|
+
collection="telescopes",
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
for parameter in all_params:
|
|
273
|
+
comparison_data = []
|
|
274
|
+
if all_params[parameter]["instrument"] == self.telescope_model.name:
|
|
275
|
+
comparison_data = self._compare_parameter_across_versions(parameter)
|
|
276
|
+
if comparison_data:
|
|
277
|
+
output_filename = output_path / f"{parameter}.md"
|
|
278
|
+
with output_filename.open("w", encoding="utf-8") as file:
|
|
279
|
+
# Write header
|
|
280
|
+
file.write(
|
|
281
|
+
f"# {parameter}\n\n"
|
|
282
|
+
f"**Telescope**: {self.telescope_model.name}\n\n"
|
|
283
|
+
f"**Description**: {comparison_data[0]['description']}\n\n"
|
|
284
|
+
"\n"
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# Write table header
|
|
288
|
+
file.write(
|
|
289
|
+
"| Model Version | Parameter Version "
|
|
290
|
+
"| Value |\n"
|
|
291
|
+
"|--------------------|------------------------"
|
|
292
|
+
"|----------------------|\n"
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# Write table rows
|
|
296
|
+
for item in comparison_data:
|
|
297
|
+
file.write(
|
|
298
|
+
f"| {item['model_version']} |"
|
|
299
|
+
f" {item['parameter_version']} |"
|
|
300
|
+
f"{item['value'].replace('](', '](../')} |\n"
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
file.write("\n")
|
|
304
|
+
if isinstance(comparison_data[0]["value"], str) and comparison_data[0][
|
|
305
|
+
"value"
|
|
306
|
+
].endswith(".md)"):
|
|
307
|
+
file.write(
|
|
308
|
+
f""
|
|
310
|
+
)
|
|
@@ -129,9 +129,7 @@ class CorsikaSimtelRunner:
|
|
|
129
129
|
)
|
|
130
130
|
with open(multipipe_script, "w", encoding="utf-8") as file:
|
|
131
131
|
multipipe_command = Path(self._simtel_path).joinpath(
|
|
132
|
-
"sim_telarray/bin/multipipe_corsika "
|
|
133
|
-
f"-c {multipipe_file}"
|
|
134
|
-
" || echo 'Fan-out failed'"
|
|
132
|
+
f"sim_telarray/bin/multipipe_corsika -c {multipipe_file} || echo 'Fan-out failed'"
|
|
135
133
|
)
|
|
136
134
|
file.write(f"{multipipe_command}")
|
|
137
135
|
|
simtools/schemas/{integration_tests_config.metaschema.yml → application_workflow.metaschema.yml}
RENAMED
|
@@ -1,50 +1,74 @@
|
|
|
1
1
|
---
|
|
2
2
|
$schema: http://json-schema.org/draft-06/schema#
|
|
3
|
-
$ref: '#/definitions/
|
|
4
|
-
title: SimPipe
|
|
5
|
-
description: YAML representation of
|
|
6
|
-
version: 0.
|
|
7
|
-
name:
|
|
3
|
+
$ref: '#/definitions/SimtoolsApplicationWorkflowConfiguration'
|
|
4
|
+
title: SimPipe application workflow configuration metaschema
|
|
5
|
+
description: YAML representation of application workflow configuration metaschema
|
|
6
|
+
version: 0.3.0
|
|
7
|
+
name: application_workflow.metaschema
|
|
8
8
|
type: object
|
|
9
9
|
additionalProperties: false
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
definitions:
|
|
13
|
-
|
|
12
|
+
SimtoolsApplicationWorkflowConfiguration:
|
|
14
13
|
type: object
|
|
15
14
|
additionalProperties: false
|
|
16
15
|
properties:
|
|
17
16
|
CTA_SIMPIPE:
|
|
18
17
|
"$ref": "#/definitions/CTASIMPIPE"
|
|
18
|
+
SCHEMA_VERSION:
|
|
19
|
+
type: string
|
|
20
|
+
description: "Version of the schema."
|
|
21
|
+
SCHEMA_URL:
|
|
22
|
+
type: string
|
|
23
|
+
format: uri
|
|
24
|
+
description: "URL of the schema."
|
|
25
|
+
SCHEMA_NAME:
|
|
26
|
+
type: string
|
|
27
|
+
description: "Name of the schema."
|
|
19
28
|
required:
|
|
20
29
|
- CTA_SIMPIPE
|
|
30
|
+
- SCHEMA_VERSION
|
|
31
|
+
- SCHEMA_NAME
|
|
21
32
|
title: ""
|
|
22
33
|
CTASIMPIPE:
|
|
23
34
|
type: object
|
|
24
35
|
additionalProperties: false
|
|
25
36
|
properties:
|
|
26
|
-
|
|
37
|
+
LOG_PATH:
|
|
27
38
|
type: string
|
|
28
|
-
description: "
|
|
29
|
-
|
|
30
|
-
type: string
|
|
31
|
-
description: "Test name. Should be unique for this application."
|
|
32
|
-
MODEL_VERSION_USE_CURRENT:
|
|
33
|
-
type: boolean
|
|
34
|
-
description: |
|
|
35
|
-
"Skip test if model version is changed via command line.
|
|
36
|
-
Important e.g., for cases where DB model is incomplete for some
|
|
37
|
-
model versions."
|
|
38
|
-
CONFIGURATION:
|
|
39
|
-
"$ref": "#/definitions/Configuration"
|
|
40
|
-
INTEGRATION_TESTS:
|
|
39
|
+
description: "Path to the log file."
|
|
40
|
+
APPLICATIONS:
|
|
41
41
|
type: array
|
|
42
42
|
items:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
type: object
|
|
44
|
+
properties:
|
|
45
|
+
APPLICATION:
|
|
46
|
+
type: string
|
|
47
|
+
description: "Name of simtools application"
|
|
48
|
+
TEST_NAME:
|
|
49
|
+
type: string
|
|
50
|
+
description: "Test name. Should be unique for this application."
|
|
51
|
+
MODEL_VERSION_USE_CURRENT:
|
|
52
|
+
type: boolean
|
|
53
|
+
description: |
|
|
54
|
+
"Skip test if model version is changed via command line.
|
|
55
|
+
Important e.g., for cases where DB model is incomplete for some
|
|
56
|
+
model versions."
|
|
57
|
+
CONFIGURATION:
|
|
58
|
+
"$ref": "#/definitions/Configuration"
|
|
59
|
+
INTEGRATION_TESTS:
|
|
60
|
+
type: array
|
|
61
|
+
items:
|
|
62
|
+
"$ref": "#/definitions/IntegrationTest"
|
|
63
|
+
TEST_REQUIREMENT:
|
|
64
|
+
type: string
|
|
65
|
+
description: "Requirement ID of the test."
|
|
66
|
+
TEST_USE_CASE:
|
|
67
|
+
type: string
|
|
68
|
+
description: "Use case ID of the test."
|
|
69
|
+
required:
|
|
70
|
+
- APPLICATION
|
|
71
|
+
- CONFIGURATION
|
|
48
72
|
title: CTASimpipe
|
|
49
73
|
Configuration:
|
|
50
74
|
description: "Command line configuration of simtools application."
|
|
@@ -110,4 +134,4 @@ definitions:
|
|
|
110
134
|
CUT_CONDITION:
|
|
111
135
|
description: "Condition to apply to the cut column."
|
|
112
136
|
type: string
|
|
113
|
-
title:
|
|
137
|
+
title: ApplicationWorkflow
|
|
@@ -15,6 +15,7 @@ data:
|
|
|
15
15
|
collection: "telescopes"
|
|
16
16
|
observatory: "CTAO"
|
|
17
17
|
site: "North"
|
|
18
|
+
design_types: ["FlashCam", "NectarCam", "test"]
|
|
18
19
|
LSTS:
|
|
19
20
|
collection: "telescopes"
|
|
20
21
|
observatory: "CTAO"
|
|
@@ -23,6 +24,7 @@ data:
|
|
|
23
24
|
collection: "telescopes"
|
|
24
25
|
observatory: "CTAO"
|
|
25
26
|
site: "South"
|
|
27
|
+
design_types: ["FlashCam", "NectarCam", "test"]
|
|
26
28
|
SSTS:
|
|
27
29
|
collection: "telescopes"
|
|
28
30
|
observatory: "CTAO"
|
|
@@ -33,6 +35,12 @@ data:
|
|
|
33
35
|
observatory: "CTAO"
|
|
34
36
|
site: "South"
|
|
35
37
|
description: "Mid-sized Schwarzschild-Couder telescope"
|
|
38
|
+
MSTx:
|
|
39
|
+
collection: "telescopes"
|
|
40
|
+
observatory: "CTAO"
|
|
41
|
+
site: ["North", "South"]
|
|
42
|
+
design_types: ["FlashCam", "NectarCam", "test"]
|
|
43
|
+
description: "Mid-sized telescope"
|
|
36
44
|
ILLN:
|
|
37
45
|
collection: "calibration_devices"
|
|
38
46
|
observatory: "CTAO"
|
|
@@ -2,6 +2,102 @@
|
|
|
2
2
|
$schema: http://json-schema.org/draft-06/schema#
|
|
3
3
|
$ref: '#/definitions/SimtoolsModelParameters'
|
|
4
4
|
title: SimPipe DB Model Parameter Metaschema
|
|
5
|
+
description: |
|
|
6
|
+
YAML representation of db model parameter metaschema
|
|
7
|
+
(based on simulation model DB).
|
|
8
|
+
version: 0.3.0
|
|
9
|
+
name: modelparameter.metaschema
|
|
10
|
+
type: object
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
|
|
13
|
+
definitions:
|
|
14
|
+
SimtoolsModelParameters:
|
|
15
|
+
description: ""
|
|
16
|
+
type: object
|
|
17
|
+
properties:
|
|
18
|
+
_id:
|
|
19
|
+
type: string
|
|
20
|
+
description: "DB unique identifier."
|
|
21
|
+
entry_date:
|
|
22
|
+
type: string
|
|
23
|
+
description: "Value entry date."
|
|
24
|
+
file:
|
|
25
|
+
type: boolean
|
|
26
|
+
description: "This parameter is a file."
|
|
27
|
+
instrument:
|
|
28
|
+
type:
|
|
29
|
+
- string
|
|
30
|
+
- "null"
|
|
31
|
+
description: "Associated instrument."
|
|
32
|
+
site:
|
|
33
|
+
anyOf:
|
|
34
|
+
- type: string
|
|
35
|
+
enum:
|
|
36
|
+
- North
|
|
37
|
+
- South
|
|
38
|
+
- type: "null"
|
|
39
|
+
- type: array
|
|
40
|
+
items:
|
|
41
|
+
type: string
|
|
42
|
+
enum:
|
|
43
|
+
- North
|
|
44
|
+
- South
|
|
45
|
+
description: "Associated CTAO site."
|
|
46
|
+
type:
|
|
47
|
+
type: string
|
|
48
|
+
description: "Data type"
|
|
49
|
+
enum:
|
|
50
|
+
- boolean
|
|
51
|
+
- dict
|
|
52
|
+
- double
|
|
53
|
+
- file
|
|
54
|
+
- float64
|
|
55
|
+
- int
|
|
56
|
+
- int64
|
|
57
|
+
- string
|
|
58
|
+
- uint
|
|
59
|
+
- uint32
|
|
60
|
+
- uint64
|
|
61
|
+
unit:
|
|
62
|
+
anyOf:
|
|
63
|
+
- type: string
|
|
64
|
+
- type: "null"
|
|
65
|
+
description: "Unit of the parameter."
|
|
66
|
+
value:
|
|
67
|
+
anyOf:
|
|
68
|
+
- type: boolean
|
|
69
|
+
- type: number
|
|
70
|
+
- type: string
|
|
71
|
+
- type: "null"
|
|
72
|
+
- type: array
|
|
73
|
+
description: "Value of the parameter."
|
|
74
|
+
parameter_version:
|
|
75
|
+
anyOf:
|
|
76
|
+
- type: string
|
|
77
|
+
description: "Parameter version."
|
|
78
|
+
schema_version:
|
|
79
|
+
anyOf:
|
|
80
|
+
- type: string
|
|
81
|
+
description: "Metaschema version."
|
|
82
|
+
unique_id:
|
|
83
|
+
anyOf:
|
|
84
|
+
- type: string
|
|
85
|
+
- type: "null"
|
|
86
|
+
description: "Unique ID of parameter definition."
|
|
87
|
+
required:
|
|
88
|
+
- file
|
|
89
|
+
- instrument
|
|
90
|
+
- parameter_version
|
|
91
|
+
- schema_version
|
|
92
|
+
- site
|
|
93
|
+
- type
|
|
94
|
+
- unit
|
|
95
|
+
- value
|
|
96
|
+
...
|
|
97
|
+
---
|
|
98
|
+
$schema: http://json-schema.org/draft-06/schema#
|
|
99
|
+
$ref: '#/definitions/SimtoolsModelParameters'
|
|
100
|
+
title: SimPipe DB Model Parameter Metaschema
|
|
5
101
|
description: |
|
|
6
102
|
YAML representation of db model parameter metaschema
|
|
7
103
|
(based on simulation model DB).
|
|
@@ -247,6 +247,8 @@ definitions:
|
|
|
247
247
|
- Site
|
|
248
248
|
- Structure
|
|
249
249
|
- Telescope
|
|
250
|
+
- configuration_sim_telarray
|
|
251
|
+
- configuration_corsika
|
|
250
252
|
type:
|
|
251
253
|
type: array
|
|
252
254
|
items:
|
|
@@ -261,7 +263,6 @@ definitions:
|
|
|
261
263
|
- South
|
|
262
264
|
required:
|
|
263
265
|
- class
|
|
264
|
-
- type
|
|
265
266
|
title: Instrument
|
|
266
267
|
InstrumentTypeElement:
|
|
267
268
|
type: string
|
|
@@ -10,6 +10,8 @@ description: |-
|
|
|
10
10
|
Starting altitude of primary particles in altitude above observation level.
|
|
11
11
|
This parameter should be set to values other than '0.' for specialized studies
|
|
12
12
|
only. See CORSIKA manual for details.
|
|
13
|
+
instrument:
|
|
14
|
+
class: configuration_corsika
|
|
13
15
|
data:
|
|
14
16
|
- type: float64
|
|
15
17
|
unit: cm
|
|
@@ -12,6 +12,8 @@ description: |-
|
|
|
12
12
|
Maximum number of bunches that can be kept per telescope, including in temporary files.
|
|
13
13
|
Telescopes for which this limit is exceeded will have the number of bunches reduced in
|
|
14
14
|
increasing powers of two (by discarding every second bunch and adding its bunch size to the bunch kept).
|
|
15
|
+
instrument:
|
|
16
|
+
class: configuration_corsika
|
|
15
17
|
data:
|
|
16
18
|
- type: int
|
|
17
19
|
unit: dimensionless
|
|
@@ -13,6 +13,8 @@ description: |-
|
|
|
13
13
|
If the full data block for the entire array would exceed the given number of bunches,
|
|
14
14
|
it gets split up into separate blocks per individual telescope, in order to avoid
|
|
15
15
|
exceeding the hard I/O buffer size limit.
|
|
16
|
+
instrument:
|
|
17
|
+
class: configuration_corsika
|
|
16
18
|
data:
|
|
17
19
|
- type: int
|
|
18
20
|
unit: dimensionless
|
|
@@ -9,6 +9,8 @@ name: corsika_longitudinal_shower_development
|
|
|
9
9
|
description: |-
|
|
10
10
|
Step size for recording of longitudinal shower development.
|
|
11
11
|
Any value >=1. for the step size enables the recording of the shower development.
|
|
12
|
+
instrument:
|
|
13
|
+
class: configuration_corsika
|
|
12
14
|
data:
|
|
13
15
|
- type: float64
|
|
14
16
|
unit: g/cm2
|
|
@@ -10,6 +10,8 @@ description: |-
|
|
|
10
10
|
Starting altitude of the primary particle in mass overburden for all showers.
|
|
11
11
|
This parameter should be set to values other than '0.' for specialized studies
|
|
12
12
|
only. See CORSIKA manual for details.
|
|
13
|
+
instrument:
|
|
14
|
+
class: configuration_corsika
|
|
13
15
|
data:
|
|
14
16
|
- type: float64
|
|
15
17
|
unit: g/cm2
|