Skip to content

Commit

Permalink
Merge pull request #459 from gammasim/telescope-positions-array-elements
Browse files Browse the repository at this point in the history
Allow to print heights for non-telescope-type array elements
  • Loading branch information
GernotMaier committed May 31, 2023
2 parents 0f9f540 + fe53e74 commit e1e175f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion simtools/layout/layout_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _get_corsika_sphere_center(self, tel_name):
"""

if names.get_telescope_type(tel_name) is not None:
if len(names.get_telescope_type(tel_name)) > 0:
return self._corsika_telescope["corsika_sphere_center"][
names.get_telescope_type(tel_name)
]
Expand Down
9 changes: 9 additions & 0 deletions tests/integration_tests/test_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@
"corsika",
],
],
"print_array_elements::print_compact_corsika_telescopeheights": [
[
"--array_element_list",
"tests/resources/telescope_positions-North-utm.ecsv",
"--export",
"corsika",
"--use_corsika_telescope_height",
],
],
}


Expand Down
15 changes: 15 additions & 0 deletions tests/resources/telescope_positions-North-utm.ecsv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,22 @@
# corsika_obs_level: !astropy.units.Quantity
# unit: *id002
# value: 2158
# corsika_sphere_radius:
# LST: !astropy.units.Quantity
# unit: *id002
# value: 12.5
# MST: !astropy.units.Quantity
# unit: *id002
# value: 9.6
# corsika_sphere_center:
# LST: !astropy.units.Quantity
# unit: *id002
# value: 16.0
# MST: !astropy.units.Quantity
# unit: *id002
# value: 9.0
# comments: |
# Prod6 sub-array from CTAO North
# UTM Zone 28N
# schema: astropy-2.0
asset_code sequence_number utm_east utm_north alt geo_code
Expand Down

0 comments on commit e1e175f

Please sign in to comment.