Fully automated F-wave corridor extraction and analysis algorithm for F-wave analyses and MUNE studies

F-waves are used in motor unit number estimation (MUNE) studies, which require rapid dedicated software to perform calculations. The aim of this study is to define a mathematical method for a fully automated F-wave extraction algorithm to perform F-wave and MUNE studies while performing baseline corrections without distorting traces. Ten recordings from each class, such as healthy controls, polio patients and ALS patients, were included. Submaximal stimuli were applied to the median and ulnar nerves to record 300 traces from the abductor pollicis brevis and abductor digiti minimi muscles. The autocorrelation function and the signal of sum of all traces were used to find the location for the maximum amplitude of the F-waves. F-waves were revealed by using a cutting window. Linear line estimation was preferred for baseline corrections because it did not cause any distortion in the traces. The algorithm automatically revealed F-waves from all 30 recordings in accordance with the locations marked by a neurophysiologist. The execution of the algorithm was less than 2 (usually < 1) minutes when 300 traces were analyzed. Mean sMUP amplitudes and MUNE values are important for differentiating healthy controls from patients. Moreover, F-wave parameters belonging to polio patients on whom there was a relatively low number of studies conducted were also evaluated.

www.nature.com/scientificreports/ The action potential pool that forms the M-response decreases after motor unit denervation, so the number of different F-waves decreases.As a result, the possibility of observing repeater F-waves increases 6 .
In F-wave studies, some parameters are extracted for analysis.These are the number of repeater F-waves (total number of repeater F-waves), number of repeater neurons (number of different repeater F-waves), sMUP amplitude (peak-to-peak amplitude of repeater F-wave), M-response amplitude (peak-to-peak amplitude of M-response), persistence (ratio of number of noticeable F-waves to total number of recorded traces), latency (the latency between M-response and F-wave) and duration of F-waves 1,2 .
Standard parameters related to F-waves are calculated by neurologists, and this process is too time-consuming.There is a necessity to develop an algorithm to perform these calculations and to reduce the load on examiners.In addition, dealing with many traces (90-300) to perform F-wave analysis for a neurologist is very difficult.It is possible to miss some repeater F-waves while performing manual inspection.However, a computer-aided algorithm will increase the accuracy of the analysis.
While observing the progression of motor neuron diseases, it is important to estimate the remaining number of motor units of a patient.Many motor unit number estimation (MUNE) methods have been introduced in the literature.Incremental stimulation 7 , multiple point stimulation 8 , spike-triggered averaging 9 , adapted multiple point stimulation 10 , F-MUNE 11 , statistical MUNE 12 , high-density surface EMG 13 , MUNIX 14 and MScanFit 15 are the prominent techniques.The calculation of the M-response parameters is the same for all methods, but it is the sMUP calculation that makes a difference among the MUNE calculation methods.
Some studies that introduce algorithms for calculating F-wave parameters along with MUNE calculations have been conducted 11,[16][17][18][19] .It is clear that F-waves can be used to calculate MUNEs, but a dedicated algorithm should be used for this purpose 20 .
While studying F-waves, it is challenging to determine the baseline of the F-wave.There are several kinds of baselines on which the signal rides, such as linear, exponential, polynomial or sigmoidal baselines 21 .Sometimes, F-waves elicit close to M-responses 11 , and their baseline should be corrected to have a better accuracy.Widely accepted baseline correction algorithms are polynomial fitting (PF) 22 , small window moving average (SWMA) 23 and adaptive iteratively reweighted penalized least squares (AIRPLS) 24 .
An action potential recording on a trace harbors the sum of several MUAPs.Baseline corrections without changing the waveform of recordings for electromyography signals are a crucial matter because valuable information under the peaks of action potentials might be lost.
The present study will explain how to properly extract the F-wave corridor from consecutive traces for F-wave and MUNE studies.F-wave corridor extraction is an isolation procedure to reveal F-waves while discarding the other parts of the traces including M-response.It simplifies the analysis process from the viewpoint of software because the number of samples that represents a trace is reduced up to 30% of the original one.
The developed algorithm, which has baseline correction features, will be applied to recordings of healthy controls, ALS patients and polio patients, for whom a few studies dealing with F-waves are present.The new algorithm retains valuable information under the peaks without distorting the traces, and it performs the MUNE calculation faster than the other algorithms by using F-waves.
The aim of this study is to: • Define a fully automated mathematical method for the proper extraction of F-waves while performing base- line corrections without distorting the recorded traces.• Perform faster MUNE calculations with recorded F-waves.
• Determine the differentiating F-wave features to distinguish among healthy subjects, ALS patients and polio patients.
This paper continues with material and methods.Information regarding the subjects in the dataset and details regarding the data acquisition procedure are provided in this section.The Theory/Calculation section demonstrates the newly developed algorithm with detailed graphics.The results, which are supported by statistical tests, are shared in the next section.In the discussion section, prominent findings are provided, and the current study is compared with other studies.The paper ends with a conclusion.

