Skip to content

Commit

Permalink
ruff and spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Aug 30, 2024
1 parent cee46c6 commit 59bfd8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The following diagram illustrates the structure of the data for a concrete examp


### Linking to units table
One way to make the information stored in the `BinnedAlignedSpikes` object more useful for future users is to indicate exactly which units or neurons the first dimension of the `data` attribute corresponds to. This is **optional but recommended** as it makes the data more meaningfull and easier to interpret. In NWB the units are usually stored in a `Units` [table](https://pynwb.readthedocs.io/en/stable/pynwb.misc.html#pynwb.misc.Units). To illustrate how to to create this link let's first create a toy `Units` table:
One way to make the information stored in the `BinnedAlignedSpikes` object more useful for future users is to indicate exactly which units or neurons the first dimension of the `data` attribute corresponds to. This is **optional but recommended** as it makes the data more meaningful and easier to interpret. In NWB the units are usually stored in a `Units` [table](https://pynwb.readthedocs.io/en/stable/pynwb.misc.html#pynwb.misc.Units). To illustrate how to to create this link let's first create a toy `Units` table:

```python
import numpy as np
Expand Down
7 changes: 4 additions & 3 deletions src/pynwb/tests/test_binned_aligned_spikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,9 @@ def setUp(self):
self.timestamps_first_condition = [5.0, 15.0]
self.timestamps_second_condition = [0.0, 10.0, 20.0]


data_list = [self.data_for_first_condition, self.data_for_second_condition]
self.data = np.concatenate(data_list, axis=1)

indices_list = [np.full(data.shape[1], condition_index) for condition_index, data in enumerate(data_list)]
self.condition_indices = np.concatenate(indices_list)

Expand Down Expand Up @@ -200,7 +199,9 @@ def test_constructor(self):
np.testing.assert_array_equal(
aggregated_binnned_align_spikes.condition_indices, self.condition_indices[self.sorted_indices]
)
np.testing.assert_array_equal(aggregated_binnned_align_spikes.event_timestamps, self.event_timestamps[self.sorted_indices])
np.testing.assert_array_equal(
aggregated_binnned_align_spikes.event_timestamps, self.event_timestamps[self.sorted_indices]
)
self.assertEqual(aggregated_binnned_align_spikes.bin_width_in_milliseconds, self.bin_width_in_milliseconds)
self.assertEqual(
aggregated_binnned_align_spikes.milliseconds_from_event_to_first_bin,
Expand Down

0 comments on commit 59bfd8e

Please sign in to comment.