Skip to content

Commit

Permalink
fix bug in TKLFP init, bump to v0.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnsen committed Nov 6, 2023
1 parent c5baff2 commit ffc47f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cleo/ephys/lfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ class TKLFPSignal(Signal, NeoExportable):
_t_ms_buffers: list[list[np.ndarray]] = field(init=False, factory=list, repr=False)
_buffer_positions: list[int] = field(init=False, factory=list, repr=False)

def init_for_probe(self, probe: Probe):
# inherit docstring
super().init_for_probe(probe)
self._elec_coords_mm = probe.coords / mm
def _post_init_for_probe(self):
self._elec_coords_mm = self.probe.coords / mm
# need to invert z coords since cleo uses an inverted z axis and
# tklfp does not
self._elec_coords_mm[:, 2] *= -1
Expand Down
4 changes: 4 additions & 0 deletions cleo/ephys/probes.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def init_for_probe(self, probe: Probe) -> None:
f"and cannot be used with another."
)
self.probe = probe
self._post_init_for_probe()

def _post_init_for_probe(self):
pass

@abstractmethod
def connect_to_neuron_group(self, neuron_group: NeuronGroup, **kwparams):
Expand Down

0 comments on commit ffc47f4

Please sign in to comment.