Sleep Stage Rename
Module name: SleepStageRename
Package: CEAMSModules 7.4.0
Version: 2.0.0
Overview
Rename sleep stage annotation.
Inputs
Input |
Format |
Default |
Description |
|---|---|---|---|
|
pandas DataFrame |
— |
List of events to rename (columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’]). |
|
string (dict converted into a string) |
{‘stage’:’stage’} |
Dict where the key is the original group and the value is the new group. |
|
string (dict converted into a string) |
{‘wake’: ‘wake’, ‘N1’: ‘N1’, ‘N2’: ‘N2’, ‘N3’: ‘N3’, ‘N4’: ‘N4’, ‘R’: ‘R’, ‘movement’: ‘movement’, ‘tech’: ‘tech’, ‘unscored’: ‘unscored’} |
Dict where the values are the original annotation names.
The keys are specified into plugin/PSGReader/commons.py
ex) sleep_stages_name = {
“wake”: “Eveil”,
“N1”: “Stade1”,
“N2”: “Stade2”,
…
|
|
string (dict converted into a string) |
{‘wake’: ‘wake’, ‘N1’: ‘N1’, ‘N2’: ‘N2’, ‘N3’: ‘N3’, ‘N4’: ‘N4’, ‘R’: ‘R’, ‘movement’: ‘movement’, ‘tech’: ‘tech’, ‘unscored’: ‘unscored’} |
Dict where the values are the new annotation names.
The keys are specified into plugin/PSGReader/commons.py
ex) sleep_stages_name = {
“wake”: “0”,
“N1”: “1”,
“N2”: “2”,
…
|
Outputs
Output |
Format |
Description |
|---|---|---|
|
pandas DataFrame |
List of events (columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’]) |
Usage in a process
Open Dev Tools -> New process in Snooz.
In the Module Library, find Sleep Stage Rename under the Events Utilities category.
Drag the module onto the process canvas.
Connect the required inputs from upstream modules (or set values in the Settings tab).
Connect outputs to downstream modules as needed.
Double-click the module to configure parameters in the Settings tab.
Run the process and inspect results in the Results tab.
Note
For general guidance on building processes with modules, see Explore examples.