simtools-submit-model-parameter-from-external#
Submit a model parameter value and corresponding metadata through the command line.
Input and metadata is validated, and if necessary enriched and converted following the model parameter schemas. Model parameter data is written in the simtools-style json format, metadata as a yaml file.
Command line arguments
- parameter (str)
model parameter name
- value (str or list of str)
Input value. Lists with different element types may be passed as multiple values.
- instrument (str)
instrument name.
- site (str)
site location.
- parameter_version (str)
Parameter version.
- model_parameter_schema_version (str, optional)
Version of the model-parameter schema to use for validation and value interpretation.
- input_meta (str, optional)
input meta data file (yml format)
Example
Submit the number of gains for the LSTN-design readout chain:
simtools-submit-model-parameter-from-external \
--parameter num_gains \\
--value 2 \\
--instrument LSTN-design \\
--site North \\
--parameter_version 0.1.0 \\
--input_meta num_gains.metadata.yml
Command line arguments#
options#
- –help
show this help message and exit
- –parameter
Parameter for simulation model
Required.
- –instrument
Instrument name
Required.
- –parameter_version
Parameter version
Required.
- –model_parameter_schema_version
Model-parameter schema version to use for validation and value interpretation
- –value
Model parameter value: a number, a number with a unit, or a list of values with units. Examples: –value=5, –value=’5 km’, –value=’5 cm, 0.5 deg’
Required.
- –input_meta
meta data file(s) associated to input data (wildcards or list of files allowed)
- –check_parameter_version
Fail if the parameter version already exists in the model repository (skipped with –ignore_existing_parameter_version).
simulation model#
- –site
Observatory site (e.g., North, South). Use –show_options site.
Required.
output#
- –output_file
Output data file.
- –output_file_format
file format of output data
Default: ecsv.
- –skip_output_validation
skip output data validation against schema
model repository#
- –simulation_models_path
Path containing the simulation-model repository to read.
- –simulation_models_git_path
Path to a local normal, bare, or mirror Git repository containing simulation models.
- –simulation_models_git_revision
Git tag, ref, or commit to read from the simulation-model repository.
application#
- –show_options
Print available values for a supported option and exit.
Examples#
Prepare an analogue-sum threshold for model submission#
Update analogue-sum trigger threshold into a versioned model parameter with supplied metadata.
Application: simtools-submit-model-parameter-from-external
Integration test: submit_model_parameter_from_external_submit_asum_threshold.yml
Command
simtools-submit-model-parameter-from-external --config tests/integration_tests/config/submit_model_parameter_from_external_submit_asum_threshold.yml
Configuration
instrument: LSTN-design
input_meta: ${downloaded:asum_threshold.meta.yml}
output_path: simtools-output
parameter: asum_threshold
parameter_version: 0.1.0
site: North
value: 200 mV
Prepare focus offset for model submission#
Convert an LST focus-offset value with physical units into a validated model-parameter file.
Application: simtools-submit-model-parameter-from-external
Integration test: submit_model_parameter_from_external_submit_focus_offset.yml
Command
simtools-submit-model-parameter-from-external --config tests/integration_tests/config/submit_model_parameter_from_external_submit_focus_offset.yml
Configuration
input_meta: null
instrument: LSTN-01
output_path: simtools-output
parameter: focus_offset
parameter_version: 0.1.0
site: North
value: 6.55 cm, 0.0 deg, 0.0, 0.0
Prepare mirror list for model submission#
Convert a South FlashCam MST mirror-list filename into a validated model-parameter file.
Application: simtools-submit-model-parameter-from-external
Integration test: submit_model_parameter_from_external_submit_mirror_list.yml
Command
simtools-submit-model-parameter-from-external --config tests/integration_tests/config/submit_model_parameter_from_external_submit_mirror_list.yml
Configuration
input_meta: null
instrument: MSTx-FlashCam
output_path: simtools-output
parameter: mirror_list
parameter_version: 0.1.0
site: South
value: mirror_CTA-100_1.20-86-0.04.dat
Prepare a camera gain count for model submission#
Convert an LST camera gain count into a versioned model parameter using matching metadata files.
Application: simtools-submit-model-parameter-from-external
Integration test: submit_model_parameter_from_external_submit_num_gains_wildcards.yml
Command
simtools-submit-model-parameter-from-external --config tests/integration_tests/config/submit_model_parameter_from_external_submit_num_gains_wildcards.yml
Configuration
input_meta: tests/resources/static/*.meta.yml
instrument: LSTN-design
output_path: simtools-output
parameter: num_gains
parameter_version: 0.1.0
site: North
value: 2
Prepare a reference altitude for model submission#
Convert the North observatory reference altitude into a validated site model-parameter file.
Application: simtools-submit-model-parameter-from-external
Integration test: submit_model_parameter_from_external_submit_reference_point_altitude.yml
Command
simtools-submit-model-parameter-from-external --config tests/integration_tests/config/submit_model_parameter_from_external_submit_reference_point_altitude.yml
Configuration
input_meta: null
instrument: OBS-North
output_path: simtools-output
parameter: reference_point_altitude
parameter_version: 0.1.0
site: North
value: 2.177 km