Optimal value of differentiation from signal waveforms to attenuated waveforms. The optimal value was the RMS amplitude ratio with highest trade-off between hit and errors.

## 1. Introduction

Multifocal electroretinography (mfERG) was developed by Erich Sutter and colleagues (Sutter & Tran, 1992) and since the beginning was an important non invasive method to record simultaneously evoked electrical activity from several retinal areas in a relative short time. This method may reveal the presence or absence of electrical activity in a number of retinal locations, mapping the functional state of a large retinal area.

The stimulus is composed by multiple patches. Usually, each patch has a command to show flashes according to a pseudorandom sequence called binary m-sequence. The decision to show or not a flash in the patch is programmed in periodic intervals, the base period (Sutter, 2000). The evoked responses, called kernels, are derived from a cross-correlation technique (Sutter, 2001).

Usually, the stimulus is scaled in order to elicit similar waveforms across the visual field. The results of an mfERG session is presented in an array of traces or in a three dimensional plot showing the response density to the different sectors of the stimulus. The response density plot may lead the clinician to misinterpretation, because the plot generates a central peak, even when no responses are recorded from the patient (Kretschmann et al., 1998; Hood et al., 2003). Waveform array is safer than response density to decide about an outcome of the mfERG test. It is relatively easy for clinicians to recognize true responses (large signal plus noise) in the mfERG trace array. However, it is very difficult to decide between decreased responses (small signal plus noise), and pure noise.

Some analysis methods have suggested different ways to discriminate signal from noise in recorded data that can be applied to a variety of electrophysiological techniques. It was shown that the dot product between the responses and an artificial signal template could increase the signal-to-noise ratio (SNR) of the data (Sutter & Tran, 1992). Few studies have suggested objective methods to evaluate the reliability of the mfERG (Hood et al., 1998, Seeliger et al., 1998). Hood et al. (1998) proposed the comparison of the signal RMS amplitude of the recording with the RMS amplitude of a template in different time intervals. The closer in time was the equivalence between both RMS amplitudes, the better was the SNR. Seeliger et al. (1998) measured mfERG implicit times to determine their distribution across the retina. They found a low intersubject variability and higher implicit times in the blind spot, upper and lower retina, and macula. They calculated the median of implicit time of each sector of normal subjects and subtracted this value from the implicit times of patients. The larger the difference, the higher the chance to find a functionally decreased area. Other work compared human scores and automated methods to distinguish signal information of mfERG from noise. The authors concluded that automated routines can be used to increase the sensitivity of signal detection of the mfERG compared to human scoring (Wright et al., 2008).

Here, we describe a method to identify an optimal SNR that can be used to classify waveforms with normal amplitude, low amplitude and without signal.

## 2. Subjects

We recorded mfERGs from 10 healthy subjects (25.4 ± 3.5 years old). Their pupils were dilated and their eyes were anesthetised before electrode placement (Mydriatics. Tropicamide 1%, Alcon; Phenylephrine chloridrate 10%, Allergan. Anesthetic. Proximetacaine chloridrate 0.5%, Alcon). All procedures were in agreement with the tenets of the Declaration of Helsinki and approved by the Research Ethics Committee of the Tropical Medicine Nucleus, Federal University of Pará, Report 57/2008 of 26th November 2008, following the Resolution 196/96 of the National Health Council of Brazil.

## 3. Visual stimulation

VERIS Science v6.0.5d (Electro-Diagnostic Imaging, EDI, San Mateo, California) was used to generate a black-and-white stimulus comprising a 103 hexagons array covering 45° x 45° of visual field. The stimulus was generated in a colour microdisplay (FMS II, EDI) at 60 Hz frame rate and 1280 x 1024 pixels of spatial resolution. The microdisplay was positioned in front of subject’s eye and the optical distance from the eye to the stimulus was adjusted until the best focus was achieved.

The hexagons were scaled with eccentricity to equalize response amplitude across the visual field following ISCEV recommendations (Hood et al., 2008). The luminance of each hexagon was modulated in time by a complete cycle of an m-sequence of 2^{14} -1 elements (Sutter & Tran, 1992). The same m-sequence was used for all hexagons but its starting point was displaced in time from one hexagon to the other. States 1 and -1 of the m-sequence represented the flash and non flash period, respectively. The base period was 16.667 ms (the duration of 1 frame). The stimulation session lasted 4 min and 33 s divided in eight segments of 34.13 s each. A red cross of 1° of visual angle was used as fixation mark. The eye fixation was continuously monitored during visual stimulation by an infrared camera located inside the microdisplay.

## 4. Recordings

Continuous recordings were obtained by using a Burian-Allen corneal electrode, housing both the recording and reference electrodes, and a ground consisting of a gold-cup surface electrode placed on the subject’s ear lobe. Electrode impedance was monitored between stimulus segments and kept below 2 kΩ. The bioelectrical signals were x 50,000 amplified, sampled at 16 times per frame (about 960 Hz), and on-line band-filtered at 10-300 Hz using a 15LT differential amplifier (Grass, Quincy, Massachusetts). An acquisition board (PCI ESeries, National Instruments, Austin, Texas) was used to digitize the analog signal.

## 5. Description of the method

### 5.1. RMS amplitude ratio calculus

The VERIS Science v6.0.5d (EDI) software was used to extract the first order kernel. The first order kernel waveform data for the 0-200 ms interval was exported to be analysed by a homemade routine written for MATLAB environment (The Mathworks, Natick, Massachusetts).

We calculated a RMS amplitude ratio for each local mfERG response for all subjects (Zhang et al., 2002). First, we calculated the RMS amplitude of the first order kernel for the signal time interval, located between 0-80 ms, and the RMS amplitude for a time interval comprising only noise uncorrelated with visual stimulation, located between 120-200 ms (Equations 1 and 2, respectively) (Figure 1 shows the noise and signal time intervals for an mfERG recording).

Then, we estimated the ratio between the signal RMS amplitude of the jth hexagon to the mean noise RMS amplitude of the 103 mfERG waveforms obtained from the same subject (Signal Ratio, Equation 3). To obtain an equivalent value for the noise interval, we divided the noise RMS amplitude of the jth hexagon by the mean noise RMS amplitude (Noise Ratio, Equation 4).

Signal amplitude of a waveform is the RMS amplitude calculated over the signal time interval of the jth hexagon recording, Rt is the absolute amplitude at time t, μ0 to 80 is the mean amplitude during the signal time interval, and N is number of samples in the signal time interval.

Noise amplitude of a waveform is the RMS amplitude calculated over the noise time interval of the jth hexagon recording, Rt is the absolute amplitude at time t, μ0 to 200 is the mean amplitude during the noise time interval.

Signal Ratio of a waveform is the signal to noise ratio (SNR) to the signal time interval for the jth hexagon recording. Mean Noise amplitude is the average of the noise RMS amplitude for the 103 hexagon waveforms for the same subject.

Noise Ratio of a waveform is the equivalent to the SNR to the noise time interval for the jth hexagon recording.

### 5.2. Looking for an optimal RMS amplitude ratio to discriminate normal waveforms from waveforms without signal

For this first analysis, our data were composed of 1030 signal ratios and 1030 noise ratios. We estimated the distribution of frequency of RMS amplitude ratio (Signal ratio and Noise ratio). We then estimated the associated cumulative distribution function for the noise and the signal data distribution (Figure 2A-B). We proceeded to perform a Receiver Operating Characteristic (ROC) analysis using as false positive rate the values of 1 - noise cumulative distribution function and using the signal cumulative distribution function as true positive rate (Figure 2C-D). We obtained the optimal RMS amplitude ratio to distinguish the signal data from noise data as being the one which corresponds to a higher associated trade-off in the ROC space. The trade-off was calculated as the difference between each pair of true positive rate and false positive rate in the ROC space (Figure 2C-D). The optimal RMS amplitude ratio was 0.47.

### 5.3. Looking for an optimal RMS amplitude ratio to discriminate normal waveforms from waveforms with attenuated signal

In the previous section, we calculated an optimal RMS amplitude ratio to distinguish normal waveforms from those with no signal. But in clinical research we need to know how to distinguish the normal response from responses with different levels of decreased signal amplitude. In order to find an optimal RMS amplitude ratio for this purpose, we first artificially attenuated the original waveforms in a way that the signal could be decreased while keeping the noise level constant. This attenuation method was described by Wright et al. (2008).

To attenuate the amplitude of the signal from each waveform, the noise data was added to the signal. The attenuation level corresponded to the number of times the noise data was added to the signal (number of summations between signal and noise). The result was then divided by the attenuation level plus one to keep constant the RMS amplitude of the noise (Equation 5).

The jth AttenuateWave 0 to 80 is the attenuated signal time interval data, jth Wave 0 to 80 is the original signal time interval data, attenuation level is the number of times that the noise data will be added to the signal data, and the jth Wave120 to 200 is the noise time interval data.

We used 5 attenuation levels, from 1 to 5, in order to simulate different visual loss conditions. Figure 3 shows a scheme representing the different artificial attenuation levels over the same signal in an original waveform.

Then, the procedure of the previous section was repeated, but now we replaced the noise information by the attenuated signal information. The optimal values found to distinguish the original signal information from attenuated waveforms are indicated in the Table 1.

### 5.4. Testing the reliability of the optimal RMS amplitude ratios to different waveform attenuation conditions

We quantified the amount of errors that a classifier can present when using each optimal RMS amplitude ratio to distinguish normal waveforms from noisy or attenuated waveforms in different levels. The role of the classifier was to compare the signal ratio of waveforms to each optimal value obtained previously for the different attenuation levels.

Attenuation level | Optimal value |

Noise | 0.47 |

5 | 0.44 |

4 | 0.48 |

3 | 0.57 |

2 | 0.78 |

1 | 1.21 |

Before the attenuation process, the classifier considered that all waveforms should have signal ratio above the optimal SNR to distinguish normal from any attenuated waveform. We considered as error of classification when after the attenuation process the attenuated signal RMS amplitude ratio was higher than the optimal value. Correct identification was considered when the signal ratio of a waveform was lower than the optimal value.

The hit rate (HR) of the automated classifier was calculated by Equation 6. Table 2 shows the HR obtained by the classifier using each optimal RMS amplitude ratio to distinguish normal waveforms from the different attenuation levels.

The best performance of the classifier in identifying highly attenuated waveforms (attenuation levels 4 and 5) occurred when the optimal value was 0.57. For moderately attenuated waveforms (attenuation levels 2 and 3) the best performance occurred when the optimal value was 0.78, and for slightly attenuated waveforms (attenuation level 1) it occurred with an optimal value of 1.21.

Our analysis seemed to be able to delimit a range of RMS amplitude ratios to classify any mfERG waveform obtained from 103 hexagons array (Table 3). It can be argued if the attenuated waveforms at the level 1 already correspond to a true visual loss or is within the variability of an electrophysiological amplitude recording, but the moderately and highly attenuated waveforms have a considerable decrease of the signal amplitude and their clinical importance must be considered.

For an application to a real situation, we applied the evaluation protocol to recordings obtained from a patient affected by ocular toxoplasmosis. Figure 4 shows the mfERG array of this patient after the analysis, showing the retinal waveforms associated with the retinal scar marked in different colours to indicate Table 3.

We think the same method could be applied for sets of waveforms obtained from other hexagons arrays, in order to find the optimal ranges to classify mfERG waveforms.

Hit rate (%) | |||||

Optimal value | A.L. 5 | A.L. 4 | A.L. 3 | A.L. 2 | A.L. 1 |

0.47 | 99 ± 0.8 | 98.9 ± 0.9 | 96.4 ± 3.5 | 84.7 ± 16.7 | 51.5 ± 30.7 |

0.44 | 98.4 ± 1.7 | 97.5 ± 3.1 | 94 ± 7.1 | 81.1 ± 21.3 | 46.5 ± 32.5 |

0.48 | 98.7 ± 1.5 | 98.3 ± 2.3 | 95.3 ± 5.8 | 83.6 ± 18.7 | 50.4 ± 33 |

0.57 | 97.1 ± 4.6 | 88.6 ± 14.5 | 57.1 ± 35 | ||

0.78 | 97.6 ± 3 | 97.6 ± 3 | 68.7 ± 30.4 | ||

1.21 | 81.7 ± 19.3 | 81.7 ± 19.3 | 81.7 ± 19.3 | 81.7 ± 19.2 |

## 6. Discussion

