Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-19188: Add support for pre-translation header correction #18

Merged
merged 1 commit into from Apr 12, 2019

Conversation

timj
Copy link
Member

@timj timj commented Apr 9, 2019

Corrections are applied by locating YAML files named after the instrument/observation_id.

Copy link
Member

@RobertLuptonTheGood RobertLuptonTheGood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK


from .translator import MetadataTranslator
from .translators import FitsTranslator

log = logging.getLogger(__name__)

ENV_VAR_NAME = "METADATA_CORRECTIONS_PATH"
"""Name of environment variable containing search path for header fix up."""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this set as an environment variable? I was expecting it to be in a known place relative to obs_lsst

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are three ways to find correction files:

  1. Pass in explicit search path.
  2. Read a path from an environment variable.
  3. Ask the translator class for explicit searchpaths.

Option 3 is how LSST works. See the lsst/obs_lsst#97 PR where I add a search_paths method that specified $OBS_LSST_DIR/corrections be used for the path.

It is also required that the ``observation_id`` and ``instrument``
be calculable prior to header fix up.

Correction files use names of the form ``instrument_obsid.yaml``.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be helpful to provide a complete example of a filename here

Corrections are applied by locating YAML files named after
the instrument/observation_id.
@timj timj merged commit c7173c2 into master Apr 12, 2019
@timj timj deleted the tickets/DM-19188 branch April 12, 2019 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants