The returned table can be either a numerically
indexed table (array) or a keyed table using the property names.
For example, if the table returned by
GetSource is named obj,
then the center X coordinate is given by either obj.nCenterX or obj[11]. The return type for the Source Properties
table (indexed table or keyed table) is controlled by the
bUseIndex flag in the call to
GetSource. If bUseIndex
is omitted or false, a keyed table is
returned containing named properties. If bUseIndex=true, then an indexed table is returned.
In the table below, the property index is listed under the heading
Index. The property name is listed
under the heading Name.
|
Index
|
Name
|
Description
|
|
1
|
nDetectThreshold
|
The threshold number of sigmas above true
background used for detecting the source.
|
|
2
|
nBackground
|
The threshold luminosity value used for detecting
the source, a number for the .
|
|
3
|
nBackgroundLocal
|
The local background value near the source,
calculated using dThreshold sigmas above the local true
background.
|
|
4
|
nArea
|
The source area, in pixels.
|
|
5
|
nTotalLum
|
The total luminosity of the source relative to a
pixel value of zero.
|
|
6
|
nNetLum
|
The net luminosity of the source above the
background value, nBackground.
|
|
7
|
nAvgLum
|
The average luminosity of the source above the
background value, nBackground.
|
|
8
|
nLumStdDev
|
The standard deviation in luminosity above the
background value, nBackground.
|
|
9
|
nMinVal
|
The minimum pixel value in the source.
|
|
10
|
nMaxVal
|
The maximum pixel value in the source.
|
|
11
|
nCenterX
|
The luminosity weighted x-coordinate of the
source.
|
|
12
|
nCenterY
|
The luminosity weighted y-coordinate of the
source.
|
|
13
|
nCenterWorldX
|
The luminosity weighted world x-coordinate of the
source.
|
|
14
|
nCenterWorldY
|
The luminosity weighted world y-coordinate of the
source.
|
|
15
|
nMag
|
The astronomical magnitude of the source.
|
|
16
|
nMagErr
|
The empirical (measured) uncertainty in the
astronomical magnitude of the source.
|
|
17
|
nMagErrT
|
The theoretical (calculated) uncertainty in the
astronomical magnitude of the source.
|
|
18
|
nNetCount
|
The net count of the source above background.
|
|
19
|
nSNR
|
The signal to noise ratio of the source.
|
|
20
|
nRadiusGyration
|
The radius of gyration of the source.
|
|
21
|
nMajorAxis
|
The major axis length, a, of the
source.
|
|
22
|
nMinorAxis
|
The minor axis length, b, of the
source.
|
|
23
|
nEllipticity
|
The ellipticity of the source, in terms of
1-b/a.
|
|
24
|
nAngle
|
The angle of the major axis of the source,
relative to the positive x-axis.
|
|
25
|
nPeakiness
|
The peakiness index of the source.
|
|
26
|
nConcentrationIndex
|
The concentration index of the source.
|
|
27
|
nEffectiveDiameter
|
The weighted diameter of the source.
|
|
28
|
nSkewnessX
|
The source skewness as a statistical measure of
profile symmetry in the x-coordinate direction.
|
|
29
|
nSkewnessY
|
The source skewness as a statistical measure of
profile symmetry in the y-coordinate direction.
|
|
30
|
nKurtosis
|
The source kurtosis as a statistical measure of
flatness.
|
|
31
|
nFwhm
|
The FWHM of the source from the profile fit.
|
|
32
|
nFwhmPeak
|
The FWHM peak value from the profile fit.
|
|
33
|
nFwhmBg
|
The background level of the source from the
profile fit.
|
|
34
|
iIndex
|
The numeric index of the detected source. Holes
appear in the original sequence of indices when sources are merged
and the secondary source is eliminated as a separate entity. This
is an integer value.
|
|
35
|
iMinX
|
The minimum x-coordinate (column number) of the
source above background. This is an integer value.
|
|
36
|
iMaxX
|
The maximum x-coordinate (column number) of the
source above background. This is an integer value.
|
|
37
|
iMinY
|
The minimum y-coordinate (row number) of the
source above background. This is an integer value.
|
|
38
|
iMaxY
|
The maximum y-coordinate (row number) of the
source above background. This is an integer value.
|
|
39
|
iXatMinY
|
The x-coordinate (column number) at the minimum
y-coordinate (row number) of the source above background. This is
an integer value.
|
|
40
|
iXatMaxY
|
The x-coordinate (column number) at the maximum
y-coordinate (row number) of the source above background. This is
an integer value.
|
|
41
|
iYatMinX
|
The y-coordinate (row number) at the minimum
x-coordinate (column number) of the source above background. This
is an integer value.
|
|
42
|
iYatMaxX
|
The y-coordinate (row number) at the maximum
x-coordinate (column number) of the source above background. This
is an integer value.
|
|
43
|
iXatMinLum
|
The x-coordinate (column number) at the minimum
luminosity of the source above background. This is an integer
value.
|
|
44
|
iXatMaxLum
|
The x-coordinate (column number) at the maximum
luminosity of the source above background. This is an integer
value.
|
|
45
|
iYatMinLum
|
The y-coordinate (row number) at the minimum
luminosity of the source above background. This is an integer
value.
|
|
46
|
iYatMaxLum
|
The y-coordinate (row number) at the maximum
luminosity of the source above background. This is an integer
value.
|
|
47
|
iFirstX
|
The first x-coordinate (lowest column number) at
the start of the source. This is an integer value.
|
|
48
|
iFirstY
|
The first y-coordinate (lowest row number) at the
start of the source. This is an integer value.
|
|
49
|
nDetectThreshold2
|
Currently unused.
|
Suppose an image window exists on the Mira screen.
The script below performs source extraction on an image from this
window and then repeatedly uses
GetSource to fetch the (x,y) coordinates from each
source's
Source Properties table.
|
V = attachlist_imageview()
|
|
|
Assert( V, "No image window")
|
|
|
|
|
|
I = V:GetImage()
|
|
|
Assert( I, "No image
selected")
|
|
|
|
|
|
E = new_imextract()
|
|
|
Params =
|
|
|
{
|
|
|
bProcFilter = true,
|
|
|
bFilterUseSepMin = true,
|
|
|
nFilterSepMin = 10,
|
|
|
bFilterUseAreaMax = true,
|
|
|
nFilterAreaMax=
100,
|
|
|
nBgMethod = 1,
|
|
|
nDetectTreshold = 45,
|
|
|
nDetectTest = 0,
|
|
|
}
|
|
|
E:SetParams(Params)
|
|
|
|
|
|
bOK = E:Extract( I )
|
|
|
if not bOK then Exit("Extract
failed.\n") end
|
|
|
|
|
|
|
|
|
nCount = E:Count()
|
|
|
if nCount < 1 then Exit("No
sources.\n") end
|
|
|
Printf("Number of sources = %d\n",
nCount)
|
|
|
|
|
|
|
|
|
for i = 1,nCount do
|
|
|
local Stbl =
E:GetSource(i)
|
|
|
Printf("[%d]:%lg,%lg\n",
i,Stbl.nCenterX,Stbl.nCenterY)
|
|
|
end
|
|
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.