simtools-convert-geo-coordinates-of-array-elements#

Convert and print a list of array element positions in different coordinate systems.

Description

Convert array element positions in different CTAO coordinate systems. Available coordinate systems are:

  1. UTM system

  2. ground system (similar to sim_telarray system with x-axis pointing toward geographic north and y-axis pointing towards the west); altitude relative to the CORSIKA observation level. Altitude is the height of the elevation rotation axis (plus some possible mirror offset).

  3. Mercator system

Command line arguments

array_element_positions_file (str)

File name with list of array element positions. Input can be given as astropy table file (ecsv) or a single array element in a json file.

print (str)

Print in requested coordinate system; possible are ground, utm, mercator

export (str)
Export array element list to file in requested coordinate system;

possible are ground, utm, mercator

select_assets (str)

Select a subset of array elements / telescopes (e.g., MSTN, LSTN)

Example

Convert a list of array elements using a list of telescope positions in UTM coordinates.

simtools-convert-geo-coordinates-of-array-elements
    --array_element_positions_file tests/resources/telescope_positions-North-utm.ecsv
    --print ground

The converted list of telescope positions in ground coordinates is printed to the screen.

The following example converts a list of telescope positions in UTM coordinates and writes the output to a file in ground (sim_telarray) coordinates. Also selects only a subset of the array elements (telescopes; ignore calibration devices):

simtools-convert-geo-coordinates-of-array-elements
    --array_element_positions_file tests/resources/telescope_positions-North-utm.ecsv
    --export ground
    --select_assets LSTN

Expected output is a ecsv file in the directory printed to the screen.

Command line arguments#

options#

–help

show this help message and exit

–array_element_positions_file

List of array element positions.

Required.

–input_meta

meta data file associated to input data

–print

print list of positions in requested coordinate system

Default: . Choices: ground, utm, mercator.

–export

export array element list to file (in requested coordinate system)

Choices: ground, utm, mercator.

–select_assets

select a subset of assets (e.g., MSTN, LSTN)

–skip_input_validation

skip input data validation against schema

simulation model#

–model_version

Simulation production model version(s). Use –show_options model_version.

–parameter_version

model parameter version

–overwrite_model_parameters

JSON string with model parameters to overwrite

–site

Observatory site (e.g., North, South). Use –show_options site.

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#

Select North-site telescopes in ground coordinates#

Read ground-coordinate array positions, select LST and MST elements, and export a ground-coordinate table.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_ground_to_ground.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_ground_to_ground.yml

Configuration

export: ground
array_element_positions_file: ${static:telescope_positions-North-ground.ecsv}
model_version: 6.0.2
site: North
output_path: simtools-output
select_assets:
- LSTN
- MSTN

Convert ground positions to UTM#

Convert a North-site array-element model parameter from ground coordinates to UTM coordinates.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_ground_to_utm_json.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_ground_to_utm_json.yml

Configuration

export: utm
array_element_positions_file: ${prepared:array_element_position_ground-2.0.0.json}
log_level: DEBUG
model_version: 6.0.2
output_file: test.json
output_path: simtools-output
parameter_version: 2.0.0
site: North

Convert Mercator positions to UTM#

Convert North-site telescope positions from Mercator to UTM coordinates and retain LST and MST elements.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_mercator_to_utm_meta_in_table.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_mercator_to_utm_meta_in_table.yml

Configuration

export: utm
array_element_positions_file: ${static:telescope_positions-North-mercator.ecsv}
log_level: DEBUG
model_version: 6.0.2
site: North
output_file: test.ecsv
output_path: simtools-output
select_assets:
- LSTN
- MSTN
skip_input_validation: true
skip_output_validation: true

Export CORSIKA telescope heights#

Convert UTM telescope positions to ground coordinates using CORSIKA observation-level heights.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_print_compact_corsika_telescopeheights.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_print_compact_corsika_telescopeheights.yml

Configuration

export: ground
array_element_positions_file: ${static:telescope_positions-North-utm.ecsv}
log_level: DEBUG
model_version: 6.0.2
site: North
output_file: test.ecsv
output_path: simtools-output
select_assets:
- LSTN
- MSTN
skip_output_validation: true

Convert UTM positions to ground coordinates#

Convert a North-site array-element model parameter from UTM to local ground coordinates.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_utm_to_ground_json.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_utm_to_ground_json.yml

Configuration

export: ground
array_element_positions_file: ${prepared:array_element_position_utm-2.0.0.json}
log_level: DEBUG
model_version: 6.0.2
output_file: test.json
output_path: simtools-output
parameter_version: 2.0.0
site: North

Convert UTM table positions to ground coordinates#

Convert North-site UTM telescope positions to ground coordinates using metadata embedded in the table.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_utm_to_ground_meta_in_table.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_utm_to_ground_meta_in_table.yml

Configuration

export: ground
array_element_positions_file: ${static:telescope_positions-North-utm.ecsv}
log_level: DEBUG
model_version: 6.0.2
site: North
output_file: test.ecsv
output_path: simtools-output
select_assets:
- LSTN
- MSTN

Convert UTM positions using separate metadata#

Convert North-site UTM telescope positions to ground coordinates using a separate metadata file.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_utm_to_ground_meta_in_yml.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_utm_to_ground_meta_in_yml.yml

Configuration

export: ground
array_element_positions_file: ${static:telescope_positions-North-utm-without-cta-meta.ecsv}
input_meta: ${static:telescope_positions-North-utm.meta.yml}
log_level: DEBUG
model_version: 6.0.2
output_file: test.ecsv
output_path: simtools-output
select_assets:
- LSTN
- MSTN

Convert UTM positions to Mercator coordinates#

Convert North-site telescope positions from UTM to Mercator coordinates for geographic display.

Application: simtools-convert-geo-coordinates-of-array-elements

Integration test: convert_geo_coordinates_of_array_elements_utm_to_mercator_meta_in_table.yml

Command

simtools-convert-geo-coordinates-of-array-elements --config tests/integration_tests/config/convert_geo_coordinates_of_array_elements_utm_to_mercator_meta_in_table.yml

Configuration

export: mercator
array_element_positions_file: ${static:telescope_positions-North-utm.ecsv}
log_level: DEBUG
model_version: 6.0.2
site: North
output_file: test.ecsv
output_path: simtools-output
select_assets:
- LSTN
- MSTN
skip_output_validation: true