Materials and methods
The study was approved by the local ethics committee of Istanbul University, Istanbul Faculty of Medicine (2016/162).All experiments were performed in accordance with relevant guidelines and regulations.Informed consent was signed by all participants of this study.

Subjects.
In the dataset, there are 10 recordings of each class.They are amyotrophic lateral sclerosis (ALS) patients, polio patients and healthy controls.
The mean age of the ALS patients (5 males/5 females) was 56.5 (32-80).The ALS patients were classified according to the Awaji criteria as definite in 8, possible in 1, and probable in 1.The mean MRC sum score and ALSFRS-R score were 52 ± 5.8 and 39 ± 5.8, respectively.

Electrophysiological evaluation.
The recording procedure was briefly explained to participants.Their recording muscles were in a resting state, and their arms were backed up with a pillow.They were lying down on their back for the recording process.It was proposed to participants that they remain steady to reduce movement artifacts.
The skin temperature of the recording muscle was maintained at 33 °C or over.Skin temperature was measured by using an infrared thermometer before recording.If it was below 33 °C, hot packs were used to increase the skin temperature over 33 °C.Periodical temperature measurements were done during recording process to ensure that the skin temperature was over 33 °C.If it was needed, hot packs were used again to increase the skin temperature.
A Medelec Synergy EMG instrument (Natus Medical, USA) was used to acquire signals.The cut-off frequency for the bandpass filter was 20 Hz-10 kHz.The amplifier gain was adjusted to 500 μV for an optimal view of the traces.The time axis was adjusted to 10 ms/division.The sampling frequency of the EMG instrument was 50 kHz, and the trace duration was 100 ms.
Disposable pre-gelled and 20 mm sized Ag/AgCl surface electrodes were used for recording CMAPs and F-waves as well as for stimulation.CMAPs were recorded by using submaximal stimuli (30-50% of the maximum CMAP amplitude) with 0.5 Hz frequency 11 .
The median nerve was stimulated at the wrist to perform recording from the abductor pollicis brevis (APB) muscle.The abductor digiti minimi (ADM) muscle was selected to perform the same procedure for the ulnar nerve.The cathode was placed proximal to the anode for the stimulator.Recording electrode was placed over muscle according to belly-tendon recording principle 25 .Anode of the recording electrode was placed near the tendon of the recording muscle.Cathode of the recording electrode was placed over muscle belly, corresponding to the neuromuscular junction.The ground electrode was placed to the palm for both recording setups.Figure 1 shows the electrode placements for recording procedure.
In each session, 300 consecutive traces were recorded for each muscle.Two criteria were applied in the study.First, the amplitude of the CMAP had to be greater than at least 1 mV.Also, only F-waves with amplitudes greater than 40 µV were accepted for analysis.By following the recording criteria, one recording per muscle was performed for one person.It took 10 min to prepare a person, to configure the EMG instrument and to place electrodes.Recording from one muscle took 10 min.The total session duration of one person was nearly 30 min.

