-
Notifications
You must be signed in to change notification settings - Fork 82
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
Use the correct fits image dtype #531
Conversation
491a52a
to
f627fd4
Compare
Thanks for submitting this. Please let me know when it's ready. |
Hi @martindurant, I think the PR is ready. It is a tiny change, and the relevant tests pass. I guess no one has been trying kerchunk on floating point FITS images yet. The failing tests seem to be due to something else. Just to let you know my use case... In the past, I've converted FITS images to zarr so I can process them as an on-disk, dask-chunked, xarray |
Would love to see a notebook or any sharable material out of this! |
@emfdavid , any idea why "s3://noaahrrr-bdp-pds/hrrr.20220804/conus/hrrr.t01z.wrfsfcf01.grib2" would no longer be publicly accessable? |
Just a typo and should be noaa-hrrr-bdp-pds ? |
Oh, I see the context now: the URL is intentionally wrong, but it now raises PermissionError rather than FileNotFound. I think for the purposes of the test, either will do:
|
The behavior may be different depending on whether the bucket or the blob doesn't exist? If you are making an intentional not found test, put some answer in your question for your future self to debug and make the key something like "s3://noaahrrr-bdp-pds/hrrr.20220804/definitely_doesnt_exist_test/hrrr.t01z.wrfsfcf01.grib2" |
It may be a behaviour change in S3, but I suspect that the bucket does now exists, but we can't read from it, whereas before it didn't exist. Either way, changing the line in the test as I indicated will fix this. |
Here is a gist of an example notebook.. You won't be able to run it, but it illustrates what I needed to do to get a particular set of FITS files into a meaningful structure. |
See discussion in otherwise unrelated PR fsspec#531.
I've made this change, but not sure if you wanted me to fix it here. If not, I can revert. |
Currently, when
kerchunk.fits.process_file
is used on a FITS image containing floating-point data, the dtype is not identified as bigendian. This PR corrects the lookup table so it specifies bigendian float dtypes.A test is provided to illustrate the issue and prevent recursion.