Sie sind auf Seite 1von 6

Interpolation vs.

Filtering in Phase-Locking Analysis


Bryan Zheng
(Dated: Summer 2017)

I. INTRODUCTION

I recently analyzed the effect on phase-locking after administration of serotonin. The conclusions from that were that
there were no obvious changes in respiration phase from the pre-spontaneous to post-spontaneous spikes. However,
the analysis also showed minimal phase-locking in baseline conditions, which is counter to previous research and
subjective analysis. The cause of this discrepancy is unclear but it is quite possible I did the previous analysis wrong.
The purpose of this summary is to effectively re-make the phase plots with linear interpolation of the respiration
cycles, and to compare the results with a different method: filtering.

II. THE DATA

One conclusion that could be fairly confidently drawn from my previous phase analysis was that Tim did not leave
behind a significant number of days with usable spike data. The following analysis was done on spike and respiration
data from only one Drug day that was determined to be useful (November 17, 2016). The raw trace of one of the
spontaneous files (post-drug 1) is shown below with the minimum standard deviation for spike detection show in red.

FIG. 1: Raw spike data where the red line represents the threshold standard deviation (in this case 4)

In addition to the raw spike data showing relatively good activity, the clusters generated by wave clus also showed
clearly differentiable spikes with high signal-to-noise ratios and low variation. An example is shown below

FIG. 2: Example of clusters that wave clus calculates

III. METHOD

Instead of using the Hilbert Transform and Matlabs Butterworth filter, I used linear interpolation to deconstruct
the respiration signal. The reasoning behind this change was that filtering the data makes the function more sinusoidal,
while in reality, the respiration signal is subjectively asymmetrical. In other words, the time from trough to peak is
2

uniformly and considerably less than the time from peak to trough. Forcing a symmetrical periodic function on to
the trace would likely result in systematic errors in phase analysis.

FIG. 3: Visual inspection of asymmetrical respiration cycle

Furthermore, the proposed method of interpolation was to detect the peaks and troughs, and linear interpolate the
first half of the cycle as the trough to peak interval, and the second half of the cycle as the peak to trough. The major
obstacle in this was to generate a function that was able to reliably find the maxima and minima, without also local
maxima and minima in the noise.

I found an open source function called peakdetect that adequately finds the appropriate extrema, but predictable
requires calibration of 2 of its parameters. The consequence of this is that I could not generate a batch script to analyze
all spontaneous data at once, since each of the spontaneous respiration files required adjusting said paramaters. An
example of the points that peakdetect generates is shown below. To find the troughs, I simply negated the data and
inputted it into peakdetect again.

FIG. 4: Visual inspection of asymmetrical respiration cycle

From here, it just required locating the indices of the spikes relative to the nearest trough and peak and interpolating
properly. My script was verified against the Butterworth filter in the discussion below.
3

IV. RESULTS

My analysis produces a phase histogram, and 2 polar plots that show all spike locations and the average spike
location. The figures generated by all 5 spontaneous are shown below. Additionally, the average phase may not be
the best method of analyzing phase-locking since purely random data has the same average as tightly-locked spikes
at 180 . Thus, the standard deviations for the phases are stated in their respective captions. For my own record,
the adjusted parameter for peakdetect is also stated in the captions


FIG. 5: Sponatenous 1 (Pre-Drug). STDEV = 86, par = 12


FIG. 6: Sponatenous 2 (Post-Drug 1). STDEV = 88, par = 7
4


FIG. 7: Sponatenous 3 (Post-Drug 2). STDEV = 84, par = 7


FIG. 8: Sponatenous 4 (Post-Drug 3). STDEV = 96, par = 8
5


FIG. 9: Sponatenous 5 (Post-Drug 4). STDEV = 113, par = 8

Inspection of these diagrams suggests significantly more phase-locking than my previous analysis. It gives a vague
suggestion that phase-locking decreased in each successful trial after drug-administration. However, this effect could
be from changes in the experiment set up rather than a true biological change in phase-locking after 5-HT infusion

V. INTERPOLATION VERSUS BUTTERWORTH

As a supplementary script, I compared the phase functions generated from interpolation and the Butterworth filter
provided Matlab.

FIG. 10: Superimposed phases functions from Butterworth filter (blue) and interpolation (red). The cycles
reset at essentially equal points.

In most chunks of the spontaneous data, the phases resemble the diagram above. The cycle resets to 0 at effectively
6

the same point in either case. In the red interpolation phases, the transition at 180 is clear, while the concavity of
the blue Butterworth phases changes at around the same time.

In theory, the interpolation method should be less time consuming and more representative of the asymmetry of the
function. However, when the respiration data shows large amplitude deviations from the regular cycles, the results
on the phases is shown below. These were infrequent in the voltage traces, and the effect does not have lasting effects
on the phases that follow, but the interpolation method is clearly unstable at these points.

FIG. 11: Superimposed phases functions from Butterworth filter (blue) and interpolation (red). The
interpolation method is unreliable when anomalies in the raw traces are present.

Das könnte Ihnen auch gefallen