Skip to content

Commit

Permalink
fixed typos in docs and quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
bnaecker committed Nov 16, 2016
1 parent d0714f2 commit 6fc55a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ firing rate of the RGC over time.
:width: 500px
:alt: Estimated RGC firing rate over time

One widely-used and informative description of the cell is it's receptive field. This
One widely-used and informative description of the cell is its receptive field. This
is a linear approximation to the function of the cell, and captures the average visual
feature to which it responds. Because our data consists of spike times, we'll compute
the *spike-triggered average* (STA) for the cell.
Expand All @@ -81,7 +81,7 @@ the *spike-triggered average* (STA) for the cell.
While the STA gives a lot of information, it is not the whole story. Real RGCs are definitely
*not* linear. One common way to correct for this fact is to fit a single, time-invariant
(static), point-wise nonlinearity to the data. This is a mapping between the linear response
to the real spiking data; in otherwords, it captures the difference between how the cell
to the real spiking data; in other words, it captures the difference between how the cell
*would response if it were linear* and how the cell actually responds.

The first step in computing a nonlinearity is to compute how the recovered linear
Expand Down Expand Up @@ -122,15 +122,16 @@ bins, so that each bin has roughly the same number of data points.
>>> binterp = pyret.nonlinearities.Binterp(nbins)
>>> binterp.fit(pred, rate[filter_length - 1 :])
>>> nonlin_range = (pred.min(), pred.max())
>>> binterp.plot(nonlin_range, linewdith=5, label='Binterp') # Plot nonlinearity over the given range
>>> binterp.plot(nonlin_range, linewidth=5, label='Binterp') # Plot nonlinearity over the given range

.. image:: /pyret-tutorial-figures/pred-vs-true-with-binterp.png
:height: 500px
:width: 500px
:alt: Predicted vs true firing rates for one RGC

One can also fit sigmoidal nonlinearities, or a nonlinearity using a Gaussian process
(which has some nice advantages, and returns errorbars automatically). These are shown below.
(which has some nice advantages, and returns errorbars automatically). More information
about these can be found in the full documentation.

We can now compare how well the full LN model captures the cell's response characteristics.

Expand Down
5 changes: 2 additions & 3 deletions pyret/filtertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def revcorr(response, stimulus, filter_length):
stimulus : array_like
A input stimulus correlated with the ``response``. Must be of shape
(t, ...), where t is the time and ... indicates any spatial dimensions.
``(t, ...)``, where ``t`` is the time and ``...`` indicates any spatial dimensions.
filter_length : int
The length of the returned filter, in samples of the ``stimulus`` and
Expand All @@ -672,8 +672,7 @@ def revcorr(response, stimulus, filter_length):
Raises
------
ValueError : If the ``stimulus`` and ``response`` arrays are of different
shapes.
ValueError : If the ``stimulus`` and ``response`` arrays are of different shapes.
Notes
-----
Expand Down

0 comments on commit 6fc55a0

Please sign in to comment.