-
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.
Merge pull request #51 from Aharoni-Lab/abc-camera
ABCs for Cameras & Pipelines
- Loading branch information
Showing
43 changed files
with
937 additions
and
66 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
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
# devices | ||
|
||
```{toctree} | ||
:max-depth: 2 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# pipeline | ||
|
||
```{eval-rst} | ||
.. automodule:: miniscope_io.models.pipeline | ||
: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 @@ | ||
# sources | ||
|
||
Interfaces to external source devices like miniscopes and DAQs | ||
|
||
## OpalKelly | ||
|
||
```{eval-rst} | ||
.. autoclass:: miniscope_io.sources.opalkelly.okDev | ||
: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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Capture Data | ||
|
||
```{toctree} | ||
wireless | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# CLI Usage | ||
|
||
Refer to the following page for details regarding `stream_daq` device config files. | ||
|
||
- [`stream_daq`](../api/stream_daq.html) | ||
|
||
```{eval-rst} | ||
.. click:: miniscope_io.cli.main:cli | ||
:prog: mio | ||
:nested: full | ||
``` |
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,5 @@ | ||
# Update Devices | ||
|
||
```{toctree} | ||
wireless | ||
``` |
2 changes: 1 addition & 1 deletion
2
docs/device/update_controller.md → docs/guide/update/wireless.md
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
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,49 @@ | ||
# Object Model | ||
|
||
## Devices | ||
|
||
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}`.Transform` nodes 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}`.Transform` nodes 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
""" | ||
Control interfaces for external hardware devices | ||
Devices! | ||
""" | ||
|
||
from miniscope_io.devices.camera import Camera, Miniscope | ||
from miniscope_io.devices.device import Device | ||
|
||
__all__ = ["Camera", "Device", "Miniscope"] |
Oops, something went wrong.