Author Topic: Problem with FITS files from WinView  (Read 3409 times)

Offline Thorsten Lockert

  • Newcomer
  • Posts: 36
    • Personal Home Page
Problem with FITS files from WinView
« on: 2011 November 08 16:19:14 »
On a telescope still being provisioned, we have a Princeton camera which we read using WinView... It generates 32 bit unsigned int FITS files (tho near as I can tell it uses less than 16 bits resolution).

However, I have been unable to read these files using PixInsight on my Mac, whether using the 32 bit or the 64 bit version. The only way I have been able to read them so convert them to IEEE float versions using MaxIm DL.

A sample image which exhibits this issue can be found at http://www.sigmasoft.com/~tholo/images/Bubble-Ha769.fit.zip

Yes, the FITS header is rather minimal, but near as I can tell the image is otherwise valid...?

Thorsten

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Problem with FITS files from WinView
« Reply #1 on: 2011 November 09 03:39:51 »
Hi Thorsten,

There is no bug here, although this topic is recurrent. The file you have uploaded is a 32-bit *signed* integer FITS image. It stores a 16-bit raw image as signed integer numbers in an extremely inefficient way: only 37969 discrete values have been stored in the immensity of the 32-bit range. You can verify this by selecting the image and entering the following command on PixInsight's console:

j Math.pow2( 32 )*($max - $min)

which will show the number of discrete values stored in the image. Unfortunately, there are some applications out there that insist in storing raw CCD data in 32-bit formats, which is both a conceptual error and an efficiency crime. Let's assume that the authors of these applications do this for marketing reasons, i.e. to give the user a false impression of extreme accuracy. Raw CCD data are 16-bit unsigned integer numbers and as such they should be provided by any decent acquisition software.

That said, after loading this image in PixInsight you have two options:

- Apply the Rescale process (with default parameters; just select the image and click the Rescale tool button). This will redistribute the data to occupy the whole numerical range available, but the image will lose any physical significance.

- Apply the following PixelMath expression:

($T - 0.5)*(2^32)/32768

with the Rescale result option disabled. This will restore the image to its nominal range, preserving its physical meaning (that is, respecting the original black point).

Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Thorsten Lockert

  • Newcomer
  • Posts: 36
    • Personal Home Page
Re: Problem with FITS files from WinView
« Reply #2 on: 2011 November 09 09:27:35 »
I had assumed it was something like this. What threw me off was that I could not just auto stretch it to see the data using STF; I guess because the white point would have to be pulled so far in...

Thank you again!

Thorsten