simtools-db-get-parameter-from-db#
Get a parameter entry from DB for a specific telescope or a site.
The application receives a parameter name, a site, a telescope (if applicable) and a version. Allow to print the parameter entry to screen or save it to a file. Parameter describing a table file can be written to disk or exported as an astropy table (if available).
Command line arguments#
- parameter (str, required)
Parameter name
- parameter_version (str, optional)
Parameter version
- model_version (str, required)
Model version
- site (str, required)
South or North.
- telescope (str, optional)
Telescope model name (e.g. LST-1, SST-D, …)
- output_file (str, optional)
Output file name. If not given, print to stdout.
- export_model_file (bool, optional)
Export model file (if parameter describes a file).
- export_model_file_as_table (bool, optional)
Export model file as astropy table (if parameter describes a file).
Raises#
KeyError in case the parameter requested does not exist in the model parameters.
Example#
Get the mirror_list parameter used for a given model_version from the DB.
simtools-db-get-parameter-from-db --parameter mirror_list \\
--site North --telescope LSTN-01 \\
--model_version 5.0.0
Get the mirror_list parameter using the parameter_version from the DB. Write the mirror list to disk.
simtools-db-get-parameter-from-db --parameter mirror_list \\
--site North --telescope LSTN-01 \\
--parameter_version 1.0.0 \\
--export_model_file