26
NI R Å s m u n d R i n n a n , K U - L I F E , D e n m a r k , a a r @ l i f e . k u . d k Pre-processing of NIR Åsmund Rinnan

NIR Åsmund Rinnan, KU-LIFE, Denmark, [email protected] Pre-processing of NIR Åsmund Rinnan

  • View
    232

  • Download
    1

Embed Size (px)

Citation preview

Page 1: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

un

d R

innan, K

U-LIFE

, Denm

ark, a

ar@

life.ku

.dk

Pre-processing of NIR

Åsmund Rinnan

Page 2: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

IntroductionNIR

FructoseGlucose255075

755025

Page 3: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

IntroductionNIR

A “fat” baseline

Baseline with a slope/ curve

NonlinearityFructoseGlucose

255075

755025

Page 4: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

IntroductionTechniques

• Reference dependent– O-PLS– OSC– OS– SIS

• Reference independent– MSC/ ISC– EMSC/ EISC– SNV– Detrend– Normalization– Savitzky-Golay– Norris-Williams– Finite

difference

Page 5: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

IntroductionTechniques

• Correction of light scatter– MSC– EMSC– Detrend– SNV

• Derivation– Finite

difference– Savitzky-Golay

Page 6: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

Effect of pre-processingBefore

Specular effect

Page 7: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

Effect of pre-processingAfter

Page 8: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

MSC

Raw Reference

Page 9: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

MSC

Raw Reference

Page 10: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

MSC

Reference

Raw

sp

ect

rum

1. P Geladi, D MacDougal, H Martens (1985): Linearization and scatter correction for near-infrared reflectance spectra of meat, Applied Spectroscopy, 39, 491-500

a = Intercept

b = Slope

Page 11: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

MSC

b

a raw

new

xx

Page 12: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

...xxλλx known,2known,122

ref

Extended MSC

eb...λλxx1x 22refrefraw

refraw xx 1

Slope & Intercept

eb

=Basic MSC

=Detrend

Wavelengthcorrection

Known spectra

1. H. Martens, E. Stark (1991): Extended multiplicative signal correction and spectral interference subtraction: new preprocessing methods for near infrared spectroscopy, Journal of Pharmaceutical and Biomedicinal Analysis, 9, 625-635

Page 13: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

2,

2,21,1,

2

4

ref

refrefref

b

bbb λ

new

xx

Extended MSC

bλλ1xx rawλ2

1,refbλ

new

xx

eb...λλxx1x 22refrefraw

Calculated

The correction

Step 1:

Step 2:

1. H. Martens, E. Stark (1991): Extended multiplicative signal correction and spectral interference subtraction: new preprocessing methods for near infrared spectroscopy, Journal of Pharmaceutical and Biomedicinal Analysis, 9, 625-635

Page 14: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

Extended MSCSummary

ebλλλxx1x 322refrefraw X X

ebλλx1x 2refraw

ebxx refraw 1

ebλλ1x 2raw

1.Parameter setting

2.Parameter setting

3.Paraemter setting

MSC

Detrend

Page 15: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

SNV

x

orgx

orgnew

xx

1. R.J. Barnes, M.S. Dhanoa, S.J. Lister (1989): Standard Normal Variate Transformation and De-trending of Near-Infrared Diffuse Reflectance Spectra, Applied Spectroscopy, 43, 772-777

Page 16: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

SNV vs MSC

b

a org

new

xx

MSC SNV

Page 17: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

SNV vs. MSCClassificafication of

barley

Page 18: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

SNV vs. MSC

MSC• Reference

needed• Outlier

sensitive• Only similar

spectra• No

normalization

SNV• Normalization• No reference

Page 19: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

Derivation

Page 20: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

DerivationFinite difference

Page 21: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

Savitzky-Golay vs.Finite difference

Derivativ

e

Method 1 2 3 4

1st

SG0.38

(5)

0.40

(5)

0.47

(6)

0.46

(3)

Finite

difference

0.34

(5)

0.58

(4)

0.73

(4)

0.46

(3)

2nd

SG0.34

(6)

0.51

(4)

0.67

(5)

0.46

(3)

Finite

difference

0.72

(4)

0.88

(5)

0.91

(5)

0.42

(6)

Page 22: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

DerivationSavitzky-Golay

1. A Savitsky, M J E Golay (1964): Smoothing and differentiation of data by simplified least squares procedures, Analytical Chemistry, 36 (8), 1627-1639

Page 23: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

DerivationSavitzky-Golay

1. A Savitsky, M J E Golay (1964): Smoothing and differentiation of data by simplified least squares procedures, Analytical Chemistry, 36 (8), 1627-1639

359711Smoothing

Page 24: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

DerivationSavitzky-Golay

12345

1. A Savitsky, M J E Golay (1964): Smoothing and differentiation of data by simplified least squares procedures, Analytical Chemistry, 36 (8), 1627-1639

7Smoothing Polynomial

Page 25: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

DerivationSavitzky-Golay

7 point smoothing 15 point smoothing

2nd order derivative

Page 26: NIR Åsmund Rinnan, KU-LIFE, Denmark, aar@life.ku.dk Pre-processing of NIR Åsmund Rinnan

NIR

Åsm

und R

innan, K

U-LIF

E: a

ar@

life.ku

.dk

SummaryPre-processing of NIR

• Run the following for near to optimal results

• MSC with– Only 1st order reference correction or

SNV– 1st order reference correction and 2nd order wavelength

correction– Only 2nd order wavelength correction

• Savitzky-Golay derivation with– 2nd order polynomial smoothing– 7 points smoothing for the 1st derivative– 9 points smoothing for the 2nd derivative