Submodule: filters

Gaussian_blur

class flika.process.filters.Gaussian_blur

gaussian_blur(sigma, norm_edges=False, keepSourceWindow=False)

This applies a spatial gaussian_blur to every frame of your stack.

Parameters:
  • sigma (float) – The width of the gaussian
  • norm_edges (bool) – If true, this reduces the values of the pixels near the edges so they have the same standard deviation as the rest of the image
Returns:

flika.window.Window

Difference_of_Gaussians

class flika.process.filters.Difference_of_Gaussians

gaussian_blur(sigma1, sigma2, keepSourceWindow=False)

This subtracts one gaussian blurred image from another to spatially bandpass filter.

Parameters:
  • sigma1 (float) – The width of the first gaussian
  • sigma2 (float) – The width of the first gaussian
Returns:

flika.window.Window

Butterworth_filter

class flika.process.filters.Butterworth_filter

butterworth_filter(filter_order, low, high, framerate, keepSourceWindow=False)

This filters a stack in time.

Parameters:
  • filter_order (int) – The order of the butterworth filter (higher order -> steeper cutoff).
  • low (float) – The low frequency cutoff. Must be between 0 and 1 and must be below high.
  • high (float) – The high frequency cutoff. Must be between 0 and 1 and must be above low.
  • framerate (float) – The framerate in Hz. If set to zero, a framerate of 2 Hz will be used, so as to set the Nyquist frequency to 1. Default is 0.
Returns:

newWindow

Mean_filter

class flika.process.filters.Mean_filter

mean_filter(nFrames, keepSourceWindow=False)

This filters a stack in time.

Parameters:nFrames (int) – Number of frames to average
Returns:newWindow

Variance_filter

class flika.process.filters.Variance_filter

variance_filter(nFrames, keepSourceWindow=False)

This filters a stack in time.

Parameters:nFrames (int) – Number of frames to take teh variance of
Returns:newWindow

Median_filter

class flika.process.filters.Median_filter

median_filter(nFrames, keepSourceWindow=False)

This filters a stack in time.

Parameters:nFrames (int) – Number of frames to average. This must be an odd number
Returns:newWindow

Fourier_filter

class flika.process.filters.Fourier_filter

fourier_filter(frame_rate, low, high, loglogPreview, keepSourceWindow=False)

I’m going to eventually plot the trace in the frequency domain inside this box so you can see where the power is.

Parameters:
  • frame_rate (int) – Frame Rate in Hz
  • low (float) – Low cutoff frequency for the fourier filter
  • high (float) – High cutoff frequency for fourier filter
  • loglogPreview (boolean) – whether or not to plot frequency spectrum on log log axes

Difference_filter

class flika.process.filters.Difference_filter

difference_filter(keepSourceWindow=False)

Subtracts each frame from the preceeding frame

Returns:newWindow

Boxcar_differential_filter

class flika.process.filters.Boxcar_differential_filter

boxcar_differential_filter(minNframes, maxNframes, keepSourceWindow=False)

Applies a Boxcar differential filter by comparing each frameat index I to the frames in range [I+minNframes, I+maxNframes]

Parameters:
  • minNframes (int) – The starting point of your boxcar window.
  • maxNframes (int) – The ending point of your boxcar window.
Returns:

newWindow

Wavelet_filter

class flika.process.filters.Wavelet_filter

wavelet_filter(low, high, keepSourceWindow=False)

*Warning!! This function is extremely slow.*

Parameters:
  • low (int) – The starting point of your boxcar window.
  • high (int) – The ending point of your boxcar window.
Returns:

newWindow

Bilateral_filter

class flika.process.filters.Bilateral_filter

bilateral_filter( keepSourceWindow=False)

Parameters:
  • soft (bool) – True for guassian, False for hard filter
  • beta (float) – beta of kernel
  • width (float) – width of kernel
  • stoptol (float) – tolerance for convergence
  • maxiter (int) – maximum number of iterations
Returns:

newWindow