gammasimtools 0.17.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.
Files changed (44) hide show
  1. {gammasimtools-0.17.0.dist-info → gammasimtools-0.18.0.dist-info}/METADATA +2 -1
  2. {gammasimtools-0.17.0.dist-info → gammasimtools-0.18.0.dist-info}/RECORD +44 -42
  3. {gammasimtools-0.17.0.dist-info → gammasimtools-0.18.0.dist-info}/entry_points.txt +1 -0
  4. simtools/_version.py +2 -2
  5. simtools/applications/db_add_simulation_model_from_repository_to_db.py +10 -1
  6. simtools/applications/derive_mirror_rnda.py +1 -1
  7. simtools/applications/generate_simtel_event_data.py +95 -3
  8. simtools/applications/merge_tables.py +14 -16
  9. simtools/applications/plot_tabular_data.py +12 -1
  10. simtools/applications/plot_tabular_data_for_model_parameter.py +103 -0
  11. simtools/applications/production_derive_corsika_limits.py +61 -23
  12. simtools/configuration/commandline_parser.py +2 -1
  13. simtools/constants.py +2 -0
  14. simtools/data_model/schema.py +15 -1
  15. simtools/db/db_handler.py +5 -0
  16. simtools/io_operations/io_table_handler.py +1 -1
  17. simtools/layout/array_layout_utils.py +5 -1
  18. simtools/model/array_model.py +5 -1
  19. simtools/production_configuration/derive_corsika_limits_grid.py +46 -3
  20. simtools/resources/array-element-ids.json +126 -0
  21. simtools/schemas/model_parameter_and_data_schema.metaschema.yml +5 -1
  22. simtools/schemas/model_parameters/atmospheric_profile.schema.yml +41 -0
  23. simtools/schemas/model_parameters/atmospheric_transmission.schema.yml +43 -0
  24. simtools/schemas/model_parameters/camera_filter.schema.yml +10 -0
  25. simtools/schemas/model_parameters/camera_filter_incidence_angle.schema.yml +10 -0
  26. simtools/schemas/model_parameters/discriminator_pulse_shape.schema.yml +31 -0
  27. simtools/schemas/model_parameters/fadc_pulse_shape.schema.yml +12 -0
  28. simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml +10 -0
  29. simtools/schemas/model_parameters/mirror_reflectivity.schema.yml +10 -0
  30. simtools/schemas/model_parameters/nsb_reference_spectrum.schema.yml +12 -0
  31. simtools/schemas/model_parameters/pm_photoelectron_spectrum.schema.yml +19 -0
  32. simtools/schemas/model_parameters/quantum_efficiency.schema.yml +10 -0
  33. simtools/schemas/plot_configuration.metaschema.yml +46 -57
  34. simtools/simtel/simtel_io_event_reader.py +1 -1
  35. simtools/simtel/simtel_io_event_writer.py +37 -1
  36. simtools/simtel/simtel_io_metadata.py +99 -3
  37. simtools/utils/general.py +0 -2
  38. simtools/utils/names.py +71 -2
  39. simtools/visualization/plot_pixels.py +0 -1
  40. simtools/visualization/plot_tables.py +81 -2
  41. {gammasimtools-0.17.0.dist-info → gammasimtools-0.18.0.dist-info}/WHEEL +0 -0
  42. {gammasimtools-0.17.0.dist-info → gammasimtools-0.18.0.dist-info}/licenses/LICENSE +0 -0
  43. {gammasimtools-0.17.0.dist-info → gammasimtools-0.18.0.dist-info}/top_level.txt +0 -0
  44. /simtools/{schemas → resources}/array_elements.yml +0 -0
