-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
15 changed files
with
101 additions
and
26 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 @@ | ||
[flake8] | ||
# Recommend matching the black line length (default 88), | ||
# rather than using the flake8 default of 79: | ||
max-line-length = 88 | ||
extend-ignore = | ||
# See https://github.com/PyCQA/pycodestyle/issues/373 | ||
E203, |
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 @@ | ||
from .dataset import Dataset | ||
from .clibbids import Subject | ||
from .clibbids import Subject # type: ignore | ||
from .utils import qprompt | ||
|
||
|
||
Dataset | ||
Subject | ||
qprompt |
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,9 +1,13 @@ | ||
from .instrument import Instrument | ||
from .eeg_instrument import EEGInstrument | ||
from .physio_instrument import PhysioInstrument | ||
from .read_instrument import ReadInstrument | ||
from .stim_instrument import StimInstrument | ||
from .write_instrument import WriteInstrument | ||
|
||
EEGInstrument | ||
Instrument | ||
PhysioInstrument | ||
ReadInstrument | ||
StimInstrument | ||
WriteInstrument |
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 @@ | ||
class ReadInstrument |
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,31 @@ | ||
import numpy as np | ||
from abc import abstractmethod | ||
|
||
from .instrument import Instrument | ||
|
||
|
||
class ReadInstrument(Instrument): | ||
"""An instrument device capabale of recording data""" | ||
|
||
@abstractmethod | ||
def flush(self) -> None: | ||
"""Read from the device but throw away the data as a way to | ||
clear any data buffers from the device""" | ||
raise Exception("Method not implemented") | ||
|
||
@abstractmethod | ||
def read(self, remainder: bool = False) -> np.ndarray: | ||
"""Read data from the headset and return the data | ||
Parameters | ||
---------- | ||
remainder : bool | ||
Because EDFWriter only allows full seconds to be written, the last | ||
time this function should be called is with remainder set to true | ||
Returns | ||
------- | ||
np.ndarray | ||
A 2D array of data in the shape of (channels, time) | ||
""" | ||
raise Exception("Method not implemented") |
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,17 @@ | ||
from abc import abstractmethod | ||
|
||
from .instrument import Instrument | ||
|
||
|
||
class WriteInstrument(Instrument): | ||
|
||
@abstractmethod | ||
def write(self, command: str) -> None: | ||
"""A string command to send to the device | ||
Parameters | ||
---------- | ||
command : str | ||
The command to send to the device | ||
""" | ||
raise Exception("Method not implemented") |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "libbids" | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
description = "Library for generating data using the Brain Imaging Data Structure" | ||
authors = [ { name = "Kevin Davis", email = "[email protected]" } ] | ||
dependencies = [ | ||
|