Spectrum1d.read suddenly won't read JWST x1d data automatically.
Hi, this code has been working until yesterday. I haven't touched it at all. fn is the file name which is already in my folder. spec1d = Spectrum1D.read(f'{data_dir}/{fn}') spec1d = Spectrum1D(spectral_axis=spec1d.spectral_axis, flux=spec1d.flux, uncertainty=StdDevUncertainty(0.05*(spec1d.flux))) print(spec1d)
It gives an error that says: "Format could not be identified based on the file name or contents, please provide a 'format' argument." and even if I put in format = "JWST x1d", it gives an error that says: "OSError: Empty or corrupt FITS file:"
### Tasks
Hi, thanks for the report. A bit more information would be useful: is this a new file from the JWST pipeline that is not working, and if so are older files that you have still able to be read in? Or did you update your specutils version and now the code no longer works? It's possible that the JWST pipeline changed something in the headers that is affecting the auto-identification, but I'll need to investigate further.