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

Resolve questions of how meta should behave for SpectrumCollection #327

Open
eteq opened this issue Sep 14, 2018 · 2 comments
Open

Resolve questions of how meta should behave for SpectrumCollection #327

eteq opened this issue Sep 14, 2018 · 2 comments

Comments

@eteq
Copy link
Member

eteq commented Sep 14, 2018

Some issues are lingering from #273 with respect to how meta should behave when a SpectrumCollection is created from multiple Spectrum1D objects. See #273 (comment) and follow-on comments for more discussion. The core question: how should they be "indexed"? More specifically:

  1. Should the keys be (i, j, ..) to match the ? Or should the dict be ordered (either implicity or explicitly) so that meta.values()[i,j,...] do the right thing?
  2. Should the meta instead not even be a nested set of dicts, but rather be merged? This could be an optional keyword to add to the SpectrumCollection.from_spectra method.
@hcferguson
Copy link
Contributor

If the WCS for SpectrumCollection is going to be a list of individual WCS's, then I think it makes sense for the meta to be a list of individual meta's. Since the spectra themselves are not in dictionaries, think it could cause confusion if these other objects are, since then you can't slice them with the same indices.

Arguably one might want to have one meta for the SpectrumCollection as well as a meta for each spectrum in the collection (akin to the header 0 and the individual extension headers in multi-extension FITS files). Packaging them in a dictionary with the list of individual metas just being one item in the dictionary seems okay, but would make the call for getting a particular metadata value look different for Spectrum collection meta['individual_meta'][3]['keyword'] for the fourth spectrum in the collection vs. meta['keyword'] for the Spectrum1D case. But I think that's okay.

The logic for merging meta could be a mess, depending on the contents of the metadata.

@eteq eteq modified the milestones: v0.7, v0.8 Jan 4, 2020
@nmearl
Copy link
Contributor

nmearl commented Apr 1, 2020

This may be related #617.

@eteq eteq modified the milestones: v0.8, v1.x Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants