On Thu, 17 Dec 2015 04:08:02 +1100, Chris Angelico <ros...@gmail.com> wrote: > On Thu, Dec 17, 2015 at 4:04 AM, Peter Pearson ><pkpearson@nowhere.invalid> wrote: >> The file is 65274016 bytes long. You claim the dimensions are >> 9896 x 3298, but that comes out to half that number (32637008), so I'll >> bet the real dimensions are 9896 x 6596, with one byte per pixel. >> I think this image format is called "raw". > > It could be 16 bits per pixel. Without knowing a lot more about the > source of the image and its format, it's hard to say with any > certainty.
Agreed. It's annoying when an agency goes to the trouble of making huge datasets available online, but fails to identify the format. But the 16-bits-per-pixel hypothesis is unlikely, given that each byte tends to echo its predecessor: 0000130 ffff ffff ffff ffff ffff ffff ffff ffff 0000140 ffff ffff ffff c0ff c1c0 c3c3 c3c3 c4c4 0000150 c4c4 c3c4 c3c3 c4c4 c3c3 c3c3 c3c3 c3c3 0000160 c4c4 c4c4 c5c4 c6c5 c7c7 c7c7 c5c5 c6c5 When you decompose this data file as a one-byte-per-pixel, 9896 x 6596 image, the resulting image shows two nearly identical strips, one above the other. That suggests interlacing, except that the top strip has some "bites" missing that aren't missing from the bottom strip. My best guess is that it's just two images glued together, maybe taken at different wavelengths. -- To email me, substitute nowhere->runbox, invalid->com. -- https://mail.python.org/mailman/listinfo/python-list