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

Spectrum1d.read suddenly won't read JWST x1d data automatically. #1084

Open
seirasrzw opened this issue Sep 23, 2023 · 1 comment
Open

Spectrum1d.read suddenly won't read JWST x1d data automatically. #1084

seirasrzw opened this issue Sep 23, 2023 · 1 comment
Labels

Comments

@seirasrzw
Copy link

seirasrzw commented Sep 23, 2023

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

No tasks being tracked yet.
@rosteen
Copy link
Contributor

rosteen commented Sep 29, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants