Event Reader
Module name: EventReader
Package: CEAMSModules 7.4.0
Version: 3.0.0
Overview
Read events from a Tsv file
Inputs
Input |
Format |
Default |
Description |
|---|---|---|---|
|
string |
— |
The filename to read. |
|
string |
— |
Delimiter of the columns. |
|
integer |
1 |
The number of rows for the header. |
|
string |
utf_8 |
The file format encoding, default utf_8. |
|
integer |
1 |
The column index of the group |
|
string |
— |
Group event definition if group_col_i=0 |
|
integer |
2 |
The column index of the event names |
|
string |
— |
Name event definition if name_col_i=0. |
|
integer |
3 |
The column index of the onset of the events (always in elapsed time) |
|
integer |
4 |
The column index of the duration of the events |
|
integer |
5 |
The column index of the channel of the events |
|
— |
256 |
See module settings for configuration details. |
|
string |
seconds |
The specific input for the onset (start_sec) in the annotation file
If “seconds”, the content are in time (s)
if “samples”, the content are in samples
or any valid datetime string format, see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior
ex) “%H:%M:%S%f” for “14:30:45”
“%H%M%S%f” for “14:30:45.123456”
|
|
string |
seconds |
The specific input for the duration in the annotation file
If “seconds”, the content are in time (s)
if “samples”, the content are in samples
or any valid datetime string format, see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior
ex) “%H:%M:%S%f” for “14:30:45”
“%H%M%S%f” for “14:30:45.123456”
|
|
Bool |
0 |
If 1, the content of the onset is the event center
if 0, the content of the onset is the event onset
|
|
Bool |
0 |
If 1, the duration is disabled
if 0, the content of duration is valid
|
|
float |
— |
Valide only when dur_disable=1. The fixed duration_col_i of all the events. |
|
string of int |
0 |
‘1’ to read directly the input filename via read_csv and output the pandas datadrame of the file.
‘0’ to convert the filename into snooz dataframe columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’]
|
Outputs
Output |
Format |
Description |
|---|---|---|
|
Pandas DataFrame |
List of events |
|
string |
The input filename is return. |
Usage in a process
Open Dev Tools -> New process in Snooz.
In the Module Library, find Event Reader under the Files I/O 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.