The NeuroGeriatricMotionToolbox (NGMT) is a Python-based toolbox for processing motion data.
Project description
NGMT
Welcome to the NeuroGeriatricMotionToolbox (NGMT). We are a Python based toolbox for processing motion data.
The toolbox is currently under development and is not yet ready for use.
The toolbox is aimed at a wide variety of motion researchers who want to use open souce software to process their data. We have implemented a wide variety of functions to process motion data, such as:
- Gait sequence detection (GSD)
- Inital contact detection (ICD)
- More to follow ...
The idea is that various motion data can be loaded into our dedicated dataclasses which rely on principles from the Motion-BIDS standard.
Relation of data classes
classDiagram
class RawData {
FilePath: str
FileName: str
}
class FileInfo {
SubjectID: str
TaskName: str
DatasetName: str
FilePath: str
}
class ChannelData {
name: List[str]
component: List[str]
ch_type: List[str]
tracked_point: List[str]
units: List[str]
get_channel_units()
}
class EventData {
name: List[str]
onset: List[float]
duration: List[float]
trial_type: Optional[List[str]] = None
add_events()
}
class RecordingData {
name: str
data: np.ndarray
sampling_frequency: float
times: np.1darray
channels: ChannelData
start_time: float
pick_channel_types()
plot_events()
}
class MotionData {
data: List[RecordingData]
times: np.ndarray # Can be a 1D array representing timestamps
info: List[FileInfo]
synchronise_recordings(self, systems: List[RecordingData]):
}
RecordingData --> MotionData: raw data with same sampling rate
ChannelData --> RecordingData: info per channel
EventData --> RecordingData: info about potential events
FileInfo --> MotionData: indent on disk
FileInfo --> ChannelData: info per channel
FileInfo --> RecordingData: raw time series data
FileInfo --> EventData: Include events if available in raw data
RawData --> FileInfo: Get info from file
This is the planned class structure for motion data. Data from any file format can ultimately be imported into the MotionData
class. The MotionData
object contains a FileInfo
object. The FileInfo
object contains information about the file, such as the subject ID, the task name, the project name and the file path. The MotionData
class also contains a list of RecordingData
objects.
Each RecordingData
object contains the raw data, the sampling rate, the time stamps and the channel info (ChannelData
) of a tracking system. It is up to the user how to group the source data into a tracking system.
The RecordingData
object can also contain information about events. The EventData
objects stores information about events such as onset or duration.
The ChannelData
object is used to store the channel name, the channel type, the channel units and the tracked point.
Documentation
The full documentation can be found here.
Installation
The toolbox has been released on pypi and can be installed via pip:
pip install ngmt
It requires Python 3.10 or higher.
Authors
Masoud Abedinifar, Clint Hansen, Walter Maetzler, Robbin Romijnders & Julius Welzel
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.