ericmandel / pyds9

Python connection to SAOimage DS9 via XPA
76 stars 41 forks source link

Make set_np2arr work with all endian dtypes #10

Closed eteq closed 9 years ago

eteq commented 9 years ago

Right now, if I use DS9.set_np2arr, it gives total junk out for big-endian files. I'm not sure if this is a bug in numpy or what, but it just doesn't work. This PR fixes that by actually reading the endianness from the numpy dtype and supplying it to ds9.

Note that big endians like this are outputs of the HST data reduction process for some instruments, so definitely not an unimportant case...

ericmandel commented 9 years ago

This sounds like a real bug, so thanks for finding and fixing it. In the absence of an endian specification, DS9 is assuming native format, so its best to pass the actual endian value.

ericmandel commented 9 years ago

I'll update the changelog, since I'm more likely to credit you explicitly than you are!