1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
.help starfind May97 images.imcoords
.ih
NAME
starfind -- automatically detect stellar objects in a list of images
.ih
USAGE
starfind image output hwhmpsf threshold
.ih
PARAMETERS
.ls image
The list of input images. The input images must be two-dimensional.
.le
.ls output
The list of output object files. The number of output files must equal the
number of input images. If output is "default", or "dir$default", or a
directory specification then a default name of the form
dir$root.extension.version is constructed, where dir$ is the directory name,
root is the root image name, extension is "obj", and version is the next
available version number.
.le
.ls hwhmpsf
The half-width half-maximum of the image PSF in pixels.
.le
.ls threshold
The detection threshold above local background in ADU.
.le
.ls datamin = INDEF, datamax = INDEF
The minimum and maximum good data values in ADU. Datamin and datamax
default to the constants -MAX_REAL and MAX_REAL respectively.
.le
.ls fradius = 2.5 (hwhmpsf)
The fitting radius in units of hwhmpsf. Fradius defines the size
of the Gaussian kernel used to compute the density enhancement image, and
the size of the image region used to do the moment analysis.
.le
.ls sepmin = 5.0 (hwhmpsf)
The minimum separation for detected objects in units of hwhmpsf.
.le
.ls npixmin = 5
The minimum area of the detected objects in pixels.
.le
.ls maglo = INDEF, maghi = INDEF
The minimum and maximum magnitudes of the detected objects. Maglo and maghi
default to the constants -MAX_REAL and MAX_REAL respectively.
.le
.ls roundlo = 0.0, roundhi = 0.2
The minimum and maximum ellipticity values of the detected objects, where
ellipticity is defined as 1 - b / a, and a and b are the semi-major and
semi-minor axis lengths respectively.
.le
.ls sharplo = 0.5, sharphi = 2.0
The minimum and maximum sharpness values of the detected objects, where
sharpness is defined to be the ratio of the object size to the
hwhmpsf parameter value.
.le
.ls wcs = ""
The world coordinate system. The options are:
.ls " "
The world coordinate system is undefined. Only logical (pixel) coordinates
are printed.
.le
.ls logical
The world coordinate system is the same as the logical (pixel) coordinate
system, but two sets of identical logical (pixel) coordinates are printed.
.le
.ls physical
The world coordinate system is the same as the logical (pixel) coordinate
system of the parent image if any.
.le
.ls world
The world coordinate system of the image if any.
.le
.le
.ls wxformat = "", wyformat = ""
The output format for the x and y axis world coordinates. If wxformat and
wyformat are undefined then: 1) the value of the wcs format attribute is
used if the output wcs is "world" and the attribute is defined, 2) "%9.3f"
is used if the output wcs is "logical" or "physical", and "%11.8g" is used
if the output wcs is "world". If the input image is a sky projection image and
the x and y axes are ra and dec respectively, then the formats "%12.2H" and
"%12.1h" will print the world coordinates in hours and degrees respectively.
.le
.ls boundary = "nearest"
The boundary extension type. The choices are:
.ls nearest
Use the value of the nearest boundary pixel.
.le
.ls constant
Use a constant value.
.le
.ls reflect
Generate a value by reflecting around the boundary.
.le
.ls wrap
Generate a value by wrapping around to the other side of the image.
.le
.le
.ls constant = 0.0
The constant for constant boundary extension.
.le
.ls nxblock = INDEF, nyblock = 256
The working block size. If undefined nxblock and nyblock default
to the number of columns and rows in the input image respectively.
.le
.ls verbose = no
Print messages about the progress of the task ?
.le
.ih
DESCRIPTION
STARFIND searches the input images \fIimage\fR for local density maxima
with half-widths at half-maxima of ~ \fIhwhmpsf\fR and peak amplitudes
greater than ~ \fIthreshold\fR above the local background, and writes
the list of detected objects to \fIoutput\fR.
STARFIND is a modified version of the DAOPHOT package DAOFIND algorithm.
However STARFIND is intended for use with the IMAGES package image matching
and image coordinates tasks and is therefore configured somewhat differently
than the version used in the photometry packages.
.ih
ALGORITHMS
STARFIND assumes that the point spread function can be approximated by a radial
Gaussian function whose sigma is 0.84932 * \fIhwhmpsf\fR pixels. STARFIND uses
this model to construct a convolution kernel which is truncated at
max (2.0, \fIfradius * hwhmpsf\fR) pixels and normalized to zero power.
For each point in the image density enhancement values are computed by
convolving the input image with the radial Gaussian function. This operation
is mathematically equivalent to fitting the image data at each point, in the
least-squares sense, with a truncated, lowered, radial Gaussian function.
After the convolution each density enhancement value is an estimate of
the amplitude of the best fitting radial Gaussian function at that point.
If \fIdatamin\fR and \fIdatamax\fR are defined then bad data is ignored,
i.e. rejected from the fit, during the computation of the density enhancement
values. Out of bounds image pixels are evaluated using the boundary extension
algorithm parameters \fIboundary\fR and \fIconstant\fR. Out of
bounds density enhancement values are set to zero.
After the convolution, STARFIND steps through the density enhancement
image searching for density enhancements greater then \fIthreshold\fR
and brighter than any density enhancements within a radius of
\fIsepmin * hwhmpsf\fR pixels. For each potential detection the
local background is estimated and used, along with the values of
\fIdatamin\fR and \fIdatamax\fR, to estimate the position (Xc and Yc),
size (Area and Hwhm), shape (E and Sharp), orientation (Pa), and
brightness (Mag) of each object using the second order moments analysis
shown below.
.nf
I0 = sum (I)
N = sum (1.0)
if (N <= 0)
Sky = maxdata - maxden
else
Sky = I0 / N
M0 = sum (I - Sky)
Mx = sum (X * (I - Sky))
My = sum (Y * (I - Sky))
Xc = Mx / M0
Xc = My / M0
Mag = -2.5 * log10 (M0)
Area = N
Mxx = sum ((X - Xc) * (X - Xc) * (I - Sky))
Mxy = sum ((X - Xc) * (Y - Yc) * (I - Sky))
Myy = sum ((Y - Yc) * (Y - Yc) * (I - Sky))
Hwhm = sqrt (log (2) * (Mxx + Myy))
E = sqrt ((Mxx - Myy) ** 2 + 4 * Mxy ** 2) / (Mxx + Myy))
Pa = 0.5 * atan (2 * Mxy / (Mxx - Myy))
Sharp = Hmhw / Hwhmpsf
.fi
The sums are computed using pixels which lie within \fIfradius * hwhmpsf\fR of
the maximum density enhancement, and whose values are within the good data
limits defined by \fIdatamin\fR and \fIdatamax\fR, and which are above the local
background estimate (Sky).
Objects whose magnitude, roundness, and sharpness characteristics are outside
the values defined by \fImaglo\fR, \fImaghi\fR, \fIroundlo\fR, \fIroundhi\fR,
\fIsharplo\fR, and \fIsharphi\fR and whose total areas is less than
\fInpixmin\fR pixels are rejected from the list.
If \fIwcs\fR parameter is defined, the world coordinates as well as
the pixel coordinates of the detected objects are computed and printed
using the formats defined by \fIwxformat\fR and \fIwyformat\fR.
To minimize the memory requirements and increase efficiency, STARFIND
is configured to operate on data blocks that are \fInxblock * nyblock\fR
in size. To keep the image i/o operation to a minimum nxblock is set
to INDEF and defaults to the number of columns in the input image.
Setting both parameter to INDEF will force STARFIND to perform the
whole operation in memory.
.ih
FORMATS
.nf
b boolean (YES or NO)
c single character (c or '\c' or '\0nnn')
d decimal integer
e exponential format (D specifies the precision)
f fixed format (D specifies the number of decimal places)
g general format (D specifies the precision)
h hms format (hh:mm:ss.ss, D = no. decimal places)
m minutes, seconds (or hours, minutes) (mm:ss.ss)
o octal integer
rN convert integer in any radix N
s string (D field specifies max chars to print)
t advance To column given as field W
u unsigned decimal integer
w output the number of spaces given by field W
x hexadecimal integer
z complex format (r,r) (D = precision)
Conventions for w (field width) specification:
W = n right justify in field of N characters, blank fill
-n left justify in field of N characters, blank fill
0n zero fill at left (only if right justified)
absent, 0 use as much space as needed (D field sets precision)
Escape sequences (e.g. "\n" for newline):
\b backspace (not implemented)
\f formfeed
\n newline (crlf)
\r carriage return
\t tab
\" string delimiter character
\' character constant delimiter character
\\ backslash character
\nnn octal value of character
Examples
%s format a string using as much space as required
%-10s left justify a string in a field of 10 characters
%-10.10s left justify and truncate a string in a field of 10 characters
%10s right justify a string in a field of 10 characters
%10.10s right justify and truncate a string in a field of 10 characters
%7.3f print a real number right justified in floating point format
%-7.3f same as above but left justified
%15.7e print a real number right justified in exponential format
%-15.7e same as above but left justified
%12.5g print a real number right justified in general format
%-12.5g same as above but left justified
%h format as nn:nn:nn.n
%15h right justify nn:nn:nn.n in field of 15 characters
%-15h left justify nn:nn:nn.n in a field of 15 characters
%12.2h right justify nn:nn:nn.nn
%-12.2h left justify nn:nn:nn.nn
%H / by 15 and format as nn:nn:nn.n
%15H / by 15 and right justify nn:nn:nn.n in field of 15 characters
%-15H / by 15 and left justify nn:nn:nn.n in field of 15 characters
%12.2H / by 15 and right justify nn:nn:nn.nn
%-12.2H / by 15 and left justify nn:nn:nn.nn
\n insert a newline
.fi
.ih
EXAMPLES
1. Find stellar objects with peak values greater than 100 counts above
local background in the test image dev$wpix whose fwhm is ~2.5 pixels.
.nf
cl> starfind dev$wpix default 1.25 100.
cl> display dev$wpix 1 fi+
cl> tvmark 1 wpix.obj.1 col=204
.fi
2. Repeat the previous example but tell starfind to compute and print
world coordinates in hours and degrees as well as pixel coordinates.
.nf
cl> starfind dev$wpix default 1.25 100. wcs=world wxf="%12.2H"\
wyf="%12.1h"
cl> display dev$wpix 1 fi+
cl> tvmark 1 wpix.obj.1 col=204
.fi
.ih
TIME REQUIREMENTS
Starfind requires approximately 8 CPU seconds to search a 512 by 512
image using a 7 by 7 pixel convolution kernel (SPARCStation2).
.ih
BUGS
.ih
SEE ALSO
imcentroid, apphot.daofind, daophot.daofind
.endhelp
|