Author Topic: open fits file - scaling options  (Read 1412 times)

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 200
    • View Profile
    • Skypixels - Astrophotography by Herbert Walter
open fits file - scaling options
« on: 2016 October 01 00:00:03 »
Hi,

When opening a FITS file, PI scales the image to 0.0 - 1.0

Example - Fit File:  minADU 300 / maxADU 25.000
open the image PI scales to: minADU - 1 = 0.0 and maxADU = 1.0

Is that correct?


I cant find the possibility that PI doesn't scale, but set the value 0ADU = 0.0 and 65.535 = 1.0

I'm grateful for any help.

Best regards!

Herbert, Austria

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 200
    • View Profile
    • Skypixels - Astrophotography by Herbert Walter
Re: open fits file - scaling options
« Reply #1 on: 2016 October 03 02:56:26 »
Perhaps only Juan know's the answer - hopefully

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6935
    • View Profile
    • http://pixinsight.com/
Re: open fits file - scaling options
« Reply #2 on: 2016 October 03 05:45:45 »
Quote
When opening a FITS file, PI scales the image to 0.0 - 1.0

This is one of the most famous misconceptions about PixInsight. PixInsight represents floating point images internally in the [0,1] range. However, it can read a floating point image in any range without problems, with just one condition: the actual range where the image is represented, that is, the black and white points of the data, must be known.

The FITS standard does not provide a way to know the numeric range used by a floating point image. For example, 300 and 25000 in your case might be referred to [300,25000], [0,1000000], [0,65535], or [-50000.12345,+50000.67890], among an infinite set. In each case the correct interpretation of 300 and 25000 would be completely different. This lack of standardization generates endless interoperability problems. To overcome them, PixInsight implements a fully configurable FITS format support module, where you can specify the range of input floating point images. A custom range can also be specified on a per-image basis using input format hints on tools and scripts that support them.

Quote
I cant find the possibility that PI doesn't scale, but set the value 0ADU = 0.0 and 65.535 = 1.0

Some applications store floating point images in the unsigned 16-bit integer range, that is [0.0, 65535.0]. To load these images correctly, you can open FITS Format Preferences and specify that range as the default floating point input range. Instead of that, my *strong* recommendation is using the BatchFormatConversion script as follows:

- In input hints, enter the following: lower-range 0 upper-range 65535

- Select the set of FITS files you need to convert by clicking the Add button.

- Select an output directory to write the converted files.

- Make sure that output extension is .xisf

- Click the OK button and wait.

Now you can work with the generated XISF files without any problems.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Herbert_W

  • PixInsight Addict
  • ***
  • Posts: 200
    • View Profile
    • Skypixels - Astrophotography by Herbert Walter
Re: open fits file - scaling options
« Reply #3 on: 2016 October 03 06:15:09 »
Hi Juan,

thank you for the reply and that PI offers a solution - as always  :)

Best regards!

Herbert, Austria