-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support callback for coordinate generation
- Loading branch information
Showing
3 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,46 @@ | ||
Working with custom microcircuit-MEA simulations | ||
Simulating Multielectrode Arrays | ||
================================================ | ||
|
||
.. note:: | ||
This How-To uses the :doc:`imperative interface <../tutorial/imperative-interface>`. | ||
A common system of interest in neural simulation are Multielectrode Arrays (MEA) which integrate multiple microelectrodes to obtain or deliver neural signals to the culture. | ||
|
||
To construct MEAs in simulation, you can position artificial STIM(umlus) cells that emulate delivering electrodes and/or position LFP readouts to emulate obtaining electrodes. | ||
|
||
A full code example can be found in the `MiV-Simulator-Cases repository <https://github.com/GazzolaLab/MiV-Simulator-Cases/blob/main/3-interface-api/microcircuit-mea.py>`__. | ||
Positioning 'electrode' STIM cells | ||
---------------------------------- | ||
|
||
Given the x,y,z coordinates of your MEA electrodes, you can insert them into the culture via a callback. | ||
|
||
.. code:: python | ||
# define callable that returns MEA coordinates | ||
def callable(n, extents): # -> (n, 3) | ||
... | ||
return xyz_coordinate_array | ||
"cell_distributions": { | ||
"STIM": { # generate STIM(ulus) cells | ||
"@callable": 64 # @ to invoke callable during generation | ||
}, | ||
... | ||
} | ||
"layer_extents": { | ||
"@callable": [ # extents definition | ||
[0.0, 0.0, 0.0], | ||
[200.0, 200.0, 150.0], | ||
], | ||
... | ||
} | ||
Positioning 'electrode' LFPs | ||
---------------------------- | ||
|
||
To emulate the readout feature of the electrodes, you can leverage the ``miv_simulator.lfp.LFP`` class. | ||
|
||
|
||
.. literalinclude:: ../MiV-Simulator-Cases/3-interface-api/interface/experiment/rc.py | ||
:language: python | ||
:linenos: | ||
:lines: 5,73-88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters