SIMPLE-AstroDB / SIMPLE-db

Curated collection of data for low mass stars, brown dwarfs, and directly imaged exoplanets.
https://simple-bd-archive.org/
BSD 3-Clause "New" or "Revised" License
11 stars 22 forks source link

Create fits spectra From MOCA #521

Open kelle opened 5 months ago

kelle commented 5 months ago

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

jgagneastro commented 5 months ago

I have already planned writing a code to export the moca spectra to uniform FITS files, I will send it once it's done.Jonathan Gagné, Ph.D.Conseiller Scientifique / Scientific AdvisorPlanétarium Rio Tinto Alcan | Espace pour la vieProfesseur associé, Université de Montréal4801 av. Pierre-de Coubertin, Montréal, Québec H1V 3V4On Jun 27, 2024, at 9:09 PM, Kelle Cruz @.***> wrote: MOCA has already "standardized" a bunch of spectra. Consider creating FITS files from MOCA instead of converting piece meal. @jgagneastro

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kelle commented 5 months ago

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 commented 5 months ago

Noted !My initial plan was to use these columns as FITS header entries:MOCA DBmocadb.caExcept for the moca_ keys and the "comments" column (which contains complete original headers).I haven't given much thoughts to what units the actual spectra would be stored in.Jonathan Gagné, Ph.D.Conseiller Scientifique / Scientific AdvisorPlanétarium Rio Tinto Alcan | Espace pour la vieProfesseur associé, Université de Montréal4801 av. Pierre-de Coubertin, Montréal, Québec H1V 3V4On Jun 27, 2024, at 11:23 PM, Kelle Cruz @.***> wrote: 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!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kelle commented 5 months ago

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`)