CFwhm:delete

CFwhm:new


The new method constructs a new instance of a CFwhm object. The CFwhm class includes data members 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 data members.

Syntax

F = CFwhm:new()

    Creates a default CFwhm F with data members initialized to default values.

F = CFwhm:new( CFwhm )

    This is a copy constructor. It creates a new CFwhm F initialized to the data members of the CFwhm argument. In place of CFwhm:, use the name of the actual object to be copied.

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—such as a string—then the default constructor is used.

Example

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

 

F1 = CFwhm:new()

-- create CFwhm A and set values

F1:SetSign(false)

-- change the default (true)

F2 = CFwhm:new( F1 )

-- copy A to a new CFwhm B

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

-- result: F1 sign = 0

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

-- result: F2 sign = 0

Related Topics

CFwhm, delete