comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: CCD saturation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: CCD saturation [message #63022] Sat, 25 October 2008 06:33 Go to next message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
Marshall Perrin wrote:

> Shape detection is not the way to go here, versus detecting the level
> at which pixels saturate. There should be some characteristic number of
> counts per pixel below which you know data is not saturated.

Yes, but this only works for the inner part of a saturated spot +
streaks. The edges don't have a value of 65535 (it's a 16bit CCD
camera) and can in fact have a lower value than non-saturated spots
which I want to preserve. That's why I could only think of shape
detection to differ streaks from spots. However I'm not really able to
do that. I usually remove a lot of non-saturated spots too.

The problem I want to solve is illustrated here (X-ray Powder
Diffraction): http://www.datasqueezesoftware.com/screenbig.jpg
You see the so-called Debye rings in the image in the background and
the azimuthally integrated pattern in the front. Usually you don't see
this nice rings, but alot of spots forming a ring (or more rings).
Imagine azimuthally integrating this when some spots are saturated
with streaking. You don't end up with nice Gaussian peaks like in the
figure, but some strange ..euhm.. things... that may look like peaks.
If I could just detect the streaks and set these pixels to zero, I
solved the problem.

Since there are alot of astronomers here, I would think they also have
similar problems to solve, only their spots are not scattered X-ray
beams but stars :-).
Re: CCD saturation [message #63023 is a reply to message #63022] Fri, 24 October 2008 15:23 Go to previous messageGo to next message
Marshall Perrin is currently offline  Marshall Perrin
Messages: 44
Registered: December 2005
Member
Wox <wout.de.nolf@gmail.com> wrote:
> Hi all,
>
> Does anyone have any experience in correcting images for saturation
> streaking? See image b in
> http://learn.hamamatsu.com/articles/images/bloomingfigure1.j pg
>
> I tried to do something with IDL's sobel+contour but it seems hard to
> preserve the spots without streaking while removing the saturated ones
> along with its stripes. Any ideas?

Shape detection is not the way to go here, versus detecting the level
at which pixels saturate. There should be some characteristic number of
counts per pixel below which you know data is not saturated.

Bear in mind there is no real way to do more than cosmetic corrections
to such images. Whatever pixel values were originally 'underneath'
the saturation streaks are now permanantly lost. So you can make a prettier
picture if you want, but for quantitative photometry or other analysis you'll
have to consider alternate approaches. In some cases, like for HST ACS,
the total number of counts from a source is preserved, even as the light
gets smeared out into the wrong pixels.

- Marshall
Re: CCD saturation [message #63113 is a reply to message #63022] Mon, 27 October 2008 09:47 Go to previous message
JMB is currently offline  JMB
Messages: 13
Registered: January 2008
Junior Member
Hi Wox,

If you haven't solved your problem yet, here are some ideas to help:

- If your streaks are vertical, you can try to search for them in the
columns of your image matrix.

First you need to identify a threshold to separate "active" pixels
from noisy background:
e.g. T1 = mean(image) x 4,

Then look for columns that are corrupted by streaks:
for i=0,Ncols-1 do column[i]=total(img[i,*] gt T1)

You get for each column the number of "active" pixels and if this
number is higher than a specific threshold this column contains a
streak and you can set the pixels of this column equal to zero (or
background value)

The problem is that by doing this you miss now the "good" pixels
from the center of your active spot/star.
A way to retrieve the center of your bright spots without taking
the streak is to use the median function:
e.g. median(img,5) GT T2
where T2 is a threshold on the image brigthness.
You can visualize the result of the median function by typing:
tvscl, median(img,5) GT T2 ; 0 < T2 < 255 for 8 bit images.
Playing around with the size of the median filter and the value of
T2, you may be able to create a mask that filter out the streaks and
let you only the large spots.

If it doesn't seem clear, please ask

Jérôme
Re: CCD saturation [message #63118 is a reply to message #63022] Mon, 27 October 2008 06:27 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Wox wrote:
> Marshall Perrin wrote:
>
>> Shape detection is not the way to go here, versus detecting the level
>> at which pixels saturate. There should be some characteristic number of
>> counts per pixel below which you know data is not saturated.
>
> Yes, but this only works for the inner part of a saturated spot +
> streaks. The edges don't have a value of 65535 (it's a 16bit CCD
> camera) and can in fact have a lower value than non-saturated spots
> which I want to preserve.

Does the CCD really behaves this way? Seems pretty bad if
saturation is spread around that way... Are you sure it is not stray
light?

Paolo

That's why I could only think of shape
> detection to differ streaks from spots. However I'm not really able to
> do that. I usually remove a lot of non-saturated spots too.
>
> The problem I want to solve is illustrated here (X-ray Powder
> Diffraction): http://www.datasqueezesoftware.com/screenbig.jpg
> You see the so-called Debye rings in the image in the background and
> the azimuthally integrated pattern in the front. Usually you don't see
> this nice rings, but alot of spots forming a ring (or more rings).
> Imagine azimuthally integrating this when some spots are saturated
> with streaking. You don't end up with nice Gaussian peaks like in the
> figure, but some strange ..euhm.. things... that may look like peaks.
> If I could just detect the streaks and set these pixels to zero, I
> solved the problem.
>
> Since there are alot of astronomers here, I would think they also have
> similar problems to solve, only their spots are not scattered X-ray
> beams but stars :-).
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Workbench Epiphany--Or Something
Next Topic: DEPTH_TEST_FUNCTION, DEPTH_TEST_DISABLE properties (send an object to back)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:34:59 PDT 2025

Total time taken to generate the page: 0.00594 seconds