Author Topic: New Readout Mode  (Read 766 times)

Offline CraigNZ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • View Profile
New Readout Mode
« on: 2016 December 20 23:45:34 »
Having learned that Readout affects how a pixel value is loaded from a FITS image and displayed then we need to add a new mode: 16 (32k).  In this mode the 16 bit pixel value loaded is a signed 16 bit number with no offset.  So the range is (-32k to +32k).  It means a value of 1024 is read and displayed as 1024.

This is different from the current readout mode of 16 (65k) where a 16 bit pixel value is loaded and 32768 is added to the value and has a range of 0 to 65k.  In this case of value of 1024 is displayed as 1024 + 32768 = 33792.


Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2173
  • Join the dark side... we have cookies
    • View Profile
    • http://www.astrophoto.cl
Re: New Readout Mode
« Reply #1 on: 2016 December 21 10:42:28 »
Why do you need signed 16bit data? In most applications, you won't have negative values. Usually they are generated by incorrectly substracted bias, dark or overscan frames. Usually these negatives values make no physical sense (you can't have negative photon counts).
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline CraigNZ

  • PixInsight Enthusiast
  • **
  • Posts: 88
    • View Profile
Re: New Readout Mode
« Reply #2 on: 2016 December 21 11:53:53 »
If BITPIX=16 then the values read from the FITS file are signed 16 bit integers.  The problem is whether there is an offset applied.  In some images there is no offset and so a value of 1024 for the pixel should readout as 1024, it does not, an offset of 16378 is added to it.  The offset should only be added if specified in the FITS header (BZERO=13768).  If this keyword is not present then no offset should be added.

But, because the FITS file can have negative integers (I agree there shouldn't be any) then it must be carried through to the readout value.  I guess when they created the FITS standard they should have stayed with unsigned 16 bit rather than signed integers.  I guess they had a reason for it.