Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D Documentation
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • anywave
  • Documentation
  • Wiki
  • get_data

get_data · Changes

Page history
Update get_data authored Jul 23, 2025 by Bruno Colombet's avatar Bruno Colombet
Show whitespace changes
Inline Side-by-side
Showing with 11 additions and 15 deletions
+11 -15
  • get_data.md get_data.md +11 -15
  • No files found.
get_data.md
View page @ 09e17acc
[[_TOC_]]
# Introduction
There are different ways to get data from AnyWave depending on what you want to do in the plugin.
# Selecting channels
Depending on the context (AnyWave is running in GUI mode or in Command Line mode) you can tune your request to get data from the channels you want.
## Scenario 1 (do not specify any options)
......@@ -20,6 +15,7 @@ Depending on the context (AnyWave is running in GUI mode or in Command Line mode
| ------ | ------ | ------ |
| acceptchannelselection | get data from selected channels (if there are) otherwise use the current montage | not applicable |
### no flags in desct.txt
if there are no input_flags neither modifier_flags in desc.txt the default behavior is to provide data from the current montage by default.
## Scenario 2 (fine tune the channels you want to get data from)
......@@ -102,17 +98,17 @@ output = anywave('get_data', cfg);
````
````python
cfg = {'start': 1, 'duration' : 10}
output = anywave.get_data_ex(cfg)
output = anywave.get_data(cfg)
````
## I want several data chunks appended
````matlab
cfg = [];
cfg.data_chunks = [ 1 10 2 4 ]; % specify several time selections at once
output = anywave('get_data_ex', cfg); % data will be appended to the same output structure.
output = anywave('get_data', cfg); % data will be appended to the same output structure.
````
````python
cfg = {'data_chunks' : [0, 10, 2, 4] }
output = anywave.get_data_ex(cfg)
output = anywave.get_data(cfg)
````
## I want several data chunks splitted
Sometimes you want to get data chunks and apply processing on each ones.
......@@ -129,7 +125,7 @@ output = anywave('get_data', cfg);
````
````python
cfg = {'data_chunks' : [0, 10, 2, 4], 'split_data' : True }
output = anywave.get_data_ex(cfg)
output = anywave.get_data(cfg)
###
### output is a list of dict containing the data and information of each data chunks requested.
````
......@@ -138,20 +134,20 @@ output = anywave.get_data_ex(cfg)
cfg = [];
cfg.use_markers = { 'section2', 'h2' ]; % the labels of markers
% the markers section2 and h2 must exist in the data file otherwise AnyWave will send back the whole data file...
output = anywave('get_data_ex', cfg); % the different data chunks marked are appended in one data matrix.
output = anywave('get_data', cfg); % the different data chunks marked are appended in one data matrix.
% use split_data to separate data chunks
cfg.split_data = true;
output = anywave('get_data', cfg);
%%
% output is a struct array. The number of elements is the number of data chunks requested.
% As there are splitted each element contains the data and information of one data chunk.
% As there are split, each element contains the data and information of one data chunk.
%%
````
````python
cfg = {'use_markers' : ['section2', 'h2'], 'split_data' : True }
output = anywave.get_data_ex(cfg) # data chunks will be splitted here
output = anywave.get_data(cfg) # data chunks will be split here
````
## I want all data BUT artefacted/unused data chunks
## I want all data BUT artifacted/unused data chunks
Getting all the data except chunks marked as bad is easy:
````matlab
cfg = [];
......@@ -160,7 +156,7 @@ output = anywave('get_data', cfg); % data chunks appended
````
````python
cfg = {'skip_markers' : ['artefact', 'bad'], 'split_data' : True }
output = anywave.get_data_ex(cfg) # data chunks will be splitted here
output = anywave.get_data(cfg) # data chunks will be split here
````
## I want marked data chunks AND avoid bad ones
This can happen when you marked data chunk of interest but some samples are also marked as bad afterwards by other processing.
......@@ -172,7 +168,7 @@ output = anywave('get_data', cfg); % data chunks appended
````
````python
cfg = {'skip_markers' : ['artefact', 'bad'], 'use_markers' : ['section2', 'h2'], 'split_data' : True }
output = anywave.get_data_ex(cfg) # data chunks will be splitted here
output = anywave.get_data(cfg) # data chunks will be split here
````
# Filtering data
......
Clone repository
  • Build_AnyWave
  • CLI
  • CLI_List
  • Changes
  • ExportData
  • ICA
  • Imaginary Coherence
  • MATLAB anywave function
  • MATLAB_BIDS
  • MATLAB_change_sig_prop
  • MATLAB_debug
  • MATLAB_get_data
  • MATLAB_get_markers
  • MATLAB_get_props
  • MATLAB_init
View All Pages