beautypg.com

1 calculation of the second derivative, 2 segment and gap size, Calculation of the second derivative – Metrohm Vision – Theory User Manual

Page 13: Segment and gap size

background image

▪▪▪▪▪▪▪

11

derivative spectra will exhibit offset variation.

It is common practice, therefore, to take the second derivative with respect to w (wavelength) so as
to eliminate both offset and slope:

[

]

)

(

"

)

(

)

(

2

2

w

f

C

w

a

w

f

dw

d

=

+

+

Spectral offset and slope may vary within a set of spectra for any of several reasons including:

Particle size differences among samples

Varying particulate levels between liquid samples

Small changes in instrument response due to short term variation in lamp intensity, detector

response, or instrument temperature.

2.3.1

Calculation of the Second Derivative

One way to calculate the second derivative is as the second order finite-difference derivative. This
method requires two values to be specified: the length of the segment (segment size); and the
length of the gap between segments (gap size).

The second derivative calculation begins by identifying three segments at one end of the spectrum,
each separated from by other by a gap. Average absorbance values are calculated for the first,
second, and third segments (A, B and C, respectively). The second derivative value computed as A-
2B+C is assigned to the midpoint of the second segment. Then the whole sequence of three
segments and two gaps is shifted one data point and the calculations repeated until a second
derivative value has been calculated for all data points in the spectrum.

2.3.2

Segment and Gap Size

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

(

)

[

]

1

2

/

)

3

(

+

=

x

INT

ODD

s

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 second 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:

m s g

s

= + +

1

2

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, the number of points in both
segment and gap are subject to the same restrictions defined for the first derivative: