ImExtractParams Table


The ImExtractParams table contains properties for controlling the CImExtract class. This table is passed to the CImExtract object when created using thenew_imextract() function or the CImExtract: new method. After creation, you can update any or all properties using SetParams to pass a CourseExtParams table to the object. Only the properties you specify are changed.

The CImExtract method is initialized with a default set of properties, as listed in the table below.

bullet.gif    To set any properties to non-default values at creation time, pass the ImExtractParams table to new_imextract or CImExtract:new.

bullet.gif    To change any of the properties after creation, set the target property names and values in an ImExtractParams table and pass it to CImExtract:SetParams. Only the properties in the table are updated.

The table below describes the properties of the ImExtractParams. These default values are used when a CImExtract object is created.

Property

Default

Description

 Processing Flags

 

 

bProcBackground

true

Set this flag true to determine the background value. Also set the Background Properties below.

bProcDetect

true

Set this flag true to control the comparison between source pixels and the background. Also set the Detection Properties below.

bProcFilter

true

Set this flag true to filter the raw list of detected sources to include only sources with certain properties in the final list. Also set the Filter Properties below.

bProcPostProc

false

Set this flag true to control the post-processing steps used in the analysis of extracted sources. Also set the PostProc Properties below.

 

 

 

 General Properties

 

 

bProcVerbose

true

Set this flag true to provide verbose output during the extraction process.

nProcGotoZoom

8

Set this flag true to set the zoom value when using the "goto" function from the results grid.

bProcWordwrap

false

Set this flag true to use wordwrap in the text editor where the extraction results are listed.

sProcReportSize

"500,250"

Set this string to the width and height of the report grid where results are listed. See the format shown in the default value at right.

nProcOutputMode

0

Selects the location where extraction results are displayed:

  0: No output

  1: Send to a report window

  2: Send to a text file

bProcRenumber

false

Set this flag true to renumber sources remaining after source rejection from the filtering stage.

 

 

 

 Background Properties 

 

 

bProcUseCursor

false

Controls whether the source exctraction is performed within the cursor rectangle (used when script is lauched from a CImageView).

nBgStatsEdge

2

Percent of the image to avoid.

nBgMethod

0

Selects the method for calculating the background:

  0: nBgMethodSigma

  1: nBgMethodPoly

  2: nBgMethodValue

nBgCoefsX

1

Coefficients of the background fit in the x direction. This is limited to the range 1 through 10.

nBgCoefsY

1

Coefficients of the background fit in the y direction.This is limited to the range 1 through 10.

nBgSampleX

24

Number of background samples in the x direction. This is limited to the range 1 through 24.

nBgSampleY

24

Number of background samples in the y direction. This is limited to the range 1 through 24.

bBgUseRegion

false

Controls whether the background is fit inside a rectangle.

nBgValue

0

Specifies the background value when using nBgMethod = 2.

 

 

 

 Detection Properties

nDetectTest

0

A number that selects the method used to identify pixel values for inclusion in the source. Choose one of the following options for nDetectTest:

  0: Pixel >= threshold value.

  1: Pixel <= threshold value.

  2: Pixel == threshold value.

  3: Pixel ~= threshold value.

nDetectMaxSources

65535

The maximum number of sources to be allowed. This is limited to the range 1 through 100,000.

nDetectUnits

0

Selects the units used for detecting sources above the background:

  0: nDetectUnitsSigmas

  1: nDetectUnitsCounts

nDetectSigmas

10

Threshold signal for the source above the background value, measured in sigmas of the background noise. This is the number k, for k-sigma clipping. The value sigma (the background noise) is computed. If the background value is specified using nBgMethod = 2, both values are ignored.

nDetectCounts

50

Threshold signal for the source above background noise, measured in "counts" (or DN).

nDetectMinX

1

Minimum x coordinate (columns) for source detection.

nDetectMaxX

2

 Maximum x coordinate (columns) for source detection.

nDetectMinY

1

 Minimum y coordinate (rows) for source detection.

nDetectMaxY

2

 Maximum y coordinate (rows) for source detection.

 

 

 

 Filtering Properties

bFilterUseAreaMin

true

Set true fo filter by minimum source area.

nFilterAreaMin

1

Minimum source area, in pixels.

bFilterUseAreaMax

false

Set true fo filter by maximum source area.

nFilterAreaMax

100

 Maximum source area, in pixels.

bFilterUsePeakLumMin

false

Set true fo filter by minimum source luminosity.

nFilterPeakLumMin

0

Minimum source luminosity in "counts" or DN.

bFilterUsePeakLumMax

false

Set true fo filter by maximum source luminosity.

nFilterPeakLumMax

100

Maximum source luminosity in "counts" (or DN).

bFilterUseEllipticityMin

false

Set true fo filter by minimum source ellipticity.

nFilterEllipticityMin

0

Minimum source ellipticity, 0 = circular.

bFilterUseEllipticityMax

true

Set true fo filter by maximum source ellipticity.

nFilterEllipticityMax

0.3

Maximum source ellipticity, up to 0.999.

bFilterUseSepMin

false

Set true fo filter by minimum source separation.

nFilterSepMin

5

Minimum separation of source centers, in pixels.

nFilterSepMinMethod

0

Selects the method used to remove sources that are too closely spaced according to the value of nFilterSepMin.

Note: Options 1 and 2 depend on the additional property nFilterSepMinCompare.

  0: Both sources are discarded.

  1: The greater source is discarded.

  2: The lesser source is discarded.

  3: The next detected source is discarded.

nFilterSepMinCompare

0

Selects the comparison used for nFilterSepMinMethod = 1 or 2:

  0: Total Luminosity

  1: Net Luminosity

  2: Area

  3: Maximum Value

  4: Ellipticity

  5: Kurtosis

  6: Standard Deviation

nFilterEdgeMinPixels

5

Minimum number of pixels for the source center from the image edge.

 

 

 

PostProc Properties

 

 

bPostProcSplit

false

Currently unused

bPostProcCentroid

false

Currently unused

bPostProcFwhm

false

Currently unused

bPostProcApphot

false

Currently unused

bPostProcDetectVar

false

Currently unused

Example

The script below changes 5 properties from their prior values. Note that you must use commas afer table values. Also, the boolean value true is euivalent to 1. The list() function is used after creation and after updating to show all the properties:

 

M = new_imextract()

-- create a new CImExtract object

list(M)

-- list all the CImExtract properties

-- do something with M

 

ImExtractParams =

-- declare the properties to change

{

 

  bProcFilter = true,

 

  bFilterUseAreaMin = true,

 

  nFilterAreaMin = 12,

 

  bFilterUseEllipticityMax = true,

 

  nFilterEllipticityMax = 0.3,

 

}

 

M:SetParams( ImExtractParams )

-- change a few parameters

list(M)

-- list the new CImExtract properties

M:Extract()

-- run the ImExtract pipeline

Related Topics

CImExtract class, new, new_imextract, SetParams, Source Properties Table


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.