Flucut: Difference between revisions
Jump to navigation
Jump to search
imported>Rasmus (→Purpose: Extended the purpose of the function) |
imported>Rasmus (→Inputs) |
||
Line 18: | Line 18: | ||
<br> | <br> | ||
'''NOTE''': The following inputs govern how data are set to missing and zero. | '''NOTE''': The following inputs govern how data are set to missing and zero. | ||
: '''Rayl1''' is used to account for first | : '''Rayl1''' is used to account for first rder Rayleigh scatter, and | ||
: '''Rayl2''' is used to accound for second order scatter. | : '''Rayl2''' is used to accound for second order scatter. | ||
Revision as of 22:13, 24 September 2013
Purpose
Correct fluorescence EEM data. Removes Rayleigh (and possibly Raman) scattering by setting to missing, subtracts a blank to remove Raman and correct for inner filter effects.
Synopsis
- Xnew = flucut(X,Rayl1,Rayl2,options);
Description
FLUCUT inserts a mixture of NaN and 0 values outside the data area of interest in an EEM (Excitation-Emission Matrix). FLUCUT may also be used to generate weights that can be used for deweighting scatter areas.
Inputs
- X = DataSet object containing an array of EEMs. (X) is size IxJxK, where I is number of samples, J emissions and K excitations. (X) must be a DataSet object with appropriate axisscales: X.axisscale{2} corresponds to emissions (emi) in nm and X.axisscale{3} corresponds to excitations (exci) in nm.
- Rayl1 = 1 or 2 element vector describing filtering of the band about the Rayleigh line (the 1:1 line where emission=excitation) (Rayl1(1)) [nm]: defines to how far ABOVE the 1:1 Rayleigh line to mark as "missing" (i.e. NaN) in each emission spectrum. All emission wavelengths shorter than this value will be marked as missing (down to Ex-Rayl1(2)) (Rayl1(2)) [nm]: defines how far BELOW the 1:1 Rayleigh line to mark as missing. If omitted, all emission wavelengths lower than ex+Rayl1(1) will be marked as missing. If Rayl1==NaN, then it is not used. Zeros set by the LowZero option (see below) supercede the (Rayl1(2)) missing setting.
- Rayl2 = 1 or 2 element vector to describe the band about emis==2*exci. Usage is similar to (Rayl1).
NOTE: In general, for all the above, setting the input to NaN, implies that the functionality is not imposed.
NOTE: The following inputs govern how data are set to missing and zero.
- Rayl1 is used to account for first rder Rayleigh scatter, and
- Rayl2 is used to accound for second order scatter.
Outputs
- Xnew = New X-array with inserted NaN (for missing) and 0-values. Columns with only missing values are removed.
Options
options = a structure array with the following fields:
- LowZero: [ {'off'} | 'on' ]: If 'on', the values below Rayleigh are set to zero. Zeros well below Rayleigh are better than missing values and stabilizes the model. It can lead to bias and artifacts if the zeros are too close to the Rayleigh scatter ridge.
- TopZero: [ {'off'} | 'on' ]: If 'on', the values above the 2nd order Rayleigh are set to zero.
- Blank: If the option Blank is set to an integer, the corresponding sample will be assumed to be a blank (e.g. water). The sample will be subtracted from all the remaining samples and the blank itself will be soft-deleted (so that it is not used for fitting the model).
- RamanCorrect: [ {'off'} | 'on' ]. Set to one in order to also remove first order Raman scattering.
- RamanWitdh: [10] Width in nanometers that should be removed above and below the Raman scattering.
- RamanShift: [3600] Raman shift (in wavenumbers) at which a solvent band should be expected and removed. Default is for the primary Raman water band. Alternatives are Hexane: 2990; THF: 3000; Methanol: 3090; Isopropanol: 3050
- MakeWts: [ {'off'} | 'on' ] If 'on', weights will be given that can be used to downweight areas of scatter e.g., in PARAFAC models. The weights will be held in the output dataset field 'userdata'. {default = 'off', do not make weights}
- RemoveMissing: [ {'off'} | 'on' ]. Governs removal of wavelengths which contain only missing data (all data removed).
- plots: [ 'off' | {'on'} ], governs level of plotting.
Example
load dorrit Xnew = flucut(EEM,20,[20 20]);