Skip to content

Commit

Permalink
add RWSLFP recording (#44)
Browse files Browse the repository at this point in the history
* fix subgroup coords

* add wslfp dep

* start work on RWSLFPSignalFromSpikes

* get RWSLFPFromSpikes working

* clean up electrodes tutorial

* rwslfp working

* advanced LFP working

* remove template_trace.ipynb

* debugged RWSLFPFromPSCs

* progress testing RWSLFP

* finish RWSLFPFromSpikes test

* finish RWSLFP tests

* finish RWSLFP docs

* add sphinx duration extension

* add last LFP docstrings

* update copyright date

* bump to v0.14.0
  • Loading branch information
kjohnsen authored Mar 20, 2024
1 parent 96be1e5 commit d2215a4
Show file tree
Hide file tree
Showing 18 changed files with 1,553 additions and 436 deletions.
4 changes: 2 additions & 2 deletions cleo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Contains core classes and functions for the Cleo package."""
from __future__ import annotations

import cleo.coords

# auto-import submodules
import cleo.coords
import cleo.ephys
import cleo.imaging
import cleo.ioproc
Expand All @@ -17,6 +16,7 @@
CLSimulator,
InterfaceDevice,
IOProcessor,
NeoExportable,
Recorder,
Stimulator,
SynapseDevice,
Expand Down
11 changes: 10 additions & 1 deletion cleo/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import Tuple

from brian2 import Quantity, Unit, meter, mm, np
from brian2 import Quantity, Subgroup, Unit, meter, mm, np
from brian2.groups.group import Group
from brian2.groups.neurongroup import NeuronGroup
from brian2.units.fundamentalunits import get_dimensions
Expand Down Expand Up @@ -218,6 +218,15 @@ def _init_variables(group: Group):
else:
if type(group) == NeuronGroup:
modify_model_with_eqs(group, f"{dim_name}: meter")

elif isinstance(group, Subgroup):
if not hasattr(group.source, dim_name):
modify_model_with_eqs(group.source, f"{dim_name}: meter")
group.variables.add_references(
group.source, list(group.source.variables.keys())
)
assert dim_name in group.variables

elif issubclass(type(group), Group):
group.variables.add_array(
dim_name,
Expand Down
12 changes: 9 additions & 3 deletions cleo/ephys/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
"""Contains probes, convenience functions for generating electrode array coordinates,
signals, spiking, and LFP"""
from cleo.ephys.lfp import TKLFPSignal
from cleo.ephys.spiking import MultiUnitSpiking, SortedSpiking, Spiking
from cleo.ephys.lfp import (
LFPSignalBase,
RWSLFPSignalBase,
RWSLFPSignalFromPSCs,
RWSLFPSignalFromSpikes,
TKLFPSignal,
)
from cleo.ephys.probes import (
Probe,
Signal,
linear_shank_coords,
tetrode_shank_coords,
poly2_shank_coords,
poly3_shank_coords,
tetrode_shank_coords,
tile_coords,
)
from cleo.ephys.spiking import MultiUnitSpiking, SortedSpiking, Spiking
Loading

0 comments on commit d2215a4

Please sign in to comment.