Skip to content

fix(codecs): correct wavelength padding key in pad_spectrum#68

Open
hopeful0 wants to merge 1 commit into
PolymathicAI:mainfrom
hopeful0:fix/spectrum-pad-wavelength-sentinel
Open

fix(codecs): correct wavelength padding key in pad_spectrum#68
hopeful0 wants to merge 1 commit into
PolymathicAI:mainfrom
hopeful0:fix/spectrum-pad-wavelength-sentinel

Conversation

@hopeful0
Copy link
Copy Markdown

While using the SDSS spectrum codec, I kept seeing failures consistent with #61 even after #64 landed. Tracing the encode path showed that pad_spectrum (introduced in #64) pads flux, ivar, mask, and wavelength, but padding_values still used the key "lambda". Because the modality field is wavelength, those padded positions were filled with 0 instead of the intended 99999 sentinel.

This change updates the dict key to "wavelength" so padded wavelength bins match the other fields.

@hopeful0
Copy link
Copy Markdown
Author

By the way, there's a question: according to pad_spectrum, should we set the wavelength of all invalid data (mask=True) to 99999 instead of 0 or other values?

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.

1 participant