|Description||ODi = log10( X0i/Xi ) for (X0i >= ODThresh0 && Xi >= ODThresh),
ODi = 0.0 otherwise
The "optical density" is calculated for positive, non-zero input numbers. By default, ODThresh and ODThresh0 are 0.001 for the versions with floating-point input vectors (VF_OD, VD_OD, and VE_OD), and 1 for the versions with unsigned-integer input vectors.
The typical application of these functions would be an absorption measurement with a spectrometer, where each element of X corresponds to the light intensity at one specific wavelength, transmitted through the sample, and each element of X0 corresponds to the light intensity measured through air or through a reference sample. Normally, the intensity data will have been digitized with 12-bit or 16-bit precision. In this case, VUS_ODtoF or VUS_ODtoD will be the appropriate functions. For the rare cases of 8-bit or higher than 16-bit digitization, use the VUB_ or VUL_ versions.
You might wish to accumulate several measurements before calculating the OD. For example, repeated measurements in a usVector may be accumulated into a ulVector by VUL_accVUS, before the OD is calculated by VUL_ODtoD. Similarly, you might accumulate 32-bit data into a qiVector by VQI_accVUL and call then, e.g., VQI_ODtoE.
In order to cut off experimental noise, the input-number threshold below which the OD is corrected to 0.0 may be set to arbitrary positive values by VF_setODThresh, VUS_setODThresh, etc.
If background values have to be taken into account, please use the functions of the VF_ODwDark family.