new_fwhm


The new_fwhm function is a non-class version of the CFwhm:new method which creates and returns a new 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 = new_fwhm()

bullet.gif    F is returned as a new CFwhm object initialized to default values.

F = new_fwhm( CFwhm_old )

bullet.gif    This is a copy constructor. F is returned as a new CFwhm object initialized to the properties of the existing 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—such as a string—then the default constructor is used.

Example

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

F1 = new_fwhm()

-- create a CFwhm object F1

F1:SetSign(false)

-- change the sign from the default true

F2 = new_fwhm( F1 )

-- copy F1 to a new CFwhm 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, new, delete


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