ibllib.plots

ibllib.plots.color_cycle(ind=None)

Gets the matplotlib color-cycle as RGB numpy array of floats between 0 and 1 :return:

ibllib.plots.spectrum(w, fs, smooth=None, unwrap=True, axis=0, **kwargs)

Display spectral density of a signal along a given dimension spectrum(w, fs) :param w: signal :param fs: sampling frequency (Hz) :param smooth: (None) frequency samples to smooth over :param unwrap: (True) unwraps the phase specrum :param axis: axis on which to compute the FFT :param kwargs: plot arguments to be passed to matplotlib :return: matplotlib axes

ibllib.plots.squares(tscale, polarity, ax=None, yrange=[-1, 1], **kwargs)

Matplotlib display of rising and falling fronts in a square-wave pattern

Parameters:
  • tscale – time of indices of fronts
  • polarity – polarity of front (1: rising, -1:falling)
  • ax – matplotlib axes object
Returns:

None

ibllib.plots.vertical_lines(x, ymin=0, ymax=1, ax=None, **kwargs)

From a x vector, draw separate vertical lines at each x location ranging from ymin to ymax

Parameters:
  • x – numpy array vector of x values where to display lnes
  • ymin – lower end of the lines (scalar)
  • ymax – higher end of the lines (scalar)
  • ax – (optional) matplotlib axis instance
Returns:

None

ibllib.plots.wiggle(w, fs=1, gain=0.71, color='k', ax=None, fill=True, linewidth=0.5, t0=0, clip=2, **kwargs)

Matplotlib display of wiggle traces

Parameters:
  • w – 2D array (numpy array dimension nsamples, ntraces)
  • fs – sampling frequency
  • gain – display gain
  • color – (‘k’) color of traces
  • ax – (None) matplotlib axes object
  • fill – (True) fill variable area above 0
  • t0
    1. timestamp of the first sample
Returns:

None