The function clean_epochs currently iterates per epoch and then per channel, which creates a final filtered signal, which is then written to an edf file. This might be problematic for very large files! Potential solution:
Leaving it the way it is, but instead of appending the filtered epoch at the end of each 'for' loop, just write it to the edf file. In the next iteration, it would load the current signal in each edf channel and append the new one.
The function
clean_epochs
currently iterates per epoch and then per channel, which creates a final filtered signal, which is then written to an edf file. This might be problematic for very large files! Potential solution: