Question about Pixel Values

Discussion in 'Image Processing' started by Warren Neuhart, Sep 30, 2016.

  1. Warren Neuhart

    Warren Neuhart Cyanogen Customer

    Joined:
    Jul 31, 2016
    Messages:
    2
    I'm trying to get a handle on pixel values in MaximDL. I read that MaximDL assigns 16-bit pixel values using a range of -32768 to +32767. The range of data from my 16-bit CCD camera is 0 to 65535. I also read that MaximDL subtracts 32768 from each pixel prior to saving. Since the BZERO keyword in the .fits header is set to 32768 and BSCALE keyword is set to 1, what does the pixel value listed in the Information Window and the Status Bar actually mean in relation to a true 16-bit intensity scale? Thanks!
     
  2. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    3,605
    I'm afraid you have a misconception about MaxIm DL.

    When you load an image into MaxIm DL, it is internally represented in IEEE 32-bit floating point format. It can store numbers much larger than 65,535 and can also store fractional numbers.

    What you are referring to is the way information is stored when writing to the FITS file format, when using the 16-bit version of FITS. The FITS standard requires that 16-bit integers are signed, with a range of -32,768 to +32,767. In order to save data ranging from 0-65,535 into the FITS format we have to offset the data. There is a built-in mechanism in the FITS format, via the mandatory BZERO and BSCALE header keywords. BZERO is an amount that needs to be added to each pixel in the FITS image to produce the correct number. So we subtract 32,768 from every pixel, and then set BZERO to 32,768. That way we can save and reload 16-bit images in FITS format without losing data.

    This offsetting is only needed for 16-bit FITS files. MaxIm DL can of course also write IEEE 32-bit floating point images, which are simply written out as-is in floating point with BZERO = 0.
     
  3. Warren Neuhart

    Warren Neuhart Cyanogen Customer

    Joined:
    Jul 31, 2016
    Messages:
    2
    Thanks for the quick response! So it looks like I'm confusing how the data is stored (via the .fits standard) vs. how it is displayed in MaximDL. I've been imaging for a few years, but have never delved into the intricacies of data formats and how it is displayed in MaximDL. Thanks again.
     

Share This Page