Log in

View Full Version here: : Autostretching FITS files - How do you prevent it.


[1ponders]
26-07-2007, 01:36 PM
When opening a FITS file into AIP4WIN it automatically stretches the image. I have been unsuccessful in working out how to turn this function off (It's probably a very simple process :eyesroll: ). Apart from inserting a black and a white pixel somewhere in the image (or stretching 1 pixel to black and another to white before opening in A4W), can anyone explain how to turn this feature off in AIP4WIN.


If you have experienced this in other programs (maxim DL perhaps) this might be a good thread to post the solution for an easy find for anyone looking for the solution.

jase
26-07-2007, 04:45 PM
Be careful here Paul. You could be talking about two different things. Most image processing tools that work with FITs files perform two types of stretches – permanent and screen.

What you are most likely experiencing is a screen stretch. A screen stretch does not manipulate the raw data pixel values. Instead it’s just changing your screen brightness to show the details. This is great if you want to quickly analyse your data quality or blink images. A permanent stretch will actually change pixel values – typically performed by DDP, Curves (of different types such as spline or gama) and levels to name a few.

Why the hell would I want to stretch my data on the screen and not change the real pixel values? A very good reason – photometry. If you’re measuring a star’s brightness, the last thing you want to do is change the values of your pixels as all data accuracy is lost!

I don’t have intimate knowledge of AIP4WIN as I use MaximDL. However to turn off auto stretching in AIP4WIN. There is an option within the Display Control dialogue box. If you click on the stretch button, there is a check box to enable/disable auto stretch when opening a file. Note - this is only doing a screen stretch, not changing pixel values.

Personally, I’d leave it 'on' unless you have a valid reason to turn it 'off'. Having said that, I still manually screen stretch to analyse the data - it’s a matter of preference.

bird
26-07-2007, 05:03 PM
There is a similar problem with registax when using fits files, in some parts of the program it stretches the image and in other places it doesn't, this leads to a serious problem when you use the "create reference" feature, as you end up comparing stretched vs not stretched images.

personally I solved this by making pixel (0,0) "black" and pixel (0,1) "white" in my fits images, defeating anyone who tries to stretch them :-)

cheers, Bird

jase
26-07-2007, 07:27 PM
Yes, that would work.
A query though...Are you referring to multiple images being displayed with different screen stretch values?
Many programs have a equalize function that ensures all images are stretch by the same amount (you simply provide a reference image that the other images are stretch to). This eliminates the possibility that you're comparing stretched and non-stretched screen data.

[1ponders]
26-07-2007, 07:41 PM
The on screen stretch is what I'm talking about Jase. It's a pain if I want to open an image unaltered and then have to reset the screen view.

jase
26-07-2007, 08:14 PM
I think that's the nature of the beast Paul. I don't think I'd want a consistent screen stretch to occur for all images I open - certainly not for DSO imaging anyway. The difference in brightness for a 20min sub compared to the 10min sub is considerable. Hence there is a need to have this flexibility. Perhaps I'm missing the point.

Doug
26-07-2007, 10:49 PM
Paul, when you open an image in AIP4Win you will see an "Image Display Control" window. Click on the 'Defaults' tab and select your loading preference then save it.

Doug

[1ponders]
26-07-2007, 10:57 PM
Thanks Doug, I'll have a look.