Author Topic: Problem w/ FITS  (Read 3395 times)

Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 490
    • Billions and Billions
Problem w/ FITS
« on: 2011 October 21 14:29:21 »
Hi gang,
            I have trouble opening master 3-pane OSC FITS combined in Astroart 5.0. These are readable by MaxIm DL, Photoshop (FITSPlug), CCDStack, as well as Astroart, but not PI. They are solid black unless I DDP in Astroart, they then open fine. I have tried changing the FITS settings in PI via the Format Explorer which gets me a solid grey result! Can anyone solve the conflict? If so, mind dropping me a line privately? Thanks!
Best always, Warren

Warren A. Keller
www.ip4ap.com

Offline Warhen

  • PTeam Member
  • PixInsight Old Hand
  • ****
  • Posts: 490
    • Billions and Billions
Re: Problem w/ FITS
« Reply #1 on: 2011 October 21 14:56:55 »
Kudos to Harry! Though the Format Explorer by default says it will rescale anything out of range, it doesn't work on these images. At defaults the image opens BLACK. When auto stretch is applied w/ STF you see only hot pixels and brighter stars but the background continues unnaturally black and can't be properly visdualized or stretched.

Should you see this issue, apply Rescale RGB/K and voila- normal visualization- Thank you Harry!
 
Best always, Warren

Warren A. Keller
www.ip4ap.com

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Problem w/ FITS
« Reply #2 on: 2011 October 22 05:11:46 »
Hi Warren,

Quote
Should you see this issue, apply Rescale RGB/K and voila- normal visualization-

Please note that rescaling will not, in general, provide you with the original data stored in an out-of-range floating point FITS or TIFF file. Rescaling should never be necessary if you know the actual range of pixel values the original data have been referred to. This topic has already been discussed many times on this forum. See for example my answer to this thread.

As this topic is important to understand how PixInsight works with respect to data generated by other applications, let me quote myself from the forum post above:

Quote
Quote
2) PI is scaling or normalizing the original data to the [0..1] range.

Not actually. Rescaling only takes place when a floating point FITS or TIFF file is being loaded and PixInsight does not know the actual range of pixel values to which the data are referred. In other words, PixInsight has to know which values correspond to the no signal and full signal states (usually corresponding to the black and white pixel value interpretations, respectively, in all supported color spaces). This is necessary to correctly interpret any image in PixInsight. In absence of a known data range, the only way to interpret an image is by assuming that min=black (or perhaps 0=black if min >= 0) and max=white, where min and max are the minimum and maximum values present in the data array.

Unfortunately, the TIFF and FITS standards do not provide a standard way to define the numeric range to which pixel values are referred in a floating point image (see the text marked as green in section 5.3 above). With integer data there are (almost) no problems, since integers are naturally bounded by their bit sizes. However, real numbers allow for arbitrary ranges, and here is where the craziness begins. Basically each application uses its own, usually undocumented and sometimes inconsistent range to store floating point images, and this is the cause of most of the existing problems to transport floating point data between applications.

PixInsight is very different from most applications in this regard, for the following reasons:

- PixInsight always uses the same numeric range to store floating point pixel data: the [0,1] range, where 0=black and 1=white. This feature is publicly documented and used consistently.

- PixInsight is extremely flexible to import floating point data in virtually any possible range. A custom default floating point input range can be defined with the FITS and TIFF format preferences dialogs, available from the Format Explorer window. The default input range of floating point data is [0,1], but it can be changed to meet the ranges used by alien data; for example [0.0,65535.0] is used by some well-known software packages.

- The ImageCalibration, StarAlignment, ImageIntegration and HDRComposition tools support a set of format hints (small words that change the behavior of a format support module) that allow you to load floating point FITS and TIFF files with arbitrary ranges, orientations, data formats, format features, etc. This has been a further step to provide the necessary flexibility to load data produced by virtually any application.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/