[AstroPy] BSCALE/BZERO
Diego Farias
dnfarias at uc.cl
Fri Oct 27 21:43:29 EDT 2017
Hi everyone,
I have posted this message wrongly in the 'issue' of astropy github, but it
is better doing it by the mailing list.
I've been struggling with a problem that I quite don't understand and a
possible solution by scale function of astropy.io (that's why I'm asking
advice).
I have images with BITPIX -32,(max pixel values ~ 70000, min ~0) and I was
instructed to 'change' them to
- *BITPIX=16, BSCALE=1, and BZERO=32767 (or whatever value is needed to
make the dynamic range from 0 to 65535)*
That's why I thought I could use scale('uint16') in order to do this. But
I'm pretty lost on whether I'm doing it good or wrong with this method. It
was told me that
a pixel value of e.g. 66030.2 in -32 image will be int(66030.2 - 65535)
because
an integer image (BITPIX=16) can only have 65536 distinct values. I get
that,
but what I don't understand is this:
*BITPIX etc does not change the value, it only changes how that value is
saved*
What do you think about this problem?
Thanks,
Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20171027/96e6909b/attachment.html>
More information about the AstroPy
mailing list