-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2506e0
commit 2d02135
Showing
8 changed files
with
67 additions
and
18 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# camera | ||
|
||
```{eval-rst} | ||
.. automodule:: miniscope_io.devices.camera | ||
:members: | ||
:undoc-members: | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# devices | ||
|
||
```{toctree} | ||
camera | ||
``` | ||
|
||
```{eval-rst} | ||
.. automodule:: miniscope_io.devices.device | ||
:members: | ||
:undoc-members: | ||
``` |
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
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,12 +1,49 @@ | ||
# Object Model | ||
|
||
```{currentmodule} miniscope_io | ||
``` | ||
|
||
## Devices | ||
|
||
```{autoclasstree} miniscope_io.models.PipelineModel miniscope_io.models.Node miniscope_io.models.Source miniscope_io.models.Sink miniscope_io.models.ProcessingNode miniscope_io.models.Pipeline | ||
A "{class}`.Device`" is the top-level class that one is expected to interact with when recording | ||
data. | ||
|
||
It encapsulates a {class}`.Pipeline` object that parameterizes one of several | ||
{class}`.Source` nodes (like the {class}`.okDev`, {class]`.SDCard`, etc.), | ||
zero-to-several {class}`.ProcessingNode`s that transform the source ouput, | ||
and then one or several {class}`.Sink` nodes for saving data, plotting, and so on. | ||
|
||
```{autoclasstree} miniscope_io.devices.Device miniscope_io.devices.Camera miniscope_io.devices.Miniscope | ||
:namespace: miniscope_io | ||
``` | ||
|
||
## Pipeline | ||
|
||
A {class}`.Pipeline` is the basic unit of data processing in miniscope-io. | ||
|
||
A {class}`.Pipeline` contains a set of {class}`.Node`s, which have three root types: | ||
|
||
- {class}`.Source` nodes have outputs but no inputs | ||
- {class}`.Sink` nodes have inputs but no outputs | ||
- {class}`.ProcessingNode`s have both inputs and outputs | ||
|
||
Nodes can be connected to any number of `input` or `output` nodes, | ||
and it is the responsibility of the {class}`.Pipeline` class to orchestrate | ||
their run: launching them in a threadqueue, passing data between them, etc. | ||
|
||
{class}`.Node`s should not directly call each other, and instead implement | ||
their {meth}`.Node.process` method as a "pure"-ish[^pureish] function that takes | ||
data as input and returns data as output without knowledge of the nodes | ||
that are connected to it. | ||
|
||
```{autoclasstree} miniscope_io.models.PipelineModel miniscope_io.models.Node miniscope_io.models.Source miniscope_io.models.Sink miniscope_io.models.ProcessingNode miniscope_io.models.Pipeline | ||
:namespace: miniscope_io | ||
``` | ||
|
||
## Config | ||
|
||
```{todo} | ||
Complete configuration documentation: | ||
- Sources of config - user dir, prepackaged, etc. | ||
- Types of config - device, session, etc. | ||
``` | ||
|
||
[^pureish]: As in nodes can be stateful and use their instance attributes, | ||
but should not rely on side-effects, implement their own queues, etc. |
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,3 +1,8 @@ | ||
""" | ||
Devices! | ||
""" | ||
|
||
from miniscope_io.devices.camera import Camera, Miniscope | ||
from miniscope_io.devices.device import Device | ||
|
||
__all__ = ["Camera", "Device", "Miniscope"] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.