detected if the calculated correlation exceeds the threshold fig8 illustrates an embodiment in which the mechanism of the invention is used to detect which of the artifact contaminated time periods of the eeg signal data are caused by eye blinks the eeg and bioimpedance signals of the patient are again measured simultaneously from the forehead of the patient steps 81 and 82 however in this embodiment the bioimpedance signal is not compared with a predetermined threshold level since the purpose is to detect only the artifacts caused by eye blinks in this case the bioimpendance signal is compared with a predefined morphology i e a template to detect the periods that include certain type of deflections i e deflections caused by eye blinks step 84 the same detection mechanism is applied to the eeg signal at step 83 however the template used for the eeg signal is different from the one used for the bioimpedance signal since the deflections caused by eye blinks have different characteristics in the two signals based on the temporal conformity of the eye blink originated deflections detected in the two signals an eye blink signal is then produced which indicates the eye blinks of the patient step 85 more particularly if the deflections detected by the templates are temporally close to each other i e if a deflection detected in one of the signals has a corresponding deflection in the other signal and the said two deflections.