Statistical analysis.
Many statistical analysis methods to be performed on data are based on the assumption that the data are normally distributed.Studying on data that do not have a normal distribution affects the validity of statistical tests and the reliability of analysis results.While parametric tests give more reliable results, non-parametric tests are preferred if the data are not normally distributed.
Normal distribution tests were performed for all calculated features.Histogram, skewness and kurtosis values, detrended normal Q-Q graphics, and Shapiro-Wilk normality tests were evaluated for this purpose.
Histogram is a graphic that shows the distribution of data with bars.For normal distribution, a bell curved graphic is expected.
Skewness and kurtosis values should be close to 0 for a normal distribution.If kurtosis value is positive, that means the distribution has fatter tails with a sharper peak.If kurtosis value is negative, that means the distribution has thinner tails with a flatter peak.If skewness value goes out of ± 1, that means data have a right or left skewed distribution according to the sign of this value.
Detrended normal Q-Q graphic is a type of Quantile-Quantile plot which demonstrates the distribution of data in a different way.Samples of the data should be scattered on the graphic for having a normal distribution.If there is some clustering in this plot, it means that the data may be right or left skewed.
Shapiro-Wilk test is used for data which have number of samples less than 30.Significance value should be greater than 0.05 to have a normally distributed data.
If a feature was not normally distributed as a consequence of these tests, logarithmic transform was applied to this feature, and all these tests were repeated.As a result, since all features were normally distributed, all groups were compared for each feature by using parametric ANOVA.Afterward, post hoc analysis was performed with Tukey's test.

