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.
bResult = CImage:SubBiasRef( sRefKwd, pixel_type=nil ) |
sRefKwd is a string specifying the header keyword containing the bias value.
The optional pixel_type specifies the output pixel type as a number or string.
On success, this method returns true.
On failure, false. is returned.
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.
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:
|
-- create a new CImage |
|
-- load the image from file sPath |
|
-- perform the operation on image I |
|
-- save the result |
|
|
CImage class, SubBiasVal, SubBiasFrame
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.