@@ -4,34 +4,51 @@ r"""
4
4
  Derive CORSIKA configuration limits for energy, core distance, and viewcone radius.
5
5
 
6
6
  This tool determines configuration limits based on triggered events from broad-range
7
- simulations. It supports setting:
7
+ simulations. It supports the derivation of the following CORSIKA configuration parameters:
8
8
 
9
- - **ERANGE**: Derives the lower energy limit; upper limit is user-defined.
10
- - **CSCAT**: Derives the upper core distance; lower limit is user-defined.
11
- - **VIEWCONE**: Derives the viewcone radius; lower limit is user-defined.
9
+ - **ERANGE**: lower energy limit
10
+ - **CSCAT**: upper core distance
11
+ - **VIEWCONE**: viewcone radius
12
12
 
13
+ Broad-range simulations in this context are simulation sets generated with wide-ranging
14
+ definitions for above parameters.
13
15
  Limits are computed based on a configurable maximum event loss fraction.
14
16
  Results are provided as a table with the following columns:
15
17
 
16
- - particle_type: Particle type (e.g., gamma, proton, electron).
17
- - telescope_ids: List of telescope IDs used in the simulation.
18
- - zenith: Zenith angle.
19
- - azimuth: Azimuth angle.
20
- - nsb: Night sky background level
21
- - layout: Layout of the telescope array used in the simulation.
22
- - lower_energy_limit: Derived lower energy limit.
23
- - upper_radius_limit: Derived upper radial distance limit.
24
- - viewcone_radius: Derived upper viewcone radius limit.
18
+ +---------------------+-----------+--------+-----------------------------------------------+
19
+ | Field | Data Type | Units | Description |
20
+ +=====================+===========+========+===============================================+
21
+ | primary_particle | string | | Particle type (e.g., gamma, proton). |
22
+ +---------------------+-----------+--------+-----------------------------------------------+
23
+ | array_name | string | | Array name (custom or as defined in |
24
+ | | | | 'array_layouts'). |
25
+ +---------------------+-----------+--------+-----------------------------------------------+
26
+ | telescope_ids | string | | Comma-separated list of telescope IDs |
27
+ | | | | of this array. |
28
+ +---------------------+-----------+--------+-----------------------------------------------+
29
+ | zenith | float64 | deg | Direction of array pointing zenith. |
30
+ +---------------------+-----------+--------+-----------------------------------------------+
31
+ | azimuth | float64 | deg | Direction of array pointing azimuth. |
32
+ +---------------------+-----------+--------+-----------------------------------------------+
33
+ | nsb_level | float64 | | Night sky background level. |
34
+ +---------------------+-----------+--------+-----------------------------------------------+
35
+ | lower_energy_limit | float64 | TeV | Derived lower energy limit (**ERANGE**) |
36
+ +---------------------+-----------+--------+-----------------------------------------------+
37
+ | upper_radius_limit | float64 | m | Derived upper core distance limit (**CSCAT**) |
38
+ +---------------------+-----------+--------+-----------------------------------------------+
39
+ | viewcone_radius | float64 | deg | Derived viewcone radius limit (**VIEWCONE**) |
40
+ +---------------------+-----------+--------+-----------------------------------------------+
25
41
 
26
42
  The input event data files are generated using the application simtools-generate-simtel-event-data
27
- and are required for each point in the lookup table.
43
+ and are required for each point in the observational parameter space (e.g., array pointing
44
+ directions, level of night sky background, etc.).
28
45
 
29
46
  Command line arguments
30
47
  ----------------------
31
48
  event_data_files (str, required)
32
- Path to a file containing event data files derived with 'simtools-generate-simtel-event-data'.
33
- telescope_ids (str, required)
34
- Path to a file containing telescope configurations.
49
+ Path to reduced event data file.
50
+ telescope_ids (str, optional)
51
+ Custom array layout file containing telescope IDs.
35
52
  loss_fraction (float, required)
36
53
  Maximum event-loss fraction for limit computation.
37
54
  plot_histograms (bool, optional)
@@ -41,7 +58,19 @@ output_file (str, optional)
41
58
 
42
59
  Example
43
60
  -------
44
- Derive limits for a given file with a specified loss fraction.
61
+
62
+ Derive limits for a list of array layouts (use 'all' to derive limits for all layouts):
63
+
64
+ .. code-block:: console
65
+
66
+ simtools-production-derive-corsika-limits \\
67
+ --event_data_files path/to/event_data_files.yaml \\
68
+ --array_layout_name alpha,beta \\
69
+ --loss_fraction 1e-6 \\
70
+ --plot_histograms \\
71
+ --output_file corsika_simulation_limits_lookup.ecsv
72
+
73
+ Derive limits for a given file for custom defined array layouts:
45
74
 
46
75
  .. code-block:: console
47
76
 
@@ -70,13 +99,14 @@ def _parse():
70
99
  config.parser.add_argument(
71
100
  "--event_data_files",
72
101
  type=str,
102
+ nargs="+",
73
103
  required=True,
74
- help="Path to a file containing event data file paths.",
104
+ help="List of event data files or ascii file listing data files ",
75
105
  )
76
106
  config.parser.add_argument(
77
107
  "--telescope_ids",
78
108
  type=str,
79
- required=True,
109
+ required=False,
80
110
  help="Path to a file containing telescope configurations.",
81
111
  )
82
112
  config.parser.add_argument(
@@ -91,17 +121,25 @@ def _parse():
91
121
  action="store_true",
92
122
  default=False,
93
123
  )
94
- return config.initialize(db_config=False, output=True)
124
+ return config.initialize(
125
+ db_config=True,
126
+ output=True,
127
+ simulation_model=[
128
+ "site",
129
+ "model_version",
130
+ "layout",
131
+ ],
132
+ )
95
133
 
96
134
 
97
135
  def main():
98
136
  """Derive limits for energy, radial distance, and viewcone."""
99
- args_dict, _ = _parse()
137
+ args_dict, db_config = _parse()
100
138
 
101
139
  logger = logging.getLogger()
102
140
  logger.setLevel(gen.get_log_level_from_user(args_dict.get("log_level", "info")))
103
141
 
104
- generate_corsika_limits_grid(args_dict)
142
+ generate_corsika_limits_grid(args_dict, db_config)
105
143
 
106
144
 
107
145
  if __name__ == "__main__":
@@ -474,7 +474,8 @@ class CommandLineParser(argparse.ArgumentParser):
474
474
  _layout_group = job_group.add_mutually_exclusive_group(required=required)
475
475
  _layout_group.add_argument(
476
476
  "--array_layout_name",
477
- help="array layout name (e.g., alpha, subsystem_msts)",
477
+ help="array layout name(s) (e.g., alpha, subsystem_msts)",
478
+ nargs="+",
478
479
  type=str,
479
480
  required=False,
480
481
  )
simtools/constants.py CHANGED
@@ -21,3 +21,5 @@ MODEL_PARAMETER_SCHEMA_URL = (
21
21
  "https://raw.githubusercontent.com/gammasim/simtools/main/src/simtools/schemas/"
22
22
  "/model_parameters"
23
23
  )
24
+ # Path to resource files
25
+ RESOURCE_PATH = files("simtools") / "resources"
@@ -4,6 +4,7 @@ import logging
4
4
  from pathlib import Path
5
5
 
6
6
  import jsonschema
7
+ from referencing import Registry, Resource
7
8
 
8
9
  import simtools.utils.general as gen
9
10
  from simtools.constants import (
@@ -119,8 +120,14 @@ def validate_dict_using_schema(data, schema_file=None, json_schema=None):
119
120
  ), # default version to ensure backward compatibility
120
121
  )
121
122
 
123
+ validator = jsonschema.Draft6Validator(
124
+ schema=json_schema,
125
+ format_checker=format_checkers.format_checker,
126
+ registry=Registry(retrieve=_retrieve_yaml_schema_from_uri),
127
+ )
128
+
122
129
  try:
123
- jsonschema.validate(data, schema=json_schema, format_checker=format_checkers.format_checker)
130
+ validator.validate(instance=data)
124
131
  except jsonschema.exceptions.ValidationError as exc:
125
132
  _logger.error(f"Validation failed using schema: {json_schema} for data: {data}")
126
133
  raise exc
@@ -135,6 +142,13 @@ def validate_dict_using_schema(data, schema_file=None, json_schema=None):
135
142
  return data
136
143
 
137
144
 
145
+ def _retrieve_yaml_schema_from_uri(uri):
146
+ """Load schema from a file URI."""
147
+ path = SCHEMA_PATH / Path(uri.removeprefix("file:/"))
148
+ contents = gen.collect_data_from_file(file_name=path)
149
+ return Resource.from_contents(contents)
150
+
151
+
138
152
  def load_schema(schema_file=None, schema_version=None):
139
153
  """