Theory/calculation
In this section, the automated algorithm is introduced by using healthy control recordings.The recorded signals acquired by using the EMG instrument are extracted to a text file.This file contains participant information, EMG instrument settings, etc., with the numerical data.It should be purified from redundant data by using preprocessing techniques, and the necessary part from the signal recording is saved to an Excel sheet.The Excel file belonging to a signal recording is read by the currently developed algorithm.The noise on all traces is reduced by a wavelet-based algorithm.It has been seen that the Daubechies 12 wavelet provides the best result for this kind of signal from previous studies 26 .Figure 2 demonstrates an entire trace from a healthy control recording and the result of noise reduction on the F-wave for this trace.
The duration of the recorded traces is 100 ms.At the very beginning of these traces, there may be stimulus artifacts, so 2 ms from the beginning of each trace is discarded.A trace is shown in Fig. 3 before and after discarding stimulus artifact.Stimulus artifacts shrink the signals in terms of appearance on the monitor, and after discarding them, the M-response and F-wave can be observed clearly on the right-hand side of Fig. 3.
After this operation, an option is offered to the user to continue either a fully automated analysis or a manual analysis.If the manual option is selected, the user can individually check all traces and discard any of them before starting the analysis.The user can determine the F-wave corridor manually by entering left and right cutting locations.Then, the algorithm continues to the baseline correction process.If the fully automated option is selected, the algorithm begins directly to find the F-wave corridor.
In the case of selecting the fully automated option, all traces are summed, and the autocorrelation function is calculated.The signal of sum of all traces for a healthy control can be seen in Fig. 4.
Calculation of autocorrelation function for an EMG signal is similar to convolution operation with one difference.In this calculation, second signal is not flipped while shifting it from one side to another.Autocorrelation measures the similarity between a vector and the shifted copy of the same vector.
The autocorrelation function is helpful for determining the cutting location of the area of interest from the signals 27 .This function is calculated by using the signal of sum of all traces.Because all traces are summed, M-response has the highest amplitude peak and this peak is always the first peak.The second highest amplitude peak is formed because of the F-waves which are elicited on similar locations.It is possible to observe other peaks because of the nature of F-waves.but their amplitudes are lower when they are compared with the first and the second highest amplitude peaks.This valuable information is used to find the exact maximum amplitude location of F-waves on the signal of sum of all traces.
The location of the global maximum is searched at the 7.5 ms part of the signal of sum of all traces.
The second peak from the autocorrelation function is marked.If the distance between the first peak and the second peak is less than 12 ms, it means that there is some fluctuation in the M-response, and there is an artificial peak in the autocorrelation function.Therefore, the next peak on the autocorrelation function is selected.
The distance between the locations of the first peak and the second peak at the autocorrelation function is calculated.After adding this calculated distance to the location of global maximum at the signal of sum of all traces, the location of the maximum amplitude for the F-wave is searched ahead of this distance.The first and second peak from the autocorrelation function and the calculated distance belonging to a healthy control recording can be seen in Fig. 5.
Left part of Fig. 5 was constructed by breaking the ordinate to observe the second peak and the other peaks clearly.It must be noted that the calculated distance is not the exact location; it is an approximate location for calculating F-wave corridor cutting locations.
A signal is extracted using a window by moving back 7.5 ms and forward 15 ms from the approximate location at the signal of sum of all traces (Fig. 6).The positive peak inside the 22.5 ms searching window that has the maximum amplitude is the location for the maximum amplitude location of the F-waves.If there is no positive peak in this window, the next peak is selected from the autocorrelation function, and all the previous steps are   www.nature.com/scientificreports/repeated.The searching window, the approximate maximum amplitude location of F-waves and the exact maximum amplitude location for the F-waves are depicted in Fig. 6.
If the maximum amplitude location for the F-wave is calculated near the global minimum because of the fluctuation in the M-response, the amplitude at this location is below at least − 100 mV at the signal of sum of all traces.In a situation such as this, the next peak on the autocorrelation function is selected, and all previous steps are repeated.
F-waves are not elicited before 20 ms on the median or ulnar nerves 3,4 .If the maximum amplitude location for the F-wave is earlier than 16 ms, the next peak on the autocorrelation function is selected, and all previous steps are repeated.This threshold was determined as 16 ms, but it is actually 18 ms in raw signal because 2 ms part was discarded as stimulus artifact.
A sample signal is extracted by moving 7.5 ms back and by moving 7.5 ms forward in the signal of sum of all traces from the maximum amplitude location for the F-waves.If the slope of this 15 ms sample signal is greater than 16°, then the left part of this signal comes from the M-response.This value of 16° has been determined as the ideal value of the result of many trials with numerous recordings.After the last examination, the next peak on the autocorrelation function is selected if the slope of the signal is greater than 16°, and all previous steps are repeated for the last time.
The maximum amplitude location of the F-waves on the signal of sum of all traces and the selected peak on the autocorrelation function are shown to the user.Figure 7 shows these locations.
The maximum amplitude location for F-waves belonging to a healthy control recording from median nerve were determined as 25.35 ms.The calculated location was written as 23.35 ms at the bottom part of Fig. 7, but 2 ms should be added to find the exact maximum amplitude location of F-waves because 2 ms part has been discarded before because of the stimulus artifact.
By using a window, a signal is extracted by moving 10 ms back and by moving 20 ms forward from the maximum amplitude location of the F-waves at the signal of sum of all traces.
A 0.25 ms piece from the left of this signal is checked if its slope is greater than 16°.If the slope is greater than 16°, the left part of this signal comes from the M-response and is trimmed by the algorithm.This process is repeated until the slope of 0.25 ms pieces from the left part of the signal is lower than 16°.Then, the duration of the F-waves is printed on the screen, and all traces are cut from the calculated cutting locations.The F-wave corridor is shown in Fig. 8.
Here, the steps of manual analysis and those of automated analysis combine.The algorithm continues to flow for the next step.
After revealing the F-waves from the recording, a unique linear line is generated according to the behavior of each trace for the baseline correction process.This linear line is the estimated baseline of the original trace.It is calculated by using least squares method.When the distances of samples on the top and bottom of the linear line are summed individually, the absolute values of these two magnitudes are same.www.nature.com/scientificreports/Every sample of this unique line is subtracted from the corresponding trace point by point.At the end of this process, the angles of all traces are corrected, and they are all placed on the '0 reference line' .After the baseline correction process, all baselines are standardized and they all become same.
Figure 9 shows the generated linear line belonging to a trace from a healthy control recording and the result after baseline correction.
The flow chart of the developed algorithm up to this phase is given in Fig. 10.
The automated algorithm continues with extracting F-wave parameters.The peak-to-peak amplitude of the M-response is calculated for use in the MUNE analysis.The maximum and minimum amplitude values of the F-waves are calculated and stored separately.The peak-to-peak amplitudes of the F-waves are calculated afterward.The maximum and minimum amplitude locations of F-waves are determined for a later step in the algorithm.As stated in the electrophysiological evaluation part, the amplitudes of F-waves are checked to determine if they satisfy the 40 µV criterion.If the amplitude of any F-wave is below 40 µV, it is marked and discarded from analysis.
The fall time of a trace is lower than 3 ms.If the amplitude change of a trace is lower than 40 µV in 3 ms from the peak location to the left and right, it is evaluated as a noise signal.It is also marked and discarded from the analysis.www.nature.com/scientificreports/All remaining traces are aligned according to their maximum amplitude locations.For becoming a repeater F-wave pair candidate, all traces are compared with each other in terms of maximum and minimum amplitude (Fmax and Fmin) locations.Both Fmax and Fmin location differences for each repeater F-wave candidate pair should be below 0.5 ms.To maintain their candidacy, the amplitude ratio of candidates should be greater than 0.9; as a result, they satisfy amplitude similarity.
The power values of repeater F-wave candidates are calculated next.If the power ratio of the candidates is greater than 0.8, they remain as candidates.The correlation coefficient is another parameter that should be checked to satisfy the morphological similarity of repeater F-waves.If this coefficient is greater than 0.9 for candidate pairs, they maintain their candidacy.
One more control parameter was derived for approving candidates as repeater F-waves.It was named as 'the similarity coefficient' in a previous study 26 .The similarity coefficient consists of the sum of the amplitude difference and power difference values between the elements of a candidate pair.If this coefficient for a candidate pair is lower than 0.6, they are confirmed as repeater F-waves.This value has been determined by practicing with a great number of recordings of various types.
After these operations, the remaining F-waves are checked again in the second pass.They are aligned according to their minimum amplitude locations.All traces are compared with each other in terms of minimum amplitude locations.The Fmin location difference for each repeater F-wave candidate pair should be below 0.5 ms.
The difficulty level for candidacy criteria is increased.The amplitude ratio of candidates should be greater than 0.95, and the power ratio of the candidates should be greater than 0.9 at this time.
The similarity coefficient is calculated again with the sum of the amplitude difference and power difference values between the elements of each candidate pair.If this coefficient for a candidate pair is lower than 0.6, they are confirmed as repeater F-waves.
If one element of a repeater F-wave pair is the same as another repeater F-wave pair element, they are combined in the same group.
The number of repeater F-waves is counted, and it is the first calculated feature.The number of repeater F-wave groups is named as 'the number of repeater neuron' feature.The sMUP amplitude feature is calculated for each repeater F-wave group.Persistence is the ratio of the number of F-waves in the analysis to the total number of recorded traces.
Three different parameters can be used for F-MUNE calculations.These are peak-to-peak amplitude, positive peak area and total area parameters.The equations for calculating the MUNE are given as follows: where, M pp = M-response peak-to-peak, sMUP pp = Surface motor unit potential peak-to-peak.
The automated algorithm can perform MUNE calculations according to Eq. (1), so it is calculated by dividing peak-to-peak amplitude of M-response to mean of peak-to-peak amplitudes of sMUPs.On the other hand, it is possible to add calculation options for the other equations as an update.The flow chart of the automated algorithm for the feature extraction process from F-waves is given in Fig. 11.
A detailed report and calculation results regarding these features are presented to the user.It is possible to plot repeater F-wave pairs in overlapped way with different colors for easy distinction.In addition, a repeater F-wave pair can also be plotted under the other repeater F-wave pair.The most similar repeater F-wave pair is shown to the user.The plot of the most similar pair for a healthy control from median nerve recording is shown in Fig. 12.

