Skip to content

Commit

Permalink
adds instructions for using curl if wget is not available. fixes erro…
Browse files Browse the repository at this point in the history
…r in quickstart.
  • Loading branch information
bnaecker committed Jan 5, 2017
1 parent e5b249c commit 0c9248f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ To download the data in HDF5 format, use the shell command:
$ wget https://github.com/baccuslab/pyret/raw/master/docs/tutorial-data.h5
To use ``curl`` instead of ``wget``, run:

.. code:: bash
$ curl -L -o tutorial-data.h5 https://github.com/baccuslab/pyret/raw/master/docs/tutorial-data.h5
To load the data, back in the Python shell, run:

>>> data_file = h5py.File('tutorial-data.h5', 'r')
Expand All @@ -67,6 +73,12 @@ To download and the data in the ``.npz`` file format, use the following command:
$ wget https://github.com/baccuslab/pyret/raw/master/docs/tutorial-data.npz
Or, using ``curl``:

.. code:: bash
$ curl -L -o tutorial-data.npz https://github.com/baccuslab/pyret/raw/master/docs/tutorial-data.npz
Then, in the Python shell, load the data with:

>>> arrays = np.load('tutorial-data.npz')
Expand Down Expand Up @@ -108,7 +120,7 @@ feature to which it responds. Because our data consists of spike times, we'll co
the *spike-triggered average* (STA) for the cell.

>>> filter_length_seconds = 0.5 # 500 ms filter
>>> filter_length = int(filter_length_second / data_file['stimulus'].attrs.get('frame-rate'))
>>> filter_length = int(filter_length_second / frame_rate)
>>> sta, tax = pyret.filtertools.sta(time, stimulus, spikes, filter_length)
>>> fig, axes = pyret.visualizations.plot_sta(tax[::-1], sta)
>>> axes[0].set_title('Recovered spatial filter (STA)')
Expand Down

0 comments on commit 0c9248f

Please sign in to comment.