-
Notifications
You must be signed in to change notification settings - Fork 44
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
ValueError: Big-endian buffer not supported on little-endian compiler #70
Comments
Hello, Yes, the issue is similar to the one in scikit-image issue you mentioned. The endian-ness from the source of your data doesn't match the endian-ness of your local computer where you're running astroaling. Fortunately Numpy lets you swap the endianness quite easy: https://numpy.org/doc/stable/user/basics.byteswapping.html
I don't think astroalign should deal with different endian issues but the above workaround works well. |
Thank you for your reply. It doesn't work.
ValueError: Troublesome data array: [ nan nan nan nan 755. nan nan nan nan nan nan nan I am using an intel-Mac with OS 10.15. Thanks |
Well, at least this time you got a different error, it seems like the endian issues you were having before are not a problem. The problem now is that you have a bunch of |
The program without .newbyteorder() lines works for the same FITS files with scikit-image==0.15.0. It seems .newbyteorder() destroyed data.
original |
That is strange. Would you mind sending me the problem images so I can take a look? Thanks. |
Thanks, Martin. I sent you the FITS files. |
is a workaround. |
FYI. byteswap() is needed. Because skimage.transform.warp does not accept Big-endian, |
Yes, this is a known issue that was introduced in a recent version of scikit-image. |
#Allgignment of Images
image_path='image path'
filename='image / file name'
files=sorted(glob.glob(os.path.join(image_path,filename)))
print(len(files))
ref_image=fits.open(files[0], )
reference_image=ref_image[0].data
for i in range(0,len(files)):
image_data=fits.open(files[i])
source_image=image_data[0].data + 0 #here the addition of zero (0) solves the the endian compiler issue.
header=image_data[0].header
image_aligned,footprint=aa.register(source_image,reference_image)
aligned_file=files[i].replace('.fits','')
fits.writeto(aligned_file+'_aligned'+'.fits',image_aligned,header,overwrite=True)
print('No. %i alignment done'%i) (after for loop the rest of the code is in indentation) |
i hope it helps |
reg_im2, footprint = astroalign.register(imdata2, imdata1)
fails with an error message of'ValueError: Big-endian buffer not supported on little-endian compiler'
when using scikit-image=0.16.2 or 0.18.1.
However, it works with scikit-image=0.15.0, so I downgraded scikit-image to 0.15.0 to get around the problem.
I guess this is the same issue as the following.
scikit-image/scikit-image#4525
Using astroalign-2.4 and python3.7
Thanks.
The text was updated successfully, but these errors were encountered: