Following, a way to remove the 3 exponential pulses.
1.- Rebuilding signal + interferer from graph provided
clear all;clc;close all
problem: bwmorph breaks causality and splits signal
Now signal is correctly mapped.
Since the contaminated signal is available to the question originator, the original data should be inserted here:
2.- where is mean(s)?
don't do just s=s-mean(s)
Left behind the y=0 axis tick on purpose
3.- Rebuilding time reference
4.- Plotting signal + interference
xlabel('t[seconds]');ylabel('s+i') % signal+interferer
The VLF bending within the initial 5 seconds may come from conducted interference; contact, applying an ECG sensor on a mobile phone?
The base station or mobile seeking answer, starts with certain power and
then as the packets are exchanged Base Station Mobile Terminal tell one another to increase
or reduce power, usually the Base Station starts higher than needed
to make sure reaching cell edge, and then reduces power until MS says
The negative sharp spikes show there may be something metallic reflecting the interfering signal.
You have provided a reference signal, what it should be like, but there's
no time reference, just the amount of samples, without further
information, it's not sure the reference signal duration is also 10 seconds, is it?
5.- When do the 3 exponential decay interfering pulses start?
6.- What is the mean delay between those 3 pulses measured in time?
7.- What is the mean delay between those 3 pulses measured in amount samples?
8.- What is the real amplitude of the pulses? approximately the 1st sample
9.- what is the amount of samples per interfering pulse?
10.- What are the respective attenuation constant of the 3 exponential pulses?
11.- 1st interfering pulse start time measured directly on the graph
12.- What is the sample numeral of the start moment of the 1st interfering pulse?
13.- Values of each interfering pulse:
e_interf=[zeros(1,numel(nt0)) e1 e2 e3 zeros(1,sz2-3*nT1-numel(nt0))]
xlabel('t[seconds]');ylabel('s+i-3pulses') % signal+interferrer
If interested I can show how to use findpeaks to remove the sharp negative pulses.