Since the development of the mfERG technology in the 90’s, it was immediately applied to different topics of clinical ophthalmology (Huang et al., 1997; Kretschmann et al., 1998; Ventura et al., 2004; Greenstein et al., 2004; Raster et al., 2011), and over 700 articles already discussed the technique. The experience of the ophthalmologist is very important in the functional mapping, but this topographical evaluation is still very subjective (Hood et al., 2003). The method that we are suggesting could be an objective alternative to the conventional subjective evaluation of mfERG.

Classification of mfERG waveform | |

Highly attenuated amplitude | SNR < 0.57 (Hit rate "/ 97%-99%) |

Moderately attenuated amplitude | 0.78 "/ SNR ≥ 0.57 (Hit rate ≈ 94 - 97%) |

Slightly attenuated amplitude | 1.21 "/ SNR ≥ 0.78 (Hit rate ≈ 73%–94% ) |

Normal waveforms | SNR ≥ 1.21 (Hit rate ≈ 73%) |

The application of a SNR evaluation as in the present work in the software that performs mfERG recordings (like Veris system - EDI or Retiscan – Roland Consultant) could help the users to avoid some mistakes in the identification of the waveform as normal response, decreased responses or noise. A color-marked trace array as shown in figure 4 would make the task of the clinician easier.

Another application of the results from SNR analysis would be in the programming of response density plots. It is well established that response density plot can generate a false central peak in conditions of recordings with no signals (Hood et al., 2003, Hood et al., 2008). After the SNR evaluation, it would be possible to identify the patches related to the absence of responses (for the data of the present work, SNR < 0.57), and it would be possible to program the response density plot with this information, setting zero amplitude in the response density of the hexagon with no response. Figure 5 shows a response density plot of the data shown in Figure 4 with and without the SNR evaluation.

The main contribution of the present technical note is the description of a method to estimate ranges of SNR in order to classify an unknown mfERG waveform. Other methods proposed to measure the difference between mfERG waveform and a template waveform estimated from a control group (Hood & Li, 1997; Wright et al., 2008). The larger the difference between both waveforms, the lower the likelihood that the waveform contained a signal. Seeliger et al. (1998) suggested differences in the implicit time of the P1 component between templates and unknown waveforms. They found high implicit time deviations in recordings obtained from retinitis pigmentosa patients.

The absolute values of SNR can be different when we compare different data settings due different procedures. All data used here was obtained from recordings using Burian-Allen electrodes and 103 hexagons in the stimulus. Other recording and stimulation parameters could change the absolute values of the limit ranges. Other work has described the influence of different experimental conditions in mfERG SNRs (Kretschmann et al., 1998).

The application of our method helps the clinicians to map retinal function and quantify the number of waveforms in each SNR range. It can be of further use as a tool to obtain parameters of the sequential evaluation of the history of the retinal disease. For the application of our protocol we advise that each laboratory applies it to their own data to obtain the optimal ranges of classification.

In order to facilitate the application of this method by other researchers, in the next section we present the code in MATLAB language of important steps of the method described in the present chapter.

## 7. Matlab codes for important steps to reproduce the method described in the present technical note

Matlab is a very useful technical programming interpreted language to work with matrix computations. This computational environment has many pre-programmed functions that help a beginner in mathematics or computer science to perform complex numerical calculations in a relative intuitive way. In visual electrophysiology, this language got an important status in the data analysis mainly after multifocal electrophysiology, which requires the researcher to work with multiple vectors simultaneously.

### 7.1. Code to calculate the Signal ratio and Noise ratio for a subject as described in the equations (3) and (4)

** Trace_Array**is a matrix with 103 lines and 193 columns. Trace_Array represents the waveforms information. Each line represents one of 103 waveforms and each column is each voltage of the recording

RMS_Signal = ones(1,103);%RMS_Signal will receive the RMS amplitude of the signal interval

RMS_Noise = ones(1,103);%RMS_Noise will receive the RMS amplitude of the noise interval

SNR_Signal = ones(1,103);%SNR_Signal will receive the Signal ratio

SNR_Noise = ones(1,103);%SNR_Noise will receive the Noise ratio

%Next loop executes the calculus of RMS amplitude of the signal interval

for i = 1:103

RMS_Signal(1,i) = std(Trace_Array(i,1:78),1);

end

%Next loop executes the calculus of RMS amplitude of the noise interval

for Line= 1:103

RMS_Noise(1,line) = std(Trace_Array(i,116:193),1);

end

meanRMS_Noise = mean(RMS_Noise);%Calculus of the average of all Noise RMS amplitudes

%Next loop executes the calculus of Signal ratio

for i = 1:103

SNR_Signal(1,i) = (RMS_Signal(1,i)/meanRMS)-1;

end

%Next loop executes the calculus of Noise ratio

for i = 1:103

SNR_Noise(1,i) = (RMS_Noise(1,i)/meanRMS_Noise)-1;

end

### 7.2. Code to perform the artificial attenuation in the original waveforms

The code below performs an artificial attenuation in the level 5. To perform other attenuation levels, the user must only change the value of variable Att_level

Att_Rec = ones(103,193);%Attenuated_recording will receive the attenuated waveforms

Att_level = 5; %Att_level sets the attenuation level to proceed

%Next loop will create build a matrix of attenuated waveforms as indicated in equation (5)

for i = 1:103

Att_Rec(i,:)=[(Trace_Array(i,1:78)+Att_level*Trace_Array(i,116:193))/(F+1),Trace_Array(i,79:193)];

end

### 7.3. Code to calculate the cumulative distribution of signal information and noise information of the sample

In the next code, Signal is the matrix with all Signal ratio values of the sample and Noise is the matrix with all Noise ratio values of the sample.

interval = 0.05;

max_Signal = max(Signal); % finding maximum value of Signal ratio

min_Noise = min(Noise); %finding minimum value of Noise ratio

x = min_Noise:interval:max_Signal;

data_Signal = histc(Signal,x);%to calculate the number of elements in each Signal ratio of the interval x_Signal

data_Noise = histc(Noise,x); %to calculate the number of elements in each Noise ratio of the interval x_Noise

sum_Signal = sum(data_Signal);

sum_Noise = sum(data_Noise);

percent_sum_Signal = data_Signal./sum_Signal;

percent_sum_Noise = data_Noise./sum_Noise;

%Next loop will calculate the cumulative distribution for signal and noise information

for i = 1:1:length(x)

cum_sum_Signal(i)=sum(percent_sum_Signal(1,i:length(percent_sum_Signal))); cum_sum_Noise(i)=sum(percent_sum_Noise(1,i:length(percent_sum_Signal)));

end

### 7.4. Code to calculate the optimal value to distinguish signal information from noise information

The code below is continuing of the previous code. We kept the name of variables of the previous code in the follow code.

x = min_Noise:interval:max_Signal; %Interval including SNR of Noise and Signal information

FA = cum_sum_Noise; %False positive rate

HIT = cum_sum_Signal; %True positive rate

m = length(FA);

trade_off = ones(1,m);

%Next loop will calculate of the trade-off in the ROC space

for i = 1:m

trade_off(1,i) = abs(FA(1,i)-HIT(1,i));

end

counter = 1;

maximum_trade_off = max(trade_off);%Finding the maximum trade-off between hit and false alarm

%Next loop will find the position of the maximum_trade_off in the matrix trade_off

for i = 1:m

if (maximum_trade_off == trade_off(1,t))

break

else

counter = counter + 1;

end

end

Optimal_SNR = x(1,counter);%Optimal_SNR is the SNR value in the same position in x of maximum_trade_off in trade_off.

## 8. Conclusion

The multifocal electroretinogram is a relatively new method of visual investigation and studies that contribute to the improvement of the effectiveness of the method should be encouraged. The method described in this chapter intended to assist in the neuroophthalmological diagnosis by estimating ranges of SNR as indicators of the quality of the electrophysiological response.

## Acknowledgments

Supported by FINEP research grant “Rede Instituto Brasileiro de Neurociência (IBN-Net)” #01.06.0842-00, CNPq-PRONEX / FAPESPA #2268, CNPq #486351/2006-8, CNPq #550671/2007-2, CNPq #620037/2008-3, CNPq #476744/2009-1, CNPQ #475860/2010-1. ACC received a CNPq fellowship for graduate students. DFV and LCLS are CNPq research fellows.