Skip to main content
deleted 9 characters in body
Source Link

I am trying to build a filter for the detection of signals with the known form in noisy and low-amplitude data.

I used a simple example in Python provided here: https://www.youtube.com/watch?v=XXLV9g6RQQ4

but for the data I have.

initial_signal is a numpy array, it has length of 8000 points.

(for each element of initial_signal array we have the x-value - coordinate E for the signal.) it's important to note, that the distance between sample points can vary, so

E[i] - E[i-1] != E[i+1] - E[i]

(the x-grid is nonuniform)

FIR_coeffs = numpy array it has length about 57 points.

It was obtained by reversing of theoretically known signal - to match.

fir_coeffs = template[::-1]

det = signal.lfilter(fir_coeffs, 1, init_signal, zi=None)

But, the result actually is always shifted because of the delay of the filter - see the figure.

delay between result of filtration (blue) and the initial signal (red)

Is it possible to shift back the result of filtration - to "remove the delay" between the signal and filtration result?

It is neededIn general - I need to get zero-phase matched filtrated signal as a result to compare it with the initial signal and calculate the coordinates of regions of interest using filtration results.

Is it possible to align the curves so as to remove the delay - at least on graphs?

Maybe there is a better way to do matched filtering using Python in this case? Please provide me with examples if possible. Thanks in advance.

I am trying to build a filter for the detection of signals with the known form in noisy and low-amplitude data.

I used a simple example in Python provided here: https://www.youtube.com/watch?v=XXLV9g6RQQ4

but for the data I have.

initial_signal is a numpy array, it has length of 8000 points.

(for each element of initial_signal array we have the x-value - coordinate E for the signal.) it's important to note, that the distance between sample points can vary, so

E[i] - E[i-1] != E[i+1] - E[i]

(the x-grid is nonuniform)

FIR_coeffs = numpy array it has length about 57 points.

It was obtained by reversing of theoretically known signal - to match.

fir_coeffs = template[::-1]

det = signal.lfilter(fir_coeffs, 1, init_signal, zi=None)

But, the result actually is always shifted because of the delay of the filter - see the figure.

delay between result of filtration (blue) and the initial signal (red)

Is it possible to shift back the result of filtration - to "remove the delay" between the signal and filtration result?

It is needed to compare with the initial signal and calculate the coordinates of regions of interest using filtration results.

Is it possible to align the curves so as to remove the delay - at least on graphs?

Maybe there is a better way to do matched filtering in this case? Please provide me with examples if possible. Thanks in advance.

I am trying to build a filter for the detection of signals with the known form in noisy and low-amplitude data.

I used a simple example in Python provided here: https://www.youtube.com/watch?v=XXLV9g6RQQ4

but for the data I have.

initial_signal is a numpy array, it has length of 8000 points.

(for each element of initial_signal array we have the x-value - coordinate E for the signal.) it's important to note, that the distance between sample points can vary, so

E[i] - E[i-1] != E[i+1] - E[i]

(the x-grid is nonuniform)

FIR_coeffs = numpy array it has length about 57 points.

It was obtained by reversing of theoretically known signal - to match.

fir_coeffs = template[::-1]

det = signal.lfilter(fir_coeffs, 1, init_signal, zi=None)

But, the result actually is always shifted because of the delay of the filter - see the figure.

delay between result of filtration (blue) and the initial signal (red)

Is it possible to shift back the result of filtration - to "remove the delay" between the signal and filtration result?

In general - I need to get zero-phase matched filtrated signal as a result to compare it with the initial signal and calculate the coordinates of regions of interest using filtration results.

Maybe there is a better way to do matched filtering using Python in this case? Please provide me with examples if possible. Thanks in advance.

Source Link

Understanding Matched Filter, delay

I am trying to build a filter for the detection of signals with the known form in noisy and low-amplitude data.

I used a simple example in Python provided here: https://www.youtube.com/watch?v=XXLV9g6RQQ4

but for the data I have.

initial_signal is a numpy array, it has length of 8000 points.

(for each element of initial_signal array we have the x-value - coordinate E for the signal.) it's important to note, that the distance between sample points can vary, so

E[i] - E[i-1] != E[i+1] - E[i]

(the x-grid is nonuniform)

FIR_coeffs = numpy array it has length about 57 points.

It was obtained by reversing of theoretically known signal - to match.

fir_coeffs = template[::-1]

det = signal.lfilter(fir_coeffs, 1, init_signal, zi=None)

But, the result actually is always shifted because of the delay of the filter - see the figure.

delay between result of filtration (blue) and the initial signal (red)

Is it possible to shift back the result of filtration - to "remove the delay" between the signal and filtration result?

It is needed to compare with the initial signal and calculate the coordinates of regions of interest using filtration results.

Is it possible to align the curves so as to remove the delay - at least on graphs?

Maybe there is a better way to do matched filtering in this case? Please provide me with examples if possible. Thanks in advance.