The basic purpose of the network burst analyzer is to find bursts in a time series weĠll refer to as the trace, label them, and take statistics of them.

Note: all things in *italics* are variables that can be changed in the setup file if you want to
find a different sort of burst.
Other options that affect the preprocessing of the trace are discussed
adequately in the setup file description.

2. Find all local maxima in BP-Trace

3. Based on user-specified criteria, determine which maxima qualify as burst peaks in BP-Trace. This takes into account such things as a threshold, amplitude relative to bursts on either side, relative amplitudes of the left and right sides of the burst, etc.

4. Determine the burst extent (length and center) based on user-specified criteria. The two considerations are the derivative of the BP-Trace our (y-axis) distance from the peak, relative to nearby areas of the trace.

5. Determine the peak heights in the original trace and eliminate any that do not satisfy the threshold criteria.

6. Take detailed statistics of the bursts and interburst intervals, as well as overall trace statistics.

1.

A. Use a band pass filter going
between *primaryLowBand *and *primaryHighBand* Hz.
Next we'll look for the max, but often there will be maxima in the power
spectra near 0 Hz that will be very large and confuse the algorithm. So first we smooth the power spectra
with a smoothing size of *primarySmoothingSize*/dt (dt in milliseconds here). Then we walk down the
slope of the power spectra, starting at 0 Hz. Until we find a point that is more than 1.25 times larger
than the previous point, we 0 out that point in the power spectrum. Then we find the max.

B. Find the burst frequency in the graph by computing the power spectra and finding its maximum.

C. Band pass the trace again, this
time going between *secondaryLowBandMultiple**burst
frequency to the lower of *secondaryHighBandMultiple**burst frequency* *and *absoluteMaxSecondaryHighBandMultiple. *Then
smooth the resulting trace with a smoothing size of burst frequency / (*secondarySmoothingSize**dt (dt in milliseconds here too)).

2.

Also find all local minima, so that we can determine the amplitude of the bursts for the next step

3.

A. Loop until no bursts are eliminated in step iii.

i. Label potentially bad all bursts that are too asymmetrical, either relative to the other bursts in the trace or overall (bursts that satisfy inequality 1 or inequality 2 are labeled potentially bad)

ii. Label potentially bad all bursts that are both too small relative to the size of the largest nearby bursts (inequality 3) and too small compared to the largest burst in the trace (inequality 4). Also label potentially bad all bursts whose amplitudes are smaller than threshold (inequality 5) or whose thresholds are too small compared to the largest burst in the series (inequality 6).

iii. Whenever we have 1 or more consecutive bursts that have been labeled potentially bad, examine the bursts on the ends of the bad stretch. Remove the burst that has the lowest peak. Update the local minima for the other nearest potentially bad burst (the local minima is defined as the lowest point between the two nearest local maxima that we're still considering as possible bursts).

iv. Remove all labels (since the local minima may have changed in the last step, it may have caused the next nearest potentially bad burst to become fine by increasing its amplitude or making it more symmetrical, thus, we have to repeat the process over again).

4.

A. Take the derivative of the trace, assuming zero-flux at the start, call this D-trace

B. For simplicities sake, lets call the interval between the previous maxima and this maxima the nearest interval if weĠre looking for the start of the burst, and the interval between this maxima and the next the nearest interval if weĠre looking for the end of the burst. Then the first thing we do is take statistics on D-trace. We keep two sets of statistics, one for when the derivative is above 0 and one for when the derivative is below 0. ThereĠs two ways weĠll consider the burst to be over. The first is for the value of the BP-trace to drop below the average of the nearest interval. The second way is for neither of the following things be true:

i. The value of the burst drops below the average of the
nearest interval + *narrowness**std of the
nearest interval

ii. The value of the derivative drops below the average of the
derivative above zero on the nearest interval + *narrowness**std of derivative on the nearest interval (when
finding the start), or when the derivative goes above the average of the
derivative below zero on the nearest interval + *narrowness**std of derivative on the nearest interval (when
finding the end of the burst)

The reasons we look for these things is less than obvious. The main reason is, if the trace

ramping up really slowly, we may
not want the burst to be declared precisely at the average of the burst,
especially if the peak of the burst wasn't that high. This ensures that we'll always find the start of something
that looks like a burst and gives the user a degree of control over how wide
the identified bursts are.

5. In steps 3-4 we were using the Fourier smoothed trace), which may exaggerate a small feature that isn't really a burst if its right next to, for example, a change in baseline. Here we use inequality 5 again.

6. This step is very straight-forward

Asymmetry: how does the distance between the peak of the burst compare to pit (lowest point between this burst and the next burst) on the left side (leftAmplitude) vs. the right side (rightAmplitude). A value > 0 indicates that the left side is of greater amplitude, < 0 means the right side is of greater amplitude, and 0 indicates that theyĠre both perfectly equal. Asymmetry can range between -1 and 1.

Average Asymmetry is the expected value for Asymmetry over all bursts in a given trace.

Std Asymmetry is the standard deviation for Asymmetry over all bursts in a given trace

Min Side Amplitude is the lower of leftAmplitude and rightAmplitude for a given burst. We do this in case there was a drop in baseline one side or the other.

Largest Neighbor Amplitude is the largest min side amplitude among the burst in questions nearest neighboring bursts.

Largest Burst Amplitude is the largest min side amplitude among all the bursts in this trace

- (Absolute asymmetry):
- (Relative asymmetry):
- (Neighborhood
Threshold):

- (Global
Threshold OR)

- (Global
Threshold AND)

- (Global
Threshold)