Skip to content

Commit 3313117

Browse files
authored
Merge pull request #348 from pynapple-org/change_to_relative_links
Change to relative links
2 parents 7212ca2 + 33dd2cc commit 3313117

9 files changed

+27
-27
lines changed

docs/api_guide/tutorial_pynapple_core.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
# Interval Sets object
7171
# --------------------
7272
#
73-
# The [IntervalSet](https://pynapple-org.github.io/pynapple/reference/core/interval_set/) object stores multiple epochs with a common time unit. It can then be used to restrict time series to this particular set of epochs.
73+
# The [IntervalSet](../../../reference/core/interval_set/) object stores multiple epochs with a common time unit. It can then be used to restrict time series to this particular set of epochs.
7474

7575

7676
epochs = nap.IntervalSet(start=[0, 10], end=[5, 15], time_units="s")
@@ -82,7 +82,7 @@
8282
print(new_tsd)
8383

8484
# %%
85-
# Multiple operations are available for IntervalSet. For example, IntervalSet can be merged. See the full documentation of the class [here](https://pynapple-org.github.io/pynapple/reference/core/interval_set/#pynapple.core.interval_set.IntervalSet.intersect) for a list of all the functions that can be used to manipulate IntervalSets.
85+
# Multiple operations are available for IntervalSet. For example, IntervalSet can be merged. See the full documentation of the class [here](../../../reference/core/interval_set/#pynapple.core.interval_set.IntervalSet.intersect) for a list of all the functions that can be used to manipulate IntervalSets.
8686

8787

8888
epoch1 = nap.IntervalSet(start=0, end=10) # no time units passed. Default is us.
@@ -132,7 +132,7 @@
132132
print(count)
133133

134134
# %%
135-
# One advantage of grouping time series is that metainformation can be added directly on an element-wise basis. In this case, we add labels to each Ts object when instantiating the group and after. We can then use this label to split the group. See the [TsGroup](https://pynapple-org.github.io/pynapple/reference/core/ts_group/) documentation for a complete methodology for splitting TsGroup objects.
135+
# One advantage of grouping time series is that metainformation can be added directly on an element-wise basis. In this case, we add labels to each Ts object when instantiating the group and after. We can then use this label to split the group. See the [TsGroup](../../../reference/core/ts_group/) documentation for a complete methodology for splitting TsGroup objects.
136136
#
137137
# First we create a pandas Series for the label.
138138

