write_file_to_molecfit¶
- tayph.write_file_to_molecfit(molecfit_folder, name, headers, waves, spectra, ii, plot=False, time_average=False)[source] [edit on github]¶
This is a wrapper for writing a spectrum from a list to molecfit format. name is the filename of the fits file that is the output. headers is the list of astropy header objects associated with the list of spectra in the spectra variable. ii is the number from that list that needs to be written (meaning that this routine is expected to be called as part of a loop).
The user must make sure that the wavelength axes of these spectra are in air, in the observatory rest frame (meaning not BERV_corrected). Tayphs read_e2ds() function should have done this automatically.