<div dir="ltr">Hi everyone, <div><br></div><div>I have posted this message wrongly in the 'issue' of astropy github, but it is better doing it by the mailing list.</div><div><br></div><div>I've been struggling with a problem that I quite don't understand and a possible solution by scale function of <a href="http://astropy.io">astropy.io</a> (that's why I'm asking advice).</div><div><br></div><div>I have images with BITPIX -32,(max pixel values ~ 70000, min ~0) and I was instructed to 'change' them to </div><ul style="font-size:12.8px"><li style="margin-left:15px"><i>BITPIX=16, BSCALE=1, and BZERO=32767 (or whatever value is needed to make the dynamic range from 0 to 65535)</i></li></ul><div>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 </div><div>a pixel value of e.g. 66030.2 in -32 image will be int(66030.2 - 65535) because</div><div><span style="font-size:12.8px">an integer image (BITPIX=16) can only have 65536 distinct values. I get that, </span></div><div>but what I don't understand is this:<br style="font-size:12.8px"><br style="font-size:12.8px"><i><span style="font-size:12.8px">BITPIX etc does not change the value, it only changes how that value is saved</span><br></i></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">What do you think about this problem?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks,</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Diego</span></div><div><br><br></div></div>