beautypg.com

2 segment and gap size, 3 second derivative, Segment and gap size – Metrohm Vision – Theory User Manual

Page 12: Second derivative

background image

10

▪▪▪▪▪▪▪

value computed as B-A is assigned to the data point in the middle of the gap. Then the whole
segment-gap-segment sequence is shifted one data point and the calculations repeated until a first
derivative value has been calculated for all data points in the spectrum.

2.2.2

Segment and Gap Size

(

)

[

]

1

2

/

)

3

(

+

=

x

INT

ODD

s

The actual number of data points s in a gap and a segment can be calculated from the following
equation:

Where x is the declared size, ODD is a function that rounds its argument up to the nearest odd
integer, and INT is a function that rounds its argument down to the nearest integer.

A consequence of the equation for s is that a first derivative value cannot be calculated for a certain
number of data points at the beginning and the end of a spectrum. This is so because a certain,
minimum number of data points are required to calculate A or B. The number of points m that are
missing at either end of the spectrum for which the second derivative value cannot be calculated is
given as:

2

1

+

=

g

s

m

Where s and g are the actual numbers of points per segment and gap, respectively (not the specified
size, but the actual number).

If the segments or gap contain an even number of data points, the averages and first derivative value
would correspond to midpoints between actual data points. Therefore some restrictions are imposed
on the number of points in both segment and gap. The following table gives the actual number of
points in segment (s) and gap (g) corresponding to various specified sizes.

Specified
Segment Size

Points per
segment, s

Specified
Gap Size

Points per
gap, g

1 – 2

1

1 – 2

1

3 – 6

3

3 – 6

3

7 – 10

5

7 – 10

5

11 – 14

7

11 – 14

7

15 – 18

9

15 – 18

9

2.3

Second Derivative

The linear baseline of a spectrum is described by the first order equation

C

w

a

+

(a is slope,

w is wavelength, and C is offset), which adds to a function f(w) (the spectrum). As was shown
earlier, calculation of the first derivative with respect to w eliminates the offset term, C.
However, the slope term becomes a constant (zero order) term in the first derivative:

(

)

[

]

a

w

f

C

w

a

w

f

dw

d

+

=

+

+

)

('

)

(

Consequently, if each spectrum f(w); in a data set exhibits a slightly different slope a; then the first