Drop/Rename Events
Module name: DropRenameEvents
Package: CEAMSModules 7.4.0
Version: 2.0.0
Overview
To drop events and/or rename events group and/or name.
We suppose that the output file has already all the events. We want to rename some events (events_to_rename), so new_events is only the new set of events renamed (all untouched events are not included in new_events). We also want to drop some events (events_to_drop_in).
Warning
the renamed events are added as new_events, so we need to drop the original (not renamed) events. The output “events_to_drop_out” also include the original events that has been renamed.
Warning
if the renamed events also exists in the original events, they will be deleted by the PSgWriter, they must be added on the new_events. I.E. renaming the stage 4 to stage 3 will remove the original (valid) stage 3.
Inputs
Input |
Format |
Default |
Description |
|---|---|---|---|
|
pandas DataFrame columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’] |
— |
Original list of events. |
|
list of tuple |
— |
Events group and name to remove from the file.
ex. [(‘group1’, ‘name1’)
(‘group2’, ‘name2’)]
|
|
list of tuple |
— |
Events group and name to remove from the file.
ex. [(‘group1_ori’, ‘name1_ori’, ‘group1_new’, ‘name1_new’)
(‘group2_ori’, ‘name2_ori’, ‘group2_new’, ‘name2_new’)]
|
Outputs
Output |
Format |
Description |
|---|---|---|
|
pandas DataFrame columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’] |
Modified list of events (renamed and dropped if apply). |
|
list of tuple |
Events group and name to remove from the file.
ex. [(‘group1’, ‘name1’)
(‘group2’, ‘name2’)]
|
Usage in a process
Open Dev Tools -> New process in Snooz.
In the Module Library, find Drop/Rename Events 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.