astropy / astropy/specutils

Resolve questions of how meta should behave for SpectrumCollection

Open
#327 2 comments 0 reactions 0 assignees View on GitHub
discussion enhancement
Dominant language
Python
Stars
204
Forks
134
Avg merge
12h 55m
Merged PRs (30d)
1

Description

Some issues are lingering from #273 with respect to how ``meta`` should behave when a `SpectrumCollection` is created from multiple `Spectrum1D` objects. See https://github.com/astropy/specutils/pull/273#issuecomment-421160384 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.

Contributor guide

Open the contributing guide

Research direction

Start by reading the discussion in issue #273 and its linked pull request comments, then inspect the SpectrumCollection.from_spectra entry point and its current meta handling. Resolve whether collection metadata should use tuple-like indexing, ordered values, or merging with an optional keyword; done means the behavior is decided and consistently specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.