Skip to content

Commit

Permalink
allow extensions of the core set of properties
Browse files Browse the repository at this point in the history
Some instruments have important properties beyond the core set
that have been defined, and we want to be able to extract those
as well. Added the concept of 'extensions' to both the
MetadataTranslator and ObservationInfo. This allows instruments
to define additional instrument-specific properties in their
appropriate MetadataTranslator, and these get picked up by the
ObservationInfo.

Unfortunately, extension properties have to get defined in the
ObservationInfo at runtime (because we don't know what they are
at compile time), which means we need to use a different scheme
for making the fields read-only, and there's no clear place to
hang their docstrings. But this is counteracted by the fact that
users don't need to choose a specific class to use, or define
the extensions themselves.
  • Loading branch information
PaulPrice committed Apr 5, 2022
1 parent fc6a95e commit 2b33bdd
Show file tree
Hide file tree
Showing 5 changed files with 468 additions and 139 deletions.
1 change: 1 addition & 0 deletions python/astro_metadata_translator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
from .translators import *
from .headers import *
from .version import *
from .properties import *

0 comments on commit 2b33bdd

Please sign in to comment.