-
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.
update(schemas): update social schemas to use the refactored Stream, …
…StreamGroup and Device
- Loading branch information
Showing
4 changed files
with
177 additions
and
186 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,12 @@ | ||
import aeon.io.reader as _reader | ||
from aeon.schema.streams import Stream | ||
|
||
|
||
class RfidEvents(Stream): | ||
|
||
def __init__(self, path): | ||
path = path.replace("Rfid", "") | ||
if path.startswith("Events"): | ||
path = path.replace("Events", "") | ||
|
||
super().__init__(_reader.Harp(f"RfidEvents{path}_32*", ["rfid"])) |
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,88 @@ | ||
import aeon.io.reader as _reader | ||
from aeon.schema.streams import Stream, StreamGroup | ||
from aeon.schema import core, foraging | ||
|
||
|
||
class Environment(StreamGroup): | ||
|
||
def __init__(self, path): | ||
super().__init__(path) | ||
|
||
EnvironmentState = core.EnvironmentState | ||
|
||
class BlockState(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Csv(f"{path}_BlockState_*", columns=["pellet_ct", "pellet_ct_thresh", "due_time"])) | ||
|
||
class LightEvents(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Csv(f"{path}_LightEvents_*", columns=["channel", "value"])) | ||
|
||
MessageLog = core.MessageLog | ||
|
||
|
||
class SubjectData(StreamGroup): | ||
def __init__(self, path): | ||
super().__init__(path) | ||
|
||
class SubjectState(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Csv(f"{path}_SubjectState_*", columns=["id", "weight", "type"])) | ||
|
||
class SubjectVisits(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Csv(f"{path}_SubjectVisits_*", columns=["id", "type", "region"])) | ||
|
||
class SubjectWeight(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Csv(f"{path}_SubjectWeight_*", columns=["weight", "confidence", "subject_id", "int_id"])) | ||
|
||
|
||
class Pose(Stream): | ||
|
||
def __init__(self, path): | ||
super().__init__(_reader.Pose(f"{path}_test-node1*")) | ||
|
||
|
||
class WeightRaw(Stream): | ||
|
||
def __init__(self, path): | ||
super().__init__(_reader.Harp(f"{path}_200_*", ["weight(g)", "stability"])) | ||
|
||
|
||
class WeightFiltered(Stream): | ||
|
||
def __init__(self, path): | ||
super().__init__(_reader.Harp(f"{path}_202_*", ["weight(g)", "stability"])) | ||
|
||
|
||
class Patch(StreamGroup): | ||
|
||
def __init__(self, path): | ||
super().__init__(path) | ||
|
||
class DepletionState(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Csv(f"{path}_State_*", columns=["threshold", "offset", "rate"])) | ||
|
||
Encoder = core.Encoder | ||
|
||
Feeder = foraging.Feeder | ||
|
||
class ManualDelivery(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Harp(f"{path}_201_*", ["manual_delivery"])) | ||
|
||
class MissedPellet(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Harp(f"{path}_202_*", ["missed_pellet"])) | ||
|
||
class RetriedDelivery(Stream): | ||
def __init__(self, path): | ||
super().__init__(_reader.Harp(f"{path}_203_*", ["retried_delivery"])) | ||
|
||
|
||
class RfidEvents(Stream): | ||
|
||
def __init__(self, path): | ||
super().__init__(_reader.Harp(f"{path}_32*", ["rfid"])) |