Skip to content

Commit 0119110

Browse files
committed
[DATALAD RUNCMD] chore: run codespell throughout fixing a few new typos automagically
=== Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent 285bb1e commit 0119110

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

resources/generate_cambridgeneurotech_libray.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
The script have been modified by Smauel Garcia ([email protected]):
99
* more pytonic
1010
* improve code readability
11-
* not more channel_device_index the order is the conatct index
11+
* not more channel_device_index the order is the contact index
1212
* simpler function for plotting.
1313
1414
2021-04-02
@@ -72,7 +72,7 @@
7272

7373
def convert_probe_shape(listCoord):
7474
'''
75-
This is to convert reference point probe shape inputed in excel
75+
This is to convert reference point probe shape inputted in excel
7676
as string 'x y x y x y that outline the shape of one shanck
7777
and can be converted to an array to draw the porbe
7878
'''
@@ -95,7 +95,7 @@ def get_contact_order(connector, probe_type):
9595
This will help to re-order the probe contact later on.
9696
"""
9797

98-
# first part of the function to opne the proper connector based on connector name
98+
# first part of the function to open the proper connector based on connector name
9999

100100
# header [0,1] is used to create a mutliindex
101101
df = pd.read_excel(probe_map_file, sheet_name=connector, header=[0,1])
@@ -188,7 +188,7 @@ def generate_CN_multi_shank(probe_info):
188188

189189
def create_CN_figure(probe_name, probe):
190190
"""
191-
Create custum figire for CN with custum colors + logo
191+
Create custom figire for CN with custom colors + logo
192192
"""
193193
fig, ax = plt.subplots()
194194
fig.set_size_inches(18.5, 10.5)

resources/generate_neuropixels_library.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def generate_all_npx():
5151

5252
probe = _make_npx_probe_from_description(pt_metadata, model_name, elec_ids, shank_ids)
5353

54-
# ploting
54+
# plotting
5555
fig, axs = plt.subplots(ncols=2)
5656

5757
ax = axs[0]

src/probeinterface/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def read_csv(file: str | Path):
728728

729729
def write_csv(file, probe):
730730
"""
731-
Write contact postions into a 2 or 3 columns csv file
731+
Write contact positions into a 2 or 3 columns csv file
732732
"""
733733

734734
raise NotImplementedError

src/probeinterface/neuropixels_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _load_np_probe_features():
6767
"NP2020": "2020",
6868
# Ultra
6969
"NP1100": "1100", # Ultra probe - 1 bank
70-
"NP1110": "1110", # Ultra probe - 16 banks no handle beacuse
70+
"NP1110": "1110", # Ultra probe - 16 banks no handle because
7171
"NP1121": "1121", # Ultra probe - beta configuration
7272
# Opto
7373
"NP1300": "1300", # Opto probe
@@ -103,7 +103,7 @@ def get_probe_length(probe_part_number: str) -> int:
103103
Returns
104104
-------
105105
probe_length : int
106-
Lenth of full probe (microns)
106+
Length of full probe (microns)
107107
"""
108108

109109
probe_length = 10_000
@@ -1128,7 +1128,7 @@ def get_saved_channel_indices_from_openephys_settings(
11281128
if len(possible_custom_streams) > 1:
11291129
warnings.warn(
11301130
f"More than one custom parameters associated to {stream_name} "
1131-
f"found. Using fisrt one"
1131+
f"found. Using first one"
11321132
)
11331133
custom_stream = possible_custom_streams[0]
11341134
else:

src/probeinterface/probe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ def add_probe_to_zarr_group(self, group: "zarr.Group") -> None:
11541154
data = probe_arr[field_name]
11551155
group.create_dataset(name=field_name, data=data, dtype=dtype, chunks=False)
11561156

1157-
# Annotations as a group (special attibutes are stored as annotations)
1157+
# Annotations as a group (special attributes are stored as annotations)
11581158
annotations_group = group.create_group("annotations")
11591159
for key, value in self.annotations.items():
11601160
annotations_group.attrs[key] = value

src/probeinterface/probegroup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def set_global_device_channel_indices(self, channels: np.array | list):
226226
f"Wrong channels size {channels.size} for the number of channels {self.get_contact_count()}"
227227
)
228228

229-
# first reset previsous indices
229+
# first reset previous indices
230230
for i, probe in enumerate(self.probes):
231231
n = probe.get_contact_count()
232232
probe.set_device_channel_indices([-1] * n)

src/probeinterface/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def generate_unique_ids(min: int, max: int, n: int, trials: int = 20) -> np.arra
113113
Parameters
114114
----------
115115
min : int
116-
Minimun value permitted for an identifier
116+
Minimum value permitted for an identifier
117117
max : int
118118
Maximum value permitted for an identifier
119119
n : int

src/probeinterface/wiring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
31, 30
6161
],
6262

63-
# from PDF documention of mini-amp-64 page 5
63+
# from PDF documentation of mini-amp-64 page 5
6464
'cambridgeneurotech_mini-amp-64': [
6565
# connector J2 TOP
6666
41, 39, 38, 37, 35, 34, 33, 32, 29, 30, 28, 26, 25, 24, 22, 20,

tests/test_io/test_spikeglx.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_NP2_4_shanks():
8686
assert np.all(probe.contact_shape_params == {"width": contact_width})
8787
assert np.all(probe.contact_shapes == contact_shape)
8888

89-
# This file does not save the channnels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
89+
# This file does not save the channels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
9090
ypos = probe.contact_positions[:, 1]
9191
assert np.min(ypos) == pytest.approx(0)
9292

@@ -109,7 +109,7 @@ def test_NP2_2013_all():
109109
assert np.all(probe.contact_shape_params == {"width": contact_width})
110110
assert np.all(probe.contact_shapes == contact_shape)
111111

112-
# This file does not save the channnels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
112+
# This file does not save the channels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
113113
ypos = probe.contact_positions[:, 1]
114114
assert np.min(ypos) == pytest.approx(0)
115115

@@ -132,7 +132,7 @@ def test_NP2_2013_subset():
132132
assert np.all(probe.contact_shape_params == {"width": contact_width})
133133
assert np.all(probe.contact_shapes == contact_shape)
134134

135-
# This file does not save the channnels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
135+
# This file does not save the channels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
136136
ypos = probe.contact_positions[:, 1]
137137
assert np.min(ypos) == pytest.approx(0)
138138

@@ -154,7 +154,7 @@ def test_NP2_4_shanks_with_different_electrodes_saved():
154154
assert np.all(probe.contact_shape_params == {"width": contact_width})
155155
assert np.all(probe.contact_shapes == contact_shape)
156156

157-
# This file does not save the channnels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
157+
# This file does not save the channels from 0 as the one above (NP2_4_shanks_g0_t0.imec0.ap.meta)
158158
ypos = probe.contact_positions[:, 1]
159159
assert np.min(ypos) == pytest.approx(4080.0)
160160
assert np.max(ypos) == pytest.approx(4785.0)

0 commit comments

Comments
 (0)