140
154
  Load parameter schema from file.
simtools/db/db_handler.py CHANGED
@@ -409,6 +409,11 @@ class DatabaseHandler:
409
409
  Version of the model.
410
410
  export_file_as_table: bool
411
411
  If True, export the file as an astropy table (ecsv format).
412
+
413
+ Returns
414
+ -------
415
+ astropy.table.Table or None
416
+ If export_file_as_table is True
412
417
  """
413
418
  parameters = self.get_model_parameter(
414
419
  parameter,
@@ -301,7 +301,7 @@ def write_table_in_hdf5(table, output_file, table_name):
301
301
  with h5py.File(output_file, "a") as f:
302
302
  data = np.array(table)
303
303
  if table_name not in f:
304
- maxshape = (None,) + data.shape[1:]
304
+ maxshape = (None, *data.shape[1:])
305
305
  dset = f.create_dataset(
306
306
  table_name,
307
307
  data=data,
@@ -275,7 +275,11 @@ def get_array_layouts_from_db(
275
275
  """
276
276
  layout_names = []
277
277
  if layout_name:
278
- layout_names.append(layout_name)
278
+ layout_names.append(
279
+ layout_name[0]
280
+ if isinstance(layout_name, list) and len(layout_name) == 1
281
+ else layout_name
282
+ )
279
283
  else:
