CImage:SubBiasFrame CImage:SubBiasVal

CImage:SubBiasRef


The SubBiasRef method subtracts a bias reference value from the current image. The bias value is stored in a header keyword and is referenced by passing the keyword name as an argument. The result replaces the current image.

Syntax

bResult = CImage:SubBiasRef( sRefKwd, pixel_type=nil )

bullet.gif    sRefKwd is a string specifying the header keyword containing the bias value.

bullet.gif    The optional pixel_type specifies the output pixel type as a number or string.

bullet.gif    On success, this method returns true.

bullet.gif    On failure, false. is returned.

Remarks

This method applies a bias value correction to the image. The current method differs from SubBiasVal in that the bias value is obtained indirectly from the value of a header keyword. This allows the bias correction value to be different for each image. The keyword used for the reference bias is not standardized but some common names are REFBIAS, BIASREF, and ERASE.

The method updates the image header with the appropriate history and other keywords. The pixel type of the image may also be changed as part of the correction, for example, to increase the precision of the bias removal procedure.

Example

The following script loads an image and subtracts a reference bias value stored in the REFBIAS keyword in the image header. The output pixel type is changed to "float" to maintain the precision of the correction process:

I = new_image()

-- create a new CImage

I:Open(sPath1)

-- load the image from file sPath

I:SubBiasRef("REFBIAS","float")

-- perform the operation on image I

I:Save()

 -- save the result

I:delete()

 

Related Topics

CImage class, SubBiasVal, SubBiasFrame


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