Skip to content

Commit

Permalink
Merge branch 'dev' into lint_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gviejo authored Nov 6, 2024
2 parents 4b2db8f + 6132f60 commit cbea439
Show file tree
Hide file tree
Showing 26 changed files with 2,370 additions and 844 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,7 @@ tutorials/data/KA28-190405/

old
data
your
your

# Ignore npz files from testing:
tests/*.npz
10 changes: 5 additions & 5 deletions docs/api_guide/tutorial_pynapple_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
# -----------------
# The core functions of pynapple provides many ways to manipulate time series. In this example, spike times are restricted to the wake epoch. Notice how the frequencies change from the original object.

wake_ep = epochs["wake"]
wake_ep = epochs[epochs.tags == "wake"]

spikes_wake = spikes.restrict(wake_ep)
print(spikes_wake)
Expand Down Expand Up @@ -192,7 +192,7 @@
group=spikes_adn,
binsize=20, # ms
windowsize=4000, # ms
ep=epochs["wake"],
ep=epochs[epochs.tags == "wake"],
norm=True,
time_units="ms",
)
Expand All @@ -201,7 +201,7 @@
group=spikes_adn,
binsize=5, # ms
windowsize=400, # ms
ep=epochs["sleep"],
ep=epochs[epochs.tags == "sleep"],
norm=True,
time_units="ms",
)
Expand Down Expand Up @@ -251,7 +251,7 @@
decoded, proba_angle = nap.decode_1d(
tuning_curves=tuning_curves_adn,
group=spikes_adn,
ep=epochs["wake"],
ep=epochs[epochs.tags == "wake"],
bin_size=0.3, # second
feature=head_direction,
)
Expand Down Expand Up @@ -279,7 +279,7 @@
decoded_sleep, proba_angle_Sleep = nap.decode_1d(
tuning_curves=tuning_curves_adn,
group=spikes_adn,
ep=epochs["sleep"],
ep=epochs[epochs.tags == "sleep"],
bin_size=0.04, # second
feature=head_direction,
)
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/tutorial_HD_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
group=spikes_adn,
feature=angle,
nb_bins=61,
ep = epochs['wake'],
ep = epochs[epochs.tags == "wake"],
minmax=(0, 2 * np.pi)
)

Expand Down Expand Up @@ -170,7 +170,7 @@ def smoothAngularTuningCurves(tuning_curves, sigma=2):
decoded, proba_feature = nap.decode_1d(
tuning_curves=tuning_curves,
group=spikes_adn,
ep=epochs["wake"],
ep=epochs[epochs.tags == "wake"],
bin_size=0.1, # second
feature=angle,
)
Expand Down
Loading

0 comments on commit cbea439

Please sign in to comment.