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

Rename Spectrum1D to Spectrum or SpectrumAligned or similar #1056

Open
eteq opened this issue May 3, 2023 · 9 comments
Open

Rename Spectrum1D to Spectrum or SpectrumAligned or similar #1056

eteq opened this issue May 3, 2023 · 9 comments
Labels
data objects Core data objects like Spectrum1D or SpectralCollection
Milestone

Comments

@eteq
Copy link
Member

eteq commented May 3, 2023

From the Astropy 2023 Coordination meeting, a lot of people expressed that they thought there was a significant negative impact to specutils's use that people are confused that Spectrum1D doesn't actually mean what the "1D" seems to imply to people.

For background, https://specutils.readthedocs.io/en/stable/types_of_spectra.html#overview-of-how-specutils-represents-spectra explains the distinction, and clarifies how in Spectrum1D the "1D" really means that the spectral axis is 1D, but the flux can be any-dimensional. This is distinct from SpectrumCollection where both the spectral_axis and flux can be multidimensional.

But this name clearly trips up people - they see "spectrum 1d" and think that means the spectrum can only be 1D, and that it therefore misses their use case so they walk away. So this argues for renaming the class to something that doesn't give this impression.

What we did not come to was a clear answer to what the right name is (see item 2 of this bit of lore). Some ideas thrown out were to just have it be Spectrum ("drop the 1D. It's cleaner" - @nstarman). @WilliamJamieson suggested something like SpectrumAligned, which I don't love but don't know that I have an immediate suggestion. (@tepickering suggested SpectrumETEQ given a comment from me that "it's clear that the '1D' in Spectrum1D really only makes sense to me" 😉 )

cc @weaverba137 @WilliamJamieson @tepickering @nstarman @tomdonaldson @jehturner @pllim @taldcroft @perrygreenfield @larrybradley

@eteq eteq added the data objects Core data objects like Spectrum1D or SpectralCollection label May 3, 2023
@pllim
Copy link
Member

pllim commented May 3, 2023

If you are taking votes, Spectrum is less to type... so 👍 from me.

@nmearl
Copy link
Contributor

nmearl commented May 3, 2023

I do like Spectrum.

An alternative might be to follow the NDData/CCDData approach and use SpectrumData. Or, numpy-esque with SpectrumArray, but that adds some ambiguity with SpectrumList.

@larrybradley
Copy link
Member

I like Spectrum.

@rosteen rosteen added this to the v2.0 milestone Sep 27, 2023
@rosteen
Copy link
Contributor

rosteen commented Sep 27, 2023

Personally I like the simplicity of Spectrum, but I could also go for SpectrumData or even SpectralData.

@perrygreenfield
Copy link
Member

I vote for Spectrum. I think the more general case where the spectrum may appear in multiple dimensions is the one that has the more complex name.

@nstarman
Copy link
Member

And we could rename that one to Spectrums...

@pllim
Copy link
Member

pllim commented Sep 27, 2023

What about NDSpectrum like NDData? 😅

@rosteen
Copy link
Contributor

rosteen commented Sep 27, 2023

It seems like the consensus is "Spectrum is fine", but GitHub can do polls now and I want to try the shiny new feature so I opened #1087 . Unfortunately it looks like you can only vote for one option, I would have preferred the ability to select multiple choices.

@aragilar
Copy link
Contributor

Can we keep an alias around to avoid unnecessary code breakage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data objects Core data objects like Spectrum1D or SpectralCollection
Projects
None yet
Development

No branches or pull requests

8 participants