Results
All 10 recordings for each group showed repeater F-waves.After determining and discarding noise signals from the recordings, four features were calculated for the median and ulnar nerve recordings.The calculated values for these features are provided in Table 1.
The mean value for the number of repeater neurons was 9.3 for ALS patients, 22.2 for healthy controls and 20.3 for polio patients in the median nerve.The same feature was calculated in the ulnar nerve as 15, 12.9 and 26 for ALS patients, healthy controls and polio patients, respectively.Logarithmic transform was applied on this feature for recordings from both nerves to make the feature normally distributed.ALS and polio patients were significantly different from each other (p < 0.05) in the median nerve.Regarding the same feature, healthy controls and polio patients were found to be significantly different from each other (p < 0.05) in the ulnar nerve.
The number of repeater F-waves was calculated to be 88.9 as the mean value in the median nerve for ALS patients.The same feature was calculated as 90.9 and 107.7 for healthy controls and polio patients, respectively.In the ulnar nerve, the mean value for this feature was 125.5 for ALS patients, 58 for healthy controls and 116.4 for polio patients.There was no significant difference between groups for this feature in both nerves.In median nerve, logarithmic transform was applied to the mean sMUP amplitude feature to make it normally distributed.The mean number for this feature was calculated as 345.7 µV, 145.75 µV and 322.21 µV for ALS patients, healthy controls and polio patients, respectively.The values of the healthy controls were significantly lower than those of the patients (p < 0.05).In the ulnar nerve, the mean value for the mean sMUP amplitude feature was 240.94 µV for ALS patients.For healthy controls, this value was calculated to be 151.7 µV.Finally, the same value was calculated to be 228.46µV for polio patients.When the values of healthy controls were compared with those of the patients, they were significantly lower (p < 0.05).Box plots for this feature are depicted in Fig. 13 for both nerves.
The mean MUNE value in the median nerve for ALS patients was 24.01.This value was 84.75 and 34.66 for healthy controls and polio patients, respectively.In the ulnar nerve, the mean value for MUNE was 35.72 for ALS patients, 65.18 for healthy controls and 40.71 for polio patients.Healthy controls were found to be significantly different from patients according to the results for both the median and ulnar nerves (p < 0.05).Figure 14 shows the box plot for the MUNE value belonging to all groups for both recording sites.
The performance of the algorithm for automatically determining the cutting locations for F-waves was examined.An expert neurophysiologist determined the mean left and right cutting locations for polio patients at median nerve recordings as 20.87 ms and 51.28 ms.For the same group, the ulnar nerve recordings mean cutting locations were given as 20.33 ms and 49.respectively.The algorithm calculated cutting locations for ALS patients at median nerve recordings were 21.64 ms and 51.59 ms.For the ulnar nerve recordings, the locations were calculated to be 20.59 ms and 50.42 ms.
The same expert neurophysiologist determined that the mean left and right cutting locations for healthy controls at the median nerve recordings were 22.2 ms and 42.98 ms.The mean cutting locations at the ulnar nerve recordings were specified to be 22.34 ms and 43.56 ms.The algorithm calculated that the mean cutting locations at the median nerve recordings were 18.70 ms and 48.50 ms.The locations of interest for the ulnar nerve recordings were calculated to be 18.47 ms and 47.75 ms, respectively, by the developed algorithm.