docs/api_guide/tutorial_pynapple_quick_start.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
Preprocessing of the data was made with [Kilosort 2.0](https://github.com/MouseLand/Kilosort) and spike sorting was made with [Klusters](https://neurosuite.sourceforge.net/).
99
10-
Instructions for installing pynapple can be found [here](https://pynapple-org.github.io/pynapple/#installation).
10+
Instructions for installing pynapple can be found [here](../../../installation).
1111
1212
***
1313
1414
This notebook is meant to provide an overview of pynapple by going through:
1515
16-
- **Input output (IO)**. In this case, pynapple will load a NWB file using the [NWBFile object](https://pynapple-org.github.io/pynapple/reference/io/interface_nwb/#pynapple.io.interface_nwb.NWBFile) within a project [Folder](https://pynapple-org.github.io/pynapple/reference/io/folder/) that represent a dataset.
17-
- **Core functions** that handle time series, interval sets and groups of time series. See this [notebook](https://pynapple-org.github.io/pynapple/generated/api_guide/tutorial_pynapple_core/) for a detailled usage of the core functions.
18-
- **Process functions**. A small collection of high-level functions widely used in system neuroscience. This [notebook](https://pynapple-org.github.io/pynapple/generated/api_guide/tutorial_pynapple_process) details those functions.
16+
- **Input output (IO)**. In this case, pynapple will load a NWB file using the [NWBFile object](../../../reference/io/interface_nwb/#pynapple.io.interface_nwb.NWBFile) within a project [Folder](../../../reference/io/folder/) that represent a dataset.
17+
- **Core functions** that handle time series, interval sets and groups of time series. See this [notebook](../../api_guide/tutorial_pynapple_core/) for a detailled usage of the core functions.
18+
- **Process functions**. A small collection of high-level functions widely used in system neuroscience. This [notebook](../../api_guide/tutorial_pynapple_process) details those functions.
1919
2020
"""
2121

@@ -63,13 +63,13 @@
6363

6464

6565
# %%
66-
# We can load the session with the function [load_folder](https://pynapple-org.github.io/pynapple/reference/io/misc/#pynapple.io.misc.load_folder). Pynapple will walks throught the folder and collects every subfolders.
66+
# We can load the session with the function [load_folder](../../../reference/io/misc/#pynapple.io.misc.load_folder). Pynapple will walks throught the folder and collects every subfolders.
6767
# We can use the attribute `view` or the function `expand` to display a tree view of the dataset. The treeview shows all the compatible data format (i.e npz files or NWBs files) and their equivalent pynapple type.
6868
data = nap.load_folder(DATA_DIRECTORY)
6969
data.view
7070

7171
# %%
72-
# The object `data` is a [`Folder`](https://pynapple-org.github.io/pynapple/reference/io/folder/) object that allows easy navigation and interaction with a dataset.
72+
# The object `data` is a [`Folder`](../../../reference/io/folder/) object that allows easy navigation and interaction with a dataset.
7373
# In this case, we want to load the NWB file in the folder `/pynapplenwb`. Data are always lazy loaded. No time series is loaded until it's actually called.
7474
# When calling the NWB file, the object `nwb` is an interface to the NWB file. All the data inside the NWB file that are compatible with one of the pynapple objects are shown with their corresponding keys.
7575
nwb = data["sub-A2929"]["A2929-200711"]["pynapplenwb"]["A2929-200711"]
@@ -79,7 +79,7 @@
7979
# %%
8080
# We can individually call each object and they are actually loaded.
8181
#
82-
# `units` is a [TsGroup](https://pynapple-org.github.io/pynapple/reference/core/ts_group/) object. It allows to group together time series with different timestamps and couple metainformation to each neuron. In this case, the location of where the neuron was recorded has been added when loading the session for the first time.
82+
# `units` is a [TsGroup](../../../reference/core/ts_group/) object. It allows to group together time series with different timestamps and couple metainformation to each neuron. In this case, the location of where the neuron was recorded has been added when loading the session for the first time.
8383
# We load `units` as `spikes`
8484
spikes = nwb["units"]
8585
print(spikes)
@@ -90,7 +90,7 @@
9090
print(neuron_0)
9191

9292
# %%
93-
# `neuron_0` is a [Ts](https://pynapple-org.github.io/pynapple/reference/core/time_series/#pynapple.core.time_series.Ts) object containing the times of the spikes.
93+
# `neuron_0` is a [Ts](../../../reference/core/time_series/#pynapple.core.time_series.Ts) object containing the times of the spikes.
9494

9595
# %%
9696
# The other information about the session is contained in `nwb["epochs"]`. In this case, the start and end of the sleep and wake epochs. If the NWB time intervals contains tags of the epochs, pynapple will try to group them together and return a dictionary of IntervalSet instead of IntervalSet.
@@ -147,7 +147,7 @@
147147
# ***
148148
# Tuning curves
149149
# -------------
150-
# Let's do a more advanced analysis. Neurons from ADn (group 0 in the `spikes` group object) are know to fire for a particular direction. Therefore, we can compute their tuning curves, i.e. their firing rates as a function of the head-direction of the animal in the horizontal plane (*ry*). To do this, we can use the function [`compute_1d_tuning_curves`](https://pynapple-org.github.io/pynapple/reference/process/tuning_curves/#pynapple.process.tuning_curves.compute_1d_tuning_curves). In this case, the tuning curves are computed over 120 bins and between 0 and 2$\pi$.
150+
# Let's do a more advanced analysis. Neurons from ADn (group 0 in the `spikes` group object) are know to fire for a particular direction. Therefore, we can compute their tuning curves, i.e. their firing rates as a function of the head-direction of the animal in the horizontal plane (*ry*). To do this, we can use the function [`compute_1d_tuning_curves`](../../../reference/process/tuning_curves/#pynapple.process.tuning_curves.compute_1d_tuning_curves). In this case, the tuning curves are computed over 120 bins and between 0 and 2$\pi$.
151151

152152
tuning_curves = nap.compute_1d_tuning_curves(
153153
group=spikes, feature=head_direction, nb_bins=121, minmax=(0, 2 * np.pi)
@@ -170,7 +170,7 @@
170170
plt.show()
171171

172172
# %%
173-
# While ADN neurons show obvious modulation for head-direction, it is not obvious for all CA1 cells. Therefore we want to restrict the remaining of the analyses to only ADN neurons. We can split the `spikes` group with the function [`getby_category`](https://pynapple-org.github.io/pynapple/reference/core/ts_group/#pynapple.core.ts_group.TsGroup.getby_category).
173+
# While ADN neurons show obvious modulation for head-direction, it is not obvious for all CA1 cells. Therefore we want to restrict the remaining of the analyses to only ADN neurons. We can split the `spikes` group with the function [`getby_category`](../../../reference/core/ts_group/#pynapple.core.ts_group.TsGroup.getby_category).
174174

175175
spikes_by_location = spikes.getby_category("location")
176176

@@ -186,7 +186,7 @@
186186
# ------------
187187
# A classical question with head-direction cells is how pairs stay coordinated across brain states i.e. wake vs sleep (see Peyrache, A., Lacroix, M. M., Petersen, P. C., & Buzsáki, G. (2015). Internally organized mechanisms of the head direction sense. Nature neuroscience, 18(4), 569-575.)
188188
#
189-
# In this example, this coordination across brain states will be evaluated with cross-correlograms of pairs of neurons. We can call the function [`compute_crosscorrelogram`](https://pynapple-org.github.io/pynapple/reference/process/correlograms/#pynapple.process.correlograms.compute_crosscorrelogram) during both sleep and wake epochs.
189+
# In this example, this coordination across brain states will be evaluated with cross-correlograms of pairs of neurons. We can call the function [`compute_crosscorrelogram`](../../../reference/process/correlograms/#pynapple.process.correlograms.compute_crosscorrelogram) during both sleep and wake epochs.
190190

191191
cc_wake = nap.compute_crosscorrelogram(
192192
group=spikes_adn,
@@ -240,7 +240,7 @@
240240
# This last analysis shows how to use the pynapple's decoding function.
241241
#
242242
# The previous result indicates a persistent coordination of head-direction cells during sleep. Therefore it is possible to decode a virtual head-direction signal even if the animal is not moving its head.
243-
# This example uses the function [`decode_1d`](https://pynapple-org.github.io/pynapple/reference/process/decoding/#pynapple.process.decoding.decode_1d) which implements bayesian decoding (see : Zhang, K., Ginzburg, I., McNaughton, B. L., & Sejnowski, T. J. (1998). Interpreting neuronal population activity by reconstruction: unified framework with application to hippocampal place cells. Journal of neurophysiology, 79(2), 1017-1044.)
243+
# This example uses the function [`decode_1d`](../../../reference/process/decoding/#pynapple.process.decoding.decode_1d) which implements bayesian decoding (see : Zhang, K., Ginzburg, I., McNaughton, B. L., & Sejnowski, T. J. (1998). Interpreting neuronal population activity by reconstruction: unified framework with application to hippocampal place cells. Journal of neurophysiology, 79(2), 1017-1044.)
244244
#
245245
# First we can validate the decoding function with the real position of the head of the animal during wake.
246246

@@ -285,7 +285,7 @@
285285
)
286286

287287
# %%
288-
# Here we are gonna chain the TsGroup function [`set_info`](https://pynapple-org.github.io/pynapple/reference/core/ts_group/#pynapple.core.ts_group.TsGroup.set_info) and the function [`to_tsd`](https://pynapple-org.github.io/pynapple/reference/core/ts_group/#pynapple.core.ts_group.TsGroup.to_tsd) to flatten the TsGroup and quickly assign to each spikes a corresponding value found in the metadata table. Any columns of the metadata table can be assigned to timestamps in a TsGroup.
288+
# Here we are gonna chain the TsGroup function [`set_info`](../../../reference/core/ts_group/#pynapple.core.ts_group.TsGroup.set_info) and the function [`to_tsd`](../../../reference/core/ts_group/#pynapple.core.ts_group.TsGroup.to_tsd) to flatten the TsGroup and quickly assign to each spikes a corresponding value found in the metadata table. Any columns of the metadata table can be assigned to timestamps in a TsGroup.
289289
#
290290
# Here the value assign to the spikes comes from the preferred firing direction of the neurons. The following line is a quick way to sort the neurons based on their preferred firing direction
291291
order = np.argsort(np.argmax(tuning_curves_adn.values, 0))

docs/api_guide/tutorial_pynapple_spectrum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Power spectral density
44
======================
55
6-
See the [documentation](https://pynapple-org.github.io/pynapple/) of Pynapple for instructions on installing the package.
6+
See the [documentation](/) of Pynapple for instructions on installing the package.
77
88
"""
99

docs/api_guide/tutorial_pynapple_wavelets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
The function `nap.generate_morlet_filterbank` can help parametrize and visualize the Morlet wavelets.
1212
13-
See the [documentation](https://pynapple-org.github.io/pynapple/) of Pynapple for instructions on installing the package.
13+
See the [documentation](/) of Pynapple for instructions on installing the package.
1414
1515
This tutorial was made by [Kipp Freud](https://kippfreud.com/).
1616

docs/examples/tutorial_HD_dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The NWB file for the example is hosted on [OSF](https://osf.io/jb2gd). We show below how to stream it.
88
The entire dataset can be downloaded [here](https://dandiarchive.org/dandiset/000056).
99
10-
See the [documentation](https://pynapple-org.github.io/pynapple/) of Pynapple for instructions on installing the package.
10+
See the [documentation](/) of Pynapple for instructions on installing the package.
1111
1212
This tutorial was made by Dhruv Mehrotra and Guillaume Viejo.
1313

docs/examples/tutorial_calcium_imaging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
1010
The NWB file for the example is hosted on [OSF](https://osf.io/sbnaw). We show below how to stream it.
1111
12-
See the [documentation](https://pynapple-org.github.io/pynapple/) of Pynapple for instructions on installing the package.
12+
See the [documentation](../../../) of Pynapple for instructions on installing the package.
1313
1414
This tutorial was made by Sofia Skromne Carrasco and Guillaume Viejo.
1515

docs/examples/tutorial_human_dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
The NWB file for the example used here is provided in [this](https://github.com/PeyracheLab/pynacollada/tree/main/pynacollada/Pynapple%20Paper%20Figures/Zheng%202022/000207/sub-4) repository. The entire dataset can be downloaded [here](https://dandiarchive.org/dandiset/000207/0.220216.0323).
1010
11-
See the [documentation](https://pynapple-org.github.io/pynapple/) of Pynapple for instructions on installing the package.
11+
See the [documentation](/) of Pynapple for instructions on installing the package.
1212
1313
This tutorial was made by Dhruv Mehrotra.
1414

docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ pynapple is a light-weight python library for neurophysiological data analysis.
4444

4545
Learn the pynapple API with notebooks.
4646

47-
[:octicons-arrow-right-24: API guide](https://pynapple.org/generated/api_guide/)
47+
[:octicons-arrow-right-24: API guide](generated/api_guide/)
4848

4949
- :material-brain:{ .lg .middle}   __Neural Analysis__
5050

5151
---
5252

5353
Explore fully worked examples to learn how to analyze neural recordings using pynapple.
5454

55-
[:octicons-arrow-right-24: Tutorials](https://pynapple.org/generated/examples/)
55+
[:octicons-arrow-right-24: Tutorials](generated/examples/)
5656

5757
- :material-cog:{ .lg .middle }   __API__
5858

5959
---
6060

6161
Access a detailed description of each module and function, including parameters and functionality.
6262

63-
[:octicons-arrow-right-24: Modules](https://pynapple.org/reference/)
63+
[:octicons-arrow-right-24: Modules](reference/)
6464

6565
- :material-hammer-wrench:{ .lg .middle }   __Installation Instructions__
6666

docs/quickstart.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Pynapple now implements signal processing. For example, to filter a 1250 Hz samp
1313
```python
1414
nap.apply_bandpass_filter(signal, (10, 20), fs=1250)
1515
```
16-
New functions includes power spectral density and Morlet wavelet decomposition. See the [documentation](https://pynapple-org.github.io/pynapple/reference/process/) for more details.
16+
New functions includes power spectral density and Morlet wavelet decomposition. See the [documentation](/reference/process/) for more details.
1717

1818
### pynapple >= 0.6
1919

20-
Starting with 0.6, [`IntervalSet`](https://pynapple-org.github.io/pynapple/reference/core/interval_set/) objects are behaving as immutable numpy ndarray. Before 0.6, you could select an interval within an `IntervalSet` object with:
20+
Starting with 0.6, [`IntervalSet`](/reference/core/interval_set/) objects are behaving as immutable numpy ndarray. Before 0.6, you could select an interval within an `IntervalSet` object with:
2121

2222
```python
2323
new_intervalset = intervalset.loc[[0]] # Selecting first interval
@@ -35,7 +35,7 @@ Starting with 0.4, pynapple rely on the [numpy array container](https://numpy.or
3535

3636
This allows for a better handling of returned objects.
3737

38-
Additionaly, it is now possible to define time series objects with more than 2 dimensions with `TsdTensor`. You can also look at this [notebook](https://pynapple-org.github.io/pynapple/generated/api_guide/tutorial_pynapple_numpy/) for a demonstration of numpy compatibilities.
38+
Additionaly, it is now possible to define time series objects with more than 2 dimensions with `TsdTensor`. You can also look at this [notebook](/generated/api_guide/tutorial_pynapple_numpy/) for a demonstration of numpy compatibilities.
3939

4040

4141
Basic Usage

0 commit comments

Comments
 (0)