CImExtract Class Description


The CImExtract class manages the detection and extraction of properties for separated sources in an image. See the Mira User's Guide for more information under the main topic Extracting Sources from Images.

The CImExtract class is controlled by numerous properties that can be customized using the ImExtractParams table. One difference with Mira's interactive MExtract package in Mira is that the CImExtract class does not require a displayed image and does not perform post-processing, as post-processing analysis can be accomplished using other script classes such as CCentroid, CFwhm, CApphot. Furthermore, the source properties from scripted extraction are not listed in a measurement table. Sources identified using the scripted CImExtract object are retrieved using GetSource, after which they may be further analyzed. For example, to list or tabulate them, use the CTextView or CGridView class.

Overview of the Source Extraction Process

The source extraction process generally proceeds as follows:

bullet.gif    Create a new CImExtract class object using new_imextract or the new constructor.

bullet.gif    Configure the source extraction process using the SetParams method or set specific extraction properties individually. The configuration is exposed in members of the ImExtractParams table. The contents of the ImExtractParams table may be copied from one CImExtract object to another using the Copy method.

bullet.gif    Use the Extract method to extract all sources from the image. This creates an internal list of sources. The number of sources detected is returned by the Count method.

bullet.gif    Use GetSource to retrieve the properties of each source. The source's properties are returned as members of a Source Properties table.

Source Detection Strategy

For each source, image pixels are tested relative to a specified threshold value using a comparison such as > or >=. If the pixel passes the test, it is included in the source. As each source is processed, two versions of the pixel value are accrued in the source properties: 1) the net pixel value above the background, and 2) the raw pixel value relative to zero. After processing, the integrated net luminosity above background is given by nLum, and the integrated raw pixel value is given by nTotalLum. The background value may be specified or calculated. All calculations of source properties involving the luminosity are based on nLum, the value relative to the background.

Class Properties

ImExtractParams table

Source extraction uses the Extract method which is itself driven by a large number of class properties. These properties are accessed directly using the dot operator (as opposed to class methods, which are accessed using the colon operator).

Source Properties table

The GetSource method returns a table of extracted properties for a specified source.

Usage

Construction

Object = new_imextract()

Object = CImExtract:new()

Destruction

Object:delete()

Creation - Non-class Functions

This function is normally used to create a new CImExtract object as an alternative to the class-based new method.

new_imextract

Creates a new instance of the CImExtract class.

Construction and Destruction - Class Methods

new

Creates a new instance of the CImExtract class. Various constructors are available.

delete

Deletes the instance of the CImExtract object.

Operations

Copy

Copies this CImExtract to a new CImExtract

Count

Returns the number of sources extracted from the CImage.

Extract

Extracts sources from the image based on the CImExtract class properties. The properties of all extracted sources are stored in the CImExtract class object and may be retrieved using the GetSource method.

GetSource

Returns a 1-dimensional array containing the properties of an extracted source identified by its index in the range 1 through Count. The source properties are returned in a Source Properties table.

SetParams

Sets selected CImExtract properties to those in an ImExtractParams table.

Related Topics

Contents, Script Classes, ImExtractParams Table, Source Properties Table


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