Discussion
In the current study, mathematical methods were explained for the proper extraction of F-waves from traces.The pre-processing steps were important to achieve better results.Redundant data were discarded from the text file, which contained data from the recordings, and noise reduction was applied to all traces.
The autocorrelation function was the key to finding the cutting locations of the F-wave corridor.Positive peaks from the autocorrelation function gave approximate locations for the maximum amplitude location of F-waves.This location can be found by using this information at the signal of sum of all traces.
In addition to the possibility of manual control, the algorithm was fully automated and could decide if the calculated location was correct or not.When the location was wrong, it could be updated automatically.www.nature.com/scientificreports/After revealing F-waves by using the calculated cutting locations, all F-waves were subjected to baseline corrections.Linear line estimation was preferred for correcting the baseline of all traces.The purpose of this preference was to prevent waveform distortion.The newly developed algorithm was tested with the recordings belonging to healthy controls, ALS patients and polio patients.
The number of repeater neurons, number of repeater F-waves, mean sMUP amplitude and MUNE value were calculated for all groups.The mean sMUP amplitude and MUNE value were important F-wave parameters for differentiating healthy controls from patients.The significance of these two parameters can be seen in Figs. 13 and 14.
Chroni et al. 16 studied healthy controls, as in the current study.The number of volunteers was similar like the current study.They recorded 40 traces in each session, while there were 300 traces in the current study.The recording muscle was the same, and they calculated the number of repeater neurons as 17 while they were using submaximal stimuli (60%).In the current study, the same value was calculated to be 12.9.This mild difference might be due to the number of recorded traces and the criteria for accepting signals.They used their own developed algorithm to perform these calculations.Their algorithm allowed manual control over the software, while the developed algorithm in the current study was fully automated with the possibility of manual control.
Veltista et al. 19 continued their study 16 and introduced their 'F-wave Analyzer' software.Their algorithm could calculate all F-wave parameters and allow manual control for changing the markers of F-waves.The currently developed algorithm was intentionally fully automated to offer simplicity to neurophysiologists, but it is also possible to perform manual control on the algorithm.www.nature.com/scientificreports/sharing the results of the features belonging to polio patients.The mean sMUP amplitude and MUNE value were valuable features for differentiating healthy controls from patients.
The developed algorithm offers simplicity to the examiner by not requiring manual control, so only the analysis results can be focused on.More recordings from different muscles of both the upper and lower extremities will be evaluated to test the accuracy and performance of the software.In the next version of the algorithm, new graphics will be added to enrich the presentation.

