Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add RWSLFP recording #44

Merged
merged 17 commits into from
Mar 20, 2024
Merged
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
Loading