Skip to content

Commit 31d4e06

Browse files
committed
Solve merge conflicts
2 parents 2a1b9fe + b57bfe9 commit 31d4e06

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@ Description of the extension
77

88
## Usage
99

10+
### Going from a `ndx_probeinterface.Probe` object to a `probeinterface.Probe` object
1011
```python
12+
import ndx_probeinterface
13+
pi_probe = ndx_probeinterface.to_probeinterface(ndx_probe)
14+
```
1115

16+
### Going from a `probeinterface.Probe` object to a `ndx_probeinterface.Probe` object
17+
```python
18+
import ndx_probeinterface
19+
ndx_probe = ndx_probeinterface.from_probe(pi_probe)
1220
```
1321

1422
---

src/pynwb/ndx_probeinterface/io.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,22 @@ def from_probegroup(probegroup: ProbeGroup):
5151
return devices
5252

5353

54-
def to_probeinterface(ndx_probeinterface_probe) -> Probe:
54+
def to_probeinterface(ndx_probe) -> Probe:
5555
"""
56-
Construct a probeinterface.Probe from ndx-probeinterface Probe
56+
Construct a probeinterface.Probe from ndx_probeinterface.Probe
5757
5858
Parameters
5959
----------
60-
ndx_probeinterface_probe: ndx_probeinterface.Probe
60+
ndx_probe: ndx_probeinterface.Probe
6161
ndx_probeinterface.Probe to convert to probeinterface.Probe
6262
6363
Returns
6464
-------
6565
Probe: probeinterface.Probe
6666
"""
67-
ndim = ndx_probeinterface_probe.ndim
68-
unit = inverted_unit_map[ndx_probeinterface_probe.unit]
69-
polygon = ndx_probeinterface_probe.planar_contour
67+
ndim = ndx_probe.ndim
68+
unit = inverted_unit_map[ndx_probe.unit]
69+
polygon = ndx_probe.planar_contour
7070

7171
positions = []
7272
shapes = []
@@ -78,7 +78,7 @@ def to_probeinterface(ndx_probeinterface_probe) -> Probe:
7878
device_channel_indices = None
7979

8080
possible_shape_keys = ["radius", "width", "height"]
81-
for shank in ndx_probeinterface_probe.shanks.values():
81+
for shank in ndx_probe.shanks.values():
8282
positions.append(shank.contact_table["contact_position"][:])
8383
shapes.append(shank.contact_table["contact_shape"][:])
8484
if "contact_id" in shank.contact_table.colnames:

0 commit comments

Comments
 (0)