Figure 2 .
Figure 2.An entire trace from the median nerve recording of a healthy control (stimulus artifact was discarded) and the result of noise reduction detail of the F-wave belonging to the same trace.

Figure 3 .
Figure 3.A trace from the median nerve recording of a healthy control before and after discarding stimulus artifact.

Figure 4 .Figure 5 .
Figure 4.The signal of sum of all traces for a healthy control from a median nerve recording.

Figure 6 .
Figure 6.The maximum amplitude location searching window, approximate location for maximum amplitude location of F-waves which is acquired from autocorrelation function and the exact maximum amplitude location for the F-waves belonging to a healthy control recording [triangles: peaks].

Figure 7 .
Figure 7.The selected peak location (X = 118.55ms) from the autocorrelation function and the maximum amplitude location of the F-wave (X = 23.35ms) for a healthy control from a median nerve recording.

Figure 8 .
Figure 8.The extracted F-wave corridor from median nerve recording of a healthy control.

Figure 9 .
Figure 9. Linear line (estimated baseline) belonging to the original trace (blue colored) of a healthy control recording for the baseline correction and final result (purple colored) for that trace after the baseline correction.

Figure 10 .
Figure 10.Flow chart of both the automated F-wave extraction algorithm and baseline correction part.
total area) n /K

Figure 11 .
Figure 11.Flow chart of the feature extraction algorithm from F-waves.

Figure 12 .
Figure 12.The most similar repeater F-wave pair belonging to a healthy control recording [lower similarity coefficient means more similar F-wave pairs].

Figure 14 .
Figure 14.MUNE values for ALS patients, healthy controls and polio patients in (a) median nerve and in (b) ulnar nerve.o outlier.