Skip to content

Adds a flag for returning the model spectra for SDSS BHM spec files - #1339

Open
havok2063 wants to merge 3 commits into
astropy:mainfrom
havok2063:sdss_modelspec
Open

Adds a flag for returning the model spectra for SDSS BHM spec files#1339
havok2063 wants to merge 3 commits into
astropy:mainfrom
havok2063:sdss_modelspec

Conversation

@havok2063

@havok2063 havok2063 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This PR adds a model flag to the loader for SDSS BHM spec files to optionally return the model spectrum. The model is stored as a separate column in the same table with the flux spectrum. This flag sets the model data as the Spectrum "flux". There is an added metadata boolean keyword is_model whether the returned Spectrum object is a model or not. This is a placeholder implementation until specutils adds support for model spectra.

# returns original flux spectrum
flux = Spectrum.read(file, format='SDSS-V spec')
flux.meta["is_model"]
False

# returns model spectrum
model = Spectrum.read(file, format='SDSS-V spec',  model=True)
model.meta["is_model"]
True

Pinging @albireox for review as well.

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