Skip to content

Loading and saving masks in .ech files #34

Description

@tronsgaard

When reading Echelle objects from .ech files, PyReduce ignores the "MASK" property and creates a mask from the "COLUMNS" property.

Conversely, when saving to .ech, PyReduce will save the generated mask as well as the column ranges it came from, not checking if they are redundant.

In practice, this means that the file size grows by ~10% the first time .ech files is loaded and saved, which doesn't seem right.

Happy to work on this, but first I would like to establish what is the desired behavior. My take would be this:

  • Reading: Apply the mask, if it exists, otherwise generate mask from column ranges as now, or perhaps even apply column ranges to mask.
  • Writing: If the Echelle object has both mask and columns defined, check if they correspond and drop the mask if they do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions