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.
F = new_fwhm()
F is returned as a new CFwhm object initialized to default values.
F = new_fwhm( CFwhm_old )
This is a copy constructor. F is returned as a new CFwhm object initialized to the properties of the existing object CFwhm_old.
On failure, nil is returned.
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.
The following script illustrates using both constructors. All produce the same result:
|
-- create a CFwhm object F1 |
|
-- change the sign from the default true |
|
-- copy F1 to a new CFwhm F2 |
|
-- result: F1 sign = 0 |
|
-- result: F2 sign = 0 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.