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

Create fits spectra From MOCA #521

Open
kelle opened this issue Jun 28, 2024 · 4 comments
Open

Create fits spectra From MOCA #521

kelle opened this issue Jun 28, 2024 · 4 comments

Comments

@kelle
Copy link
Collaborator

kelle commented Jun 28, 2024

MOCA has already "standardized" a bunch of spectra. Consider creating FITS files from MOCA instead of converting piece meal. @jgagneastro

@jgagneastro
Copy link

jgagneastro commented Jun 28, 2024 via email

@kelle
Copy link
Collaborator Author

kelle commented Jun 28, 2024

I have strong thoughts and feelings about how the fits files should be formatted so let's discuss or collaborate before you do too much!

@jgagneastro
Copy link

jgagneastro commented Jun 28, 2024 via email

@kelle
Copy link
Collaborator Author

kelle commented Jun 28, 2024

A pull request to specutils is almost fully approved which includes a new writer which will make a roundtrippable FITS file. So you'll read in the spectra to a Spectrum1D object and then write it out. It'll look something like this:

my_spectra = Spectrum1D(wavelength*unit, flux*unit, uncertainty, header)
Spectrum1D.write('my_spectra.fits`)

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

No branches or pull requests

2 participants