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

Ignore BinTableHDU's and HDU's lacking shape #62

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

imbasimba
Copy link
Member

I tested a barrage of different FITS files and most failures were caused by BinTableHDU's or HDU's lacking shape

@imbasimba
Copy link
Member Author

Also this check causes problems for the XMM fits I tested

keep_axes = [t.get('coordinate_type') == 'celestial' for t in full_wcs.get_axis_types()[::-1]]
for keep, axlen in zip(keep_axes, shape):
if not keep and axlen != 1:
raise Exception(f'cannot process input `{fits_path}`: found a non-celestial axis with size other than 1')

Here is a RGB FITS that is failing because of the above check. I'm not sure which solution would handle this kind of FITS the best.
https://nxsa.esac.esa.int/nxsa-sl/servlet/data-action?RETRIEVAL_TYPE=PRODUCT&OBS_IMAGE_TYPE=OBS_EPIC&PROTOCOL=HTTP&OBSERVATION_ID=0044350101

@pkgw pkgw merged commit 3bab4f7 into WorldWideTelescope:master Sep 30, 2021
@pkgw
Copy link

pkgw commented Sep 30, 2021

Hm. Well, the current check is behaving as I intended: this RGB image essentially consists of three different images (R plane, G plane, B plane), and it's defensible to refuse to process the data if the tiling isn't well-specified, i.e. the user hasn't specified which plane they want you to process. Of course, we don't provide a mechanism to specify which plane to prcess, which makes things a bit inconvenient :-)

But in these circumstances it would also be defensible to go ahead using the 0'th image (the R plane in this case), if we gave the user a big prominent warning that that was happening. And from a user experience standpoint, people generally prefer "proceed as best you can" instead of "refuse to do anything less than perfect" ...

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

Successfully merging this pull request may close these issues.

2 participants