Overview
NeuroCenter® EEG offers the capability to operate in a headless mode via the command line, facilitating autonomous analyses of EEG files. To utilize this feature, it is essential to create a JSON script that outlines the specific analysis to be performed. This JSON script can subsequently be executed on multiple files by utilizing command line parameters, enhancing the efficiency of the analysis process.
JSON definition
The skeleton JSON definition for executing analyses in headless mode is outlined as follows:
{
"version": 1,
"mode": "analysis",
"parameters":
{
...
}
}
The significance of the JSON keys located within the root element is as follows:
|
Name |
Possible values |
Required |
Description |
|---|---|---|---|
|
version |
1 |
X |
The version of this script |
|
mode |
analysis |
X |
The type of headless script |
|
parameters |
object |
X |
Defines the parameters for this script |
Within the parameters object, it is essential to define several keys:
|
Name |
Possible values |
Required |
Description |
|---|---|---|---|
|
description |
text |
X |
Descriptive text which will be echoed back for debug purposes |
|
handler |
text |
X |
The NeuroCenter® EEG analysis plugin to use. Each analysis plugin handler has this format: com. clinicalsciencesystems. neurocenter. plugin. analysis. x, where x is substituted by the actual plugin name. |
|
plugin_parameters |
object |
X |
Defines the plugin parameters for this analysis plugin. |
|
save_markers |
boolean |
- |
Determines whether analysis result markers should be saved in the file. |
Executing a script
To execute the script from the command line, the following syntax should be utilized:
/path/to/executable/neurocenter_eeg-x11 --headless --script=script.json [/path/to/EEGfile.edf] (Linux)
/path/to/executable/neurocenter_eeg-macos --headless --script=script.json [/path/to/EEGfile.edf] (macOS)
\path\to\executable\neurocenter_eeg-w64 --headless --script=script.json [\path\to\EEGfile.edf] (Windows)
This process executes the script in accordance with the defined JSON script. Depending on the operating system in use, the console may respond immediately, allowing NeuroCenter® EEG to operate in headless mode in the background.