aeon.io.reader#
- class aeon.io.reader.BitmaskEvent(pattern, value, tag)[source]#
Bases:
Harp
Extracts event data matching a specific digital I/O bitmask.
- Columns:
event (str): Unique identifier for the event code.
- class aeon.io.reader.Chunk(reader=None, pattern=None, extension=None)[source]#
Bases:
Reader
Extracts path and epoch information from chunk files in the dataset.
- class aeon.io.reader.Csv(pattern, columns, dtype=None, extension='csv')[source]#
Bases:
Reader
Extracts data from comma-separated (CSV) text files.
The first column stores the Aeon timestamp, in seconds.
- class aeon.io.reader.DigitalBitmask(pattern, mask, columns)[source]#
Bases:
Harp
Extracts event data matching a specific digital I/O bitmask.
- Columns:
event (str): Unique identifier for the event code.
- class aeon.io.reader.Encoder(pattern)[source]#
Bases:
Harp
Extract magnetic encoder data.
- Columns:
angle (float): Absolute angular position, in radians, of the magnetic encoder. intensity (float): Intensity of the magnetic field.
- class aeon.io.reader.Harp(pattern, columns, extension='bin')[source]#
Bases:
Reader
Extracts data from raw binary files encoded using the Harp protocol.
- class aeon.io.reader.Heartbeat(pattern)[source]#
Bases:
Harp
Extract periodic heartbeat event data.
- Columns:
second (int): The whole second corresponding to the heartbeat, in seconds.
- read(file)#
Reads data from the specified Harp binary file.
- class aeon.io.reader.Log(pattern)[source]#
Bases:
Csv
Extracts message log data.
- Columns:
priority (str): Priority level of the message. type (str): Type of the log message. message (str): Log message data. Can be structured using tab
separated values.
- read(file)#
Reads data from the specified CSV text file.
- class aeon.io.reader.Metadata(pattern='Metadata')[source]#
Bases:
Reader
Extracts metadata information from all epochs in the dataset.
- class aeon.io.reader.Pose(pattern, model_root='/ceph/aeon/aeon/data/processed')[source]#
Bases:
Harp
Reader for Harp-binarized tracking data given a model that outputs id, parts, and likelihoods.
- Columns:
class (int): Int ID of a subject in the environment. class_likelihood (float): Likelihood of the subject’s identity. part (str): Bodypart on the subject. part_likelihood (float): Likelihood of the specified bodypart. x (float): X-coordinate of the bodypart. y (float): Y-coordinate of the bodypart.
- static class_int2str(data, classes)[source]#
Converts a class integer in a tracking data dataframe to its associated string (subject id).
- Return type:
DataFrame
- static get_bodyparts(config_file)[source]#
Returns a list of bodyparts from a model’s config file.
- Return type:
list
[str
]
- static get_class_names(config_file)[source]#
Returns a list of classes from a model’s config file.
- Return type:
list
[str
]
- class aeon.io.reader.Position(pattern)[source]#
Bases:
Harp
Extract 2D position tracking data for a specific camera.
- Columns:
x (float): x-coordinate of the object center of mass. y (float): y-coordinate of the object center of mass. angle (float): angle, in radians, of the ellipse fit to the object. major (float): length, in pixels, of the major axis of the ellipse
fit to the object.
- minor (float): length, in pixels, of the minor axis of the ellipse
fit to the object.
area (float): number of pixels in the object mass. id (float): unique tracking ID of the object in a frame.
- read(file)#
Reads data from the specified Harp binary file.
- class aeon.io.reader.Reader(pattern, columns, extension)[source]#
Bases:
object
Extracts data from raw files in an Aeon dataset.
- pattern#
Pattern used to find raw files, usually in the format <Device>_<DataStream>.
- Type:
str
- columns#
Column labels to use for the data.
- Type:
str or array-like
- extension#
Extension of data file pathnames.
- Type:
str
- class aeon.io.reader.Subject(pattern)[source]#
Bases:
Csv
Extracts metadata for subjects entering and exiting the environment.
- Columns:
id (str): Unique identifier of a subject in the environment. weight (float): Weight measurement of the subject on entering
or exiting the environment.
event (str): Event type. Can be one of Enter, Exit or Remain.
- read(file)#
Reads data from the specified CSV text file.