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

read_spice_l2_fits #236

Closed
takucera opened this issue Apr 10, 2023 · 10 comments
Closed

read_spice_l2_fits #236

takucera opened this issue Apr 10, 2023 · 10 comments

Comments

@takucera
Copy link
Contributor

Provide a general description of the issue or problem.

Hi, I am having trouble with read_spice_l2_fits. I am getting the error below. I am thinking it might be a package dependency problem, because other people are not getting the error, but I don't know the problem.
I am using ndcube 2.1.1, sunraster 0.4.2, astropy 5.2.2, sunny 4.1.4. Any idea what I am doing wrong?

Sorry this is really a help request, but it seems like a very sunraster specific problem.

File ~/mambaforge/envs/so_proc/lib/python3.10/site-packages/sunraster/instr/spice.py:210, in _read_single_spice_l2_fits(filename, windows, memmap, read_dumbbells, output, spice_id)
208 wcs = WCS(new_header)
209 # Define exposure times from metadata.
--> 210 exp_times = u.Quantity(np.zeros(hdu.data.shape[-1]) + meta.get("XPOSURE"), unit=u.s)
211 # Define data cube.
212 data = hdu.data

TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

@nabobalis
Copy link
Contributor

Hello,

Can you provide the file that is failing?

My impression is that meta.get("XPOSURE") is returning None but without the file to check, I can't say for sure.

@takucera
Copy link
Contributor Author

takucera commented Apr 10, 2023 via email

@nabobalis
Copy link
Contributor

My email address is [email protected] if you can upload it there. That would be great.

@ebuchlin
Copy link

This must be because you are using sunraster 0.4.2, your issue looks like #208 which has been fixed in 0.4.3 (see the change log).
If the problem persists with 0.4.3, it could be a similar issue with identification of the HDUs corresponding to spectral windows.

@nabobalis
Copy link
Contributor

Ah good catch, not sure how I missed that. If you can update sunraster and see if that fails after.

@takucera
Copy link
Contributor Author

takucera commented Apr 10, 2023 via email

@nabobalis
Copy link
Contributor

nabobalis commented Apr 10, 2023

Oh it might be that the recipe was never updated. We use a bot to do an update for conda-forge but if that is missed then conda-forge never gets the update.

Let me check that.

@nabobalis
Copy link
Contributor

Looks like the pull request was never merged. I lack access, I have asked the maintainers to do so.

Since both are in Europe, it will be tomorrow now.

@nabobalis
Copy link
Contributor

Hello @takucera, the conda-forge recipe was just merged.

If you do an update, that should show up now and it will read the file.

If it does not, please let me know.

@takucera
Copy link
Contributor Author

takucera commented Apr 14, 2023 via email

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

3 participants