-
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.
Provide descriptions for all actions
- Loading branch information
1 parent
7efa777
commit 7d70c31
Showing
50 changed files
with
172 additions
and
122 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,33 +1,47 @@ | ||
# Prerequisites | ||
# Architecture Overview | ||
|
||
This document provides a broad overview with some insights to how meggie is built and how that can be used for advantage. | ||
This document outlines the core structure of Meggie, offering insights into its construction and how developers can leverage its architecture. | ||
|
||
## Main classes | ||
There are three basic structures in Meggie. | ||
## Main Classes | ||
|
||
Meggie is structured around three fundamental classes: | ||
|
||
### MainWindow | ||
MainWindow contains the user interface, and is implemented with PyQt5. The most important elements of the MainWindow are the left panel, holding experiment-specific information, the bottom console, which logs user actions, and the right panel, which contains the tabs that are used for data transformations. | ||
|
||
MainWindow is the central hub of the user interface, built using PyQt5. Key components include: | ||
|
||
- Left Panel: Displays experiment-specific details. | ||
- Bottom Console: Logs user actions and system messages. | ||
- Right Panel: Hosts tabs for data transformation actions. | ||
|
||
### Experiment | ||
Experiment contains the highest-level container for all the data. It implements logic for saving and loading experiments and stores subjects within it. | ||
|
||
The Experiment class serves as the top-level container for all data, handling the saving and loading of experiments, and maintaining a collection of subjects. | ||
|
||
### Subject | ||
Subjects are added to experiments and store subject-specific data. Most importantly they are responsible for saving and loading the raw data, but they also store instances of datatypes. | ||
|
||
## Actions, pipelines and datatypes | ||
The analysis functionality is based on three key structures: actions, pipelines and datatypes. | ||
Subject instances are nested within experiments and are tasked with managing subject-specific data. Their primary roles are to handle the saving and loading of raw data and to hold instances of various datatypes. | ||
|
||
## Actions, Pipelines, and Datatypes | ||
|
||
Meggie's analytical capabilities are structured into actions, pipelines, and datatypes. | ||
|
||
### Datatypes | ||
Often the raw data can be summarized in structures that capture the essential features for the purpose of analysis. For example, based on event information, the raw data can split into small segments of data that are averaged together to create event-related responses. These kind of structures, e.g. epochs, evokeds, spectrums, TFRs, that are instantiated from prespecified datatypes, can be stored within subjects. In meggie, these “blueprints” are all stored, declared and implemented in the datatypes folder. | ||
|
||
Datatypes are templates for summarizing raw data into meaningful structures for analysis, such as epochs, evokeds, spectrums, and TFRs. These templates are defined within the datatypes folder and instantiated as needed to store within subjects. | ||
|
||
### Actions | ||
Actions are basic analysis steps such as “filter” or “create epochs”. In Meggie, each one of these is declared independently in its own folder within “actions” folder. Each action consists of metadata in “configuration.json” and python code. The entry point within the python code is assumed to inherit from the Action-class defined in mainwindow/dynamic.py. If done so, the actions can be embedded in pipelines, and are automatically logged in a backlog of actions. | ||
|
||
Actions represent fundamental analysis steps, like "filter" or "create epochs." Each action, located in its respective folder within the actions directory, comprises metadata in configuration.json and Python code. Actions inherit from the Action class in mainwindow/dynamic.py and can be integrated into pipelines and are automatically logged. | ||
|
||
### Pipelines | ||
Pipelines are sets of actions arranged as buttons within tabs in the GUI and correspond to certain types of analyses from the beginning to the end such as “Sensor-level continuous data analysis” or “Source-level evoked response analysis”. These are declared in the main configuration.json and as they utilize the actions for implementations, they do not include any python code. | ||
|
||
Pipelines organize actions into a sequence represented as buttons within the GUI tabs. They guide the user through a complete analysis workflow, such as "Sensor-level continuous data analysis." Pipelines are specified in the main configuration.json and rely on actions for implementation, thus containing no Python code themselves. | ||
|
||
## Plugins | ||
Creation of plugins is simple. Pipelines, datatypes and actions are dynamically located at the runtime and are loadable from other python packages from meggie namespace. Thus implementing a plugin corresponds to creating a python package (with name in the meggie namespace) which introduced pipelines, actions and/or datatypes. | ||
|
||
Creating plugins for Meggie is designed to be straightforward. The system dynamically locates pipelines, datatypes, and actions at runtime, allowing them to be loaded from external Python packages within the Meggie namespace. To create a plugin, one simply needs to develop a Python package named within the Meggie namespace that introduces new pipelines, actions, and/or datatypes. | ||
|
||
## API | ||
We thrive to keep the core of Meggie, which covers everything but the actions, as stable and reusable as possible. Thus as a plugin developer, you are allowed to use the API of MainWindow, Subject and Experiment classes, the four datatypes provided in the datatypes folder, as well as the functions, dialogs and widgets stored in the utilities folder. | ||
|
||
The core of Meggie, excluding the actions, is intended to be stable and reusable. Plugin developers are encouraged to utilize the API provided by the MainWindow, Subject, and Experiment classes. Additionally, developers have access to the four datatypes in the datatypes folder and various utilities, including functions, dialogs, and widgets, found in the utilities folder. |
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,2 +1,7 @@ | ||
# Plugin development | ||
Contents be here. | ||
# Development | ||
|
||
## Setting up | ||
|
||
For an example of a basic plugin template, please visit [Meggie Simple Plugin](https://github.com/cibr-jyu/meggie_simpleplugin) on GitHub. | ||
|
||
Actions, pipelines, and datatypes function identically, regardless of whether they originate from a plugin or from the core of Meggie. Therefore, examining the implementations within the Meggie repository is advisable for understanding their integration and usage. |
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 |
---|---|---|
@@ -1,3 +1,39 @@ | ||
# Experiments | ||
# Experiments in Meggie | ||
|
||
Contents be here. | ||
This section provides a straightforward overview of Meggie's layout and the steps for starting and managing experiments with subjects. | ||
|
||
## Layout Overview | ||
|
||
Meggie's interface is organized into two main columns: | ||
|
||
- Left Column: This area is your control panel for the experiment. Here, you add new subjects to your experiment and adjust settings like channel groups. It's the organizational hub for your data. | ||
|
||
- Right Column: This column contains the analysis tools, referred to as actions, which you'll apply to your data. These tools are arranged in tabs and are used to process the data step by step. | ||
|
||
## Starting an Experiment | ||
|
||
Begin by creating an experiment where you'll enter basic information such as the experiment's name and the person conducting it. You'll also choose a pipeline that fits your research needs. This helps keep the interface focused and guides you through the necessary steps. A folder for the experiment will be created to store all related files. | ||
|
||
## Adding Subjects | ||
|
||
After setting up your experiment, you can add subjects, which are your individual recordings, using the "Add new..." option in the left column. | ||
|
||
## Applying Actions | ||
|
||
In the right column, you'll find the actions you can apply to your data. These actions are designed to be used on all your subjects at once, making it efficient to process multiple datasets. | ||
|
||
## Preprocessing | ||
|
||
Meggie includes basic preprocessing features to improve the quality of your data. You can remove unwanted noise and apply filters to clean up the signals before further analysis. | ||
|
||
## Working with EEG and MEG Data | ||
|
||
Meggie is equipped to handle both EEG and MEG data. For EEG, it offers tools to add sensor locations and adjust channel references when necessary. | ||
|
||
## Managing Events | ||
|
||
Events, which are significant points in your recordings, can be managed within Meggie. This ensures you have control over important data points for analysis. | ||
|
||
## Progressing Through Analysis | ||
|
||
The goal is to transform raw recordings into data that can inform your research. You'll use actions to move through analysis stages, each tailored to bring out specific features of your data. |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"id": "epochs_delete_from_all", | ||
"name": "Delete from all", | ||
"entry": "DeleteEpochsFromAll" | ||
"entry": "DeleteEpochsFromAll", | ||
"description": "Permanently remove the selected epoch collection from all matching subjects." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "epochs_info", | ||
"name": "Epochs info", | ||
"entry": "Info" | ||
"entry": "Info", | ||
"description": "Extract information about the selected epoch collection." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "epochs_plot", | ||
"name": "Plot", | ||
"entry": "PlotEpochs" | ||
"entry": "PlotEpochs", | ||
"description": "Generate a simple plot for the selected epoch collection." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "epochs_plot_image", | ||
"name": "Plot image", | ||
"entry": "PlotEpochsImage" | ||
"entry": "PlotEpochsImage", | ||
"description": "Generate an image plot for the selected epoch collection." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_create", | ||
"name": "Create evoked", | ||
"entry": "CreateEvoked" | ||
"entry": "CreateEvoked", | ||
"description": "Compute the average of selected epoch collections independently. Each collection is averaged separately, resulting in a distinct average curve for each." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_delete", | ||
"name": "Delete", | ||
"entry": "DeleteEvoked" | ||
"entry": "DeleteEvoked", | ||
"description": "Permanently remove the selected evoked response object from the current subject." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_delete_from_all", | ||
"name": "Delete from all", | ||
"entry": "DeleteEvokedFromAll" | ||
"entry": "DeleteEvokedFromAll", | ||
"description": "Permanently remove the selected evoked response object from all matching subjects." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_group_average", | ||
"name": "Average over subjects", | ||
"entry": "GroupAverage" | ||
"entry": "GroupAverage", | ||
"description": "Calculate the average of the selected evoked response object across subjects, with options to group subjects before averaging." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_info", | ||
"name": "Evoked info", | ||
"entry": "Info" | ||
"entry": "Info", | ||
"description": "Extract information about the selected evoked response." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_plot", | ||
"name": "Plot", | ||
"entry": "PlotEvoked" | ||
"entry": "PlotEvoked", | ||
"description": "Generate a plot for the selected evoked response object. The response may be visualized for all channels individually or as an average across specified channel groups." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_plot_topomap", | ||
"name": "Plot topomaps", | ||
"entry": "PlotEvokedTopomap" | ||
"entry": "PlotEvokedTopomap", | ||
"description": "Produce a series of topographical maps at specified time intervals for the selected evoked response object." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "evoked_save", | ||
"name": "Save to csv", | ||
"entry": "SaveEvoked" | ||
"entry": "SaveEvoked", | ||
"description": "Export the numerical data from the evoked response object for all matching subjects into a CSV file." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "raw_event_info", | ||
"name": "Event info", | ||
"entry": "Info" | ||
"entry": "Info", | ||
"description": "Extract event information from the raw data." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "raw_events_from_annotations", | ||
"name": "Events from annotations", | ||
"entry": "EventsFromAnnotations" | ||
"entry": "EventsFromAnnotations", | ||
"description": "Create events from annotations for further analysis." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "raw_filter", | ||
"name": "Filter", | ||
"entry": "Filter" | ||
"entry": "Filter", | ||
"description": "Apply low-pass, high-pass, band-pass, and band-stop filters to raw data to isolate specific frequency ranges or remove unwanted frequencies." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "raw_ica", | ||
"name": "Artifact removal", | ||
"entry": "ICA" | ||
"entry": "ICA", | ||
"description": "Apply Independent Component Analysis (ICA) to raw data to identify and remove artifacts such as heartbeats and eye blinks." | ||
} |
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,5 +1,6 @@ | ||
{ | ||
"id": "raw_measurement_info", | ||
"name": "Measurement info", | ||
"entry": "Info" | ||
"entry": "Info", | ||
"description": "Extract measurement information from the raw data." | ||
} |
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
Oops, something went wrong.