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.
bSuccess = CImage:SubBiasRef( sRefKwd ) bSuccess = CImage:SubBiasRef( sRefKwd, datatype ) where |
sRefKwd is a string specifying the header keyword containing the bias value.
datatype specifies the output data type as a number or string.
bSuccess is the returned success code. On success it is true, otherwise false.
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.
The following script 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:
|
-- create a new CImage |
|
-- load the image from file sPath |
|
-- perform the operation on image I |
|
-- save the result |