280
284
  site_model = SiteModel(site=site, model_version=model_version, mongo_db_config=db_config)
281
285
  layout_names = site_model.get_list_of_array_layouts()
@@ -59,7 +59,11 @@ class ArrayModel:
59
59
  self.mongo_db_config = mongo_db_config
60
60
  self.model_version = model_version
61
61
  self.label = label
62
- self.layout_name = layout_name
62
+ self.layout_name = (
63
+ layout_name[0]
64
+ if isinstance(layout_name, list) and len(layout_name) == 1
65
+ else layout_name
66
+ )
63
67
  self._config_file_path = None
64
68
  self._config_file_directory = None
65
69
  self.io_handler = io_handler.IOHandler()
@@ -9,12 +9,13 @@ from astropy.table import Column, Table
9
9
  import simtools.utils.general as gen
10
10
  from simtools.data_model.metadata_collector import MetadataCollector
11
11
  from simtools.io_operations import io_handler
12
+ from simtools.model.site_model import SiteModel
12
13
  from simtools.production_configuration.derive_corsika_limits import LimitCalculator
13
14
 
14
15
  _logger = logging.getLogger(__name__)
15
16
 
16
17
 
17
- def generate_corsika_limits_grid(args_dict):
18
+ def generate_corsika_limits_grid(args_dict, db_config=None):
18
19
  """
19
20
  Generate CORSIKA limits for a grid of parameters.
20
21
 
@@ -24,9 +25,23 @@ def generate_corsika_limits_grid(args_dict):
24
25
  ----------
25
26
  args_dict : dict
26
27
  Dictionary containing command line arguments.
28
+ db_config : dict, optional
29
+ Database configuration dictionary.
27
30
  """
28
- event_data_files = gen.collect_data_from_file(args_dict["event_data_files"])["files"]
29
- telescope_configs = gen.collect_data_from_file(args_dict["telescope_ids"])["telescope_configs"]
31
+ event_data_files = gen.get_list_of_files_from_command_line(
32
+ args_dict["event_data_files"], [".hdf5", ".gz"]
33
+ ) # accept fits.gz files (.gz)
34
+ if args_dict.get("array_layout_name"):
35
+ telescope_configs = _read_array_layouts_from_db(
36
+ args_dict["array_layout_name"],
37
+ args_dict.get("site"),
38
+ args_dict.get("model_version"),
39
+ db_config,
40
+ )
41
+ else:
42
+ telescope_configs = gen.collect_data_from_file(args_dict["telescope_ids"])[
43
+ "telescope_configs"
44
+ ]
30
45
 
31
46
  results = []
32
47
  for file_path in event_data_files:
@@ -187,3 +202,31 @@ def _create_table_columns(cols, columns, units):
187
202
  col = Column(data=col_data, name=k, unit=units.get(k))
188
203
  table_cols.append(col)
189
204
  return table_cols
205
+
206
+
207
+ def _read_array_layouts_from_db(layouts, site, model_version, db_config):
208
+ """
209
+ Read array layouts from the database.
210
+
211
+ Parameters
212
+ ----------
213
+ layouts : list[str]
214
+ List of layout names to read. If "all", read all available layouts.
215
+ site : str
216
+ Site name for the array layouts.
217
+ model_version : str
218
+ Model version for the array layouts.
219
+ db_config : dict
220
+ Database configuration dictionary.
221
+
222
+ Returns
223
+ -------
224
+ dict
225
+ Dictionary mapping layout names to telescope IDs.
226
+ """
227
+ site_model = SiteModel(site=site, model_version=model_version, mongo_db_config=db_config)
228
+ layout_names = site_model.get_list_of_array_layouts() if layouts == ["all"] else layouts
229
+ layout_dict = {}
230
+ for layout_name in layout_names:
231
+ layout_dict[layout_name] = site_model.get_array_elements_for_layout(layout_name)
232
+ return layout_dict
@@ -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
+ }
@@ -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'
@@ -31,3 +31,34 @@ source:
31
31
  - Calibration
32
32
  simulation_software:
33
33
  - name: sim_telarray
34
+ plot_configuration:
35
+ - type: discriminator_pulse_shape
36
+ title: 'Discriminator pulse shape'
37
+ xtitle: 'Time [ns]'
38
+ ytitle: 'Amplitude [a.u.]'
39
+ no_markers: true
40
+ tables:
41
+ - parameter: discriminator_pulse_shape
42
+ column_x: 'time'
43
+ column_y: 'amplitude'
44
+ - type: discriminator_pulse_shape_low_gain
45
+ title: 'Discriminator pulse shape (low gain)'
46
+ xtitle: 'Time [ns]'
47
+ ytitle: 'Amplitude [a.u.]'
48
+ no_markers: true
49
+ tables:
50
+ - parameter: discriminator_pulse_shape
51
+ column_x: 'time'
52
+ column_y: 'amplitude (low gain)'
53
+ - type: discriminator_pulse_shape_high_and_low_gain
54
+ title: 'Discriminator pulse shape (high and low gain)'
55
+ xtitle: 'Time [ns]'
56
+ ytitle: 'Amplitude [a.u.]'
57
+ no_markers: true
58
+ tables:
59
+ - parameter: discriminator_pulse_shape
60
+ column_x: 'time'
61
+ column_y: 'amplitude'
62
+ - parameter: discriminator_pulse_shape
63
+ column_x: 'time'
64
+ column_y: 'amplitude (low gain)'
@@ -37,3 +37,15 @@ source:
37
37
  - Calibration
38
38
  simulation_software:
39
39
  - name: sim_telarray
40
+ plot_configuration:
41
+ - type: fadc_pulse_shape
42
+ title: 'FADC pulse shape'
43
+ xtitle: 'Time [ns]'
44
+ ytitle: 'Amplitude [a.u.]'
45
+ xscale: 'linear'
46
+ yscale: 'linear'
47
+ no_markers: true
48
+ tables:
49
+ - parameter: fadc_pulse_shape
50
+ column_x: 'time'
51
+ column_y: 'amplitude'
@@ -39,3 +39,13 @@ source:
39
39
  - Calibration
40
40
  simulation_software:
41
41
  - name: simtools
42
+ plot_configuration:
43
+ - type: lightguide_efficiency_vs_incidence_angle
44
+ title: 'Light guide efficiency'
45
+ xtitle: 'Incident angle [deg]'
46
+ ytitle: 'Efficiency'
47
+ no_markers: true
48
+ tables:
49
+ - parameter: lightguide_efficiency_vs_incidence_angle
50
+ column_x: 'angle'
51
+ column_y: 'efficiency'
@@ -38,3 +38,13 @@ source:
38
38
  - Calibration
39
39
  simulation_software:
40
40
  - name: sim_telarray
41
+ plot_configuration:
42
+ - type: mirror_reflectivity
43
+ title: 'Mirror reflectivity'
44
+ xtitle: 'Wavelength [nm]'
45
+ ytitle: 'Reflectivity'
46
+ no_markers: true
47
+ tables:
48
+ - parameter: mirror_reflectivity
49
+ column_x: 'wavelength'
50
+ column_y: 'reflectivity'