CFwhm:new


The new method constructs a new instance of a CFwhm object. The CFwhm class includes properties that control calculation of a FWHM value and its centroid position. Two different constructor overloads are available to create a new CFwhm and initialize the properties.

Syntax

F = CFwhm:new()

bullet.gif    Creates a default CFwhm F with properties initialized to default values.

F = CFwhm:new( CFwhm_old )

bullet.gif    This is a copy constructor. It creates a new CFwhm F initialized to the properties of the existing CFwhm object CFwhm_old.

bullet.gif    On failure, nil is returned.

Remarks

Two overloads are provided for the CFwhm class. They create a default CFwhm and a copy of a CFwhm. If you pass something other than nil or another CFwhm, the default constructor is used.

Example

The following script illustrates using both constructors. All produce the same result:

F1 = CFwhm:new()

-- create CFwhm object F1

F1:SetSign(false)

-- change the sign from the default true

F2 = CFwhm:new( F1 )

-- copy F1 to a new CFwhm object F2

Printf("F1 sign = %d", F1:GetSign() )

-- result: F1 sign = 0

Printf("F2 sign = %d", F2:GetSign() )

-- result: F2 sign = 0

Related Topics

CFwhm Class, delete, new_fwhm


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