[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Focus indication
Thanks Michael,
I wasn't considering the first method since I had gone to great lengths (~15
lines of code :-) ) to calculate the centroid. I didn't immediately want to
throw away those hard 10ths of a pixel. But, I noticed on a at least one
star, the centroid shifted more that a pixel away from my max value, so
assuming that was correct, the centroid is still useful.
Would there be any intrinsic value in presenting FWHMx and FWHMy?
Presumably, there would only be a significant difference during scope setup,
when it might not be aligned. I could possibly use the FWHM x,y to filter
out bad/non stars, provided the majority were symmetrical.
Thanks,
Rob
> -----Original Message-----
> From: Stupendous Man [mailto:richmond@a188-l009.rit.edu]
> Sent: Wednesday, August 01, 2001 3:40 PM
> To: Creager, Robert S; tass@listserv.wwa.com
> Cc: mwrsps@rit.edu
> Subject: RE: Focus indication
>
>
>
> Rob asked:
>
> > I have the centroid, but am unsure on the interpolation
> from the centroid to
> > calculate the FWHM. Theoretically, I believe I should fit
> a gaussian to the
> > marginal sums (x and y, from star pixels only). Is this
> the only way, the
> > wrong way, or is there a simpler way? Strongly looking for
> the simpler
> > way...
>
> Simple way:
>
> - round centroid to integer (row, col)
> - define "peak value" as the value of pixel at (row, col)
> (after subtracting background)
> - walk down rows in the negative direction until you reach
> a pixel with half the peak.
> Call this distance in pixels "d1"
> - walk up rows in the positive direction until you reach
> a pixel with half the peak
> Call this distance in pixels "d2"
> - walk down cols in the negative direction until you reach
> a pixel with half the peak.
> Call this distance in pixels "d3"
> - walk up cols in the positive direction until you reach
> a pixel with half the peak
> Call this distance in pixels "d4"
>
> - calculate
> FWHM = (d1 + d2 + d3 + d4) / 2
>
> Complicated way:
>
> - form the marginal sums in the row and column direction
> - fit a gaussian to the 1-D marginal sum in row direction
> Set "d1" = 2.35*sigma of gaussian
> - fit a gaussian to the 1-D marginal sum in col direction
> Set "d2" = 2.35*sigma of gaussian
>
> - calculate
> FWHM = (d1 + d2) / 2
>
>
> The first way is really easy and really fast. Don't forget to
> subtract the background from all pixels before starting, though.
>
> Michael Richmond
>