An image of a light beam, which has been totally reflected from an
interface between a dielectric material block and a thin film layer of an
analysis chip for supporting a sample, is detected with photodetector and
as a two-dimensional image constituted of pixels arrayed in a beam width
direction and an incidence angle direction, which are perpendicular to
each other. An abnormal pixel row, which contains a pixel represented by
abnormal pixel data, is extracted from among pixel rows, each of which
extends in the incidence angle direction, in the array of the pixels
constituting the two-dimensional image and in accordance with an output
of the photodetector. A position of a dark line in the light beam, which
has been totally reflected from the interface, is detected from the pixel
data corresponding to the pixel rows other than the abnormal pixel row.