-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
fails because of aligned axes on wide-slit SPICE L2 files
#196
Comments
read_spice_l2_fits
fails because of aligned axes on wide-slit SPICE L2 filesread_spice_l2_fits
fails because of aligned axes on wide-slit SPICE L2 files
Hi @ebuchlin. Thanks for raising this bug. From your description above, it seems that array axes associated with wavelength should not be aligned, even if they are also associated with other coordinates, e.g. spatial X. (The exception of course, if the data come from the same spectral window.) If my understanding is correct, then this bug should be fixed with the following change to spice.py line 114-116: aligned_axes = tuple(i for i, phys_type in enumerate(first_sequence.array_axis_physical_types) if "em.wl" in set(phys_type)) This will exclude ALL array axes associated with wavelength, not just those ONLY associated with wavelength as before. Do you agree with this fix?
I don't understand whether this has consequences for this bugfix. But it does, could you elaborate? |
Hi @DanRyanIrish, yes this works in this case (but with However, we have now found an other case showing that this way of determining aligned axes is still insufficient. SPICE has the capability to bin in the y direction with different factors for different windows. The unbinned axes are then aligned, but the binned axes are not (unless there is some way to consider axes with a different number of pixels as aligned). I don't know yet what should be done in this case. I can provide an example file and/or open another issue for this.
No, I don't expect any consequence on this bug, but it was one of the hypotheses I considered, so I thought that it was interesting to be aware of that. |
The test file loads with #204 If you find other files that are broken, please do either reopen this issue or create a new one please! This is in the sunraster release 0.4.2, if you update to that |
Description
Opening a SPICE L2 file corresponding to a raster taken with the wide (30") slit (
solo_L2_spice-w-ras_*.fits
files) withread_spice_l2_fits
fails: there is a "ValueError: Aligned axes are not all of same length." exception, while we expect these files to open with no error.Steps to Reproduce
The trace is:
This seems to be because the detection of aligned axes fails to exclude the spectral axis in the case of wide-slit observations, maybe because of the
phys_type != ("em.wl",)
condition on spice.py line 115.In the case of wide slit observations, there is of course some spatial X information on the wavelength axis, but we still have
CTYPE3 = 'WAVE '
, so I guess that the corresponding physical type should still beem.wl
.first_sequence.array_axis_physical_types
is[('time',), ('custom:pos.helioprojective.lon', 'custom:pos.helioprojective.lat', 'em.wl'), ('custom:pos.helioprojective.lon', 'custom:pos.helioprojective.lat'), ('custom:pos.helioprojective.lon', 'custom:pos.helioprojective.lat', 'time')]
for this file.Also, please note that in current version of the SPICE pipeline, contiguous windows are merged on the wavelength axis, and the merged windows are duplicated in the L2 FITS file (retaining the relevant metadata of each parent window), but this does not seem to be the root of the current issue.
System Details
The text was updated successfully, but these errors were encountered: