Flucut: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
No edit summary
imported>Jeremy
No edit summary
Line 5: Line 5:
===Synopsis===
===Synopsis===


:Xnew = flucut(X,LowZero,LowMiss,TopZero,TopMiss,options);
:Xnew = flucut(X,LowMiss,TopMiss,options);


===Description===
===Description===
Line 15: Line 15:
* '''X''' = X-array of EEMs. X is size IxJxK, where I is number of samples, J emissions and K excitations. X has to be a DataSet object where the axisscales contain wavelengths where X.axisscale{2} corresponds to emissions (emi) in nm and X.axisscale{3} corresponds to excitations (exci) in nm.
* '''X''' = X-array of EEMs. X is size IxJxK, where I is number of samples, J emissions and K excitations. X has to be a DataSet object where the axisscales contain wavelengths where X.axisscale{2} corresponds to emissions (emi) in nm and X.axisscale{3} corresponds to excitations (exci) in nm.


* '''LowZero''' = Wavelength (nm): X(emi < exci-LowZero) are set to zero. Zeros here are good for speeding up, but can lead to artifacts if the zeros are too close to the emi==exci line. Use LowMiss.
* '''LowMiss''' = Wavelength (nm): the region where emi <= exci+LowMiss(1) are set to missing (i.e., NaN) to remove scatter. If LowMiss is a 2 element vector, then only the region down to emi >= exci-LowMiss(2) are also set to missing. However, the zeros set by the LowZero option supersede the missing setting.
* '''LowMiss''' = Wavelength (nm): the region where emi <= exci+LowMiss(1) are set to missing (i.e., NaN) to remove scatter. If LowMiss is a 2 element vector, then only the region down to emi >= exci-LowMiss(2) are also set to missing. However, the zeros set by LowZero supercede the missing setting.
* '''TopZero''' = nm above emi==2*exci which is set to zero {default is NaN meaning no zeros (to avoid second order signal to be biased to be zero)}.
* '''TopMiss''' = Similar to LowMiss but for emi==2*exci.
* '''TopMiss''' = Similar to LowMiss but for emi==2*exci.


Line 23: Line 21:
<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.
: '''LowZero''' and '''LowMiss''' are used to account for Rayleigh scatter, and
: '''LowMiss''' are used to account for Rayleigh scatter, and
: '''TopZero''' and '''TopMiss''' are used to accound for 2nd order scatter.
: '''TopMiss''' are used to accound for 2nd order scatter.


====Outputs====
====Outputs====
Line 32: Line 30:
''options'' =  a structure array with the following fields:
''options'' =  a structure array with the following fields:


* '''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}
* '''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. The can lead to artifacts if the zeros are too close.
* '''TopZeros''': [ {'off'} | 'on' ]: If 'on', the values above 2. order Rayleigh are set to zero.
* '''plots''': [ 'off' | {'on'} ], governs level of plotting.
* '''plots''': [ 'off' | {'on'} ], governs level of plotting.
* '''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}
 


===Example===
===Example===
Line 40: Line 41:
load dorrit
load dorrit


Xnew = flucut(EEM,20,[20 20],NaN,NaN);
Xnew = flucut(EEM,20,[20 20]);


</pre>
</pre>

Revision as of 09:35, 22 February 2013

Purpose

Remove scatter from fluorescence EEM data.

Synopsis

Xnew = flucut(X,LowMiss,TopMiss,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

  • first = first input is this.
  • X = X-array of EEMs. X is size IxJxK, where I is number of samples, J emissions and K excitations. X has to be a DataSet object where the axisscales contain wavelengths where X.axisscale{2} corresponds to emissions (emi) in nm and X.axisscale{3} corresponds to excitations (exci) in nm.
  • LowMiss = Wavelength (nm): the region where emi <= exci+LowMiss(1) are set to missing (i.e., NaN) to remove scatter. If LowMiss is a 2 element vector, then only the region down to emi >= exci-LowMiss(2) are also set to missing. However, the zeros set by the LowZero option supersede the missing setting.
  • TopMiss = Similar to LowMiss but for emi==2*exci.

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.

LowMiss are used to account for Rayleigh scatter, and
TopMiss are used to accound for 2nd 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:

  • 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}
  • 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. The can lead to artifacts if the zeros are too close.
  • TopZeros: [ {'off'} | 'on' ]: If 'on', the values above 2. order Rayleigh are set to zero.
  • plots: [ 'off' | {'on'} ], governs level of plotting.


Example

load dorrit

Xnew = flucut(EEM,20,[20 20]);

See Also

parafac