rate exceeds the slew rate threshold a slew rate flag 144 is set for the current epoch 140 in step 156 otherwise it is cleared for the current epoch in step 157 finally the slew rate buffers are cleared in preparation for processing the next epoch in step 158 the method of artifact processing used in the present invention dynamically filters the eeg signal effectively removing the electrosurgical artifact from the ongoing eeg signal for this reason the method of electrosurgical artifact filtering is applied only when an electrosurgical artifact is detected in a particular epoch by both the artifact detection circuit 70 and at least one of the two software detection methods this process of electrosurgical artifact classification will now be described with reference to fig6 the eeg signals are typically analyzed epoch by epoch and the present invention preferably uses an epoch length of 1 second for this reason it is desirable to classify the eeg as to whether or not each epoch contains electrosurgical artifact for this reason the output signal u02dc esu is typically used to set a flag in step 200 the esu flag is set by the u02dc esu signal output of the electrosurgical artifact detection circuit 70 after each epoch of eeg signal is acquired the electrosurgical unit flag is examined in step 201 in order to determine whether it is set to a logic zero if the electrosurgical unit flag is set the hardware electrosurgical artifact hesa flag 142 is then set in step 202 if the electrosurgical unit flag is not set then the.