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, datatype=nil )

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

    The optional datatype specifies the output data type as a number or string.

    On success, this method returns true.

    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 data 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 fragment loads an image and subtracts a reference bias value stored in the REFBIAS keyword in the image header. The output data type is changed to "float" to maintain the precision of the correction process:

 

I = CImage:new()

-- 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, SubBiasVal, SubBiasFrame