Skip to content

Commit

Permalink
Merge pull request #2616 from cta-observatory/site_string
Browse files Browse the repository at this point in the history
Convert metadata Instrument.site to free string instead of enum
  • Loading branch information
maxnoe authored Sep 12, 2024
2 parents 4b85d1f + 35ad049 commit 80914fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
2 changes: 2 additions & 0 deletions docs/changes/2616.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The ``Instrument.site`` metadata item now accepts any string,
not just a pre-defined list of sites.
23 changes: 7 additions & 16 deletions src/ctapipe/io/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,14 @@ def default_time(self):
class Instrument(Configurable):
"""Instrumental Context"""

site = Enum(
[
"CTA-North",
"CTA-South",
"SDMC",
"HQ",
"MAGIC",
"HESS",
"VERITAS",
"FACT",
"Whipple",
"Other",
],
"Other",
help="Which site of CTA (or external telescope) "
"this instrument is associated with",
site = Unicode(
default_value="Other",
help=(
"Which site of CTAO (or external telescope)"
" this instrument is associated with"
),
).tag(config=True)

class_ = Enum(
[
"Array",
Expand Down

0 comments on commit 80914fb

Please sign in to comment.