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
  • Py_send_markers

Py_send_markers · Changes

Page history
transferring wiki from anywave to documentation authored Jun 06, 2024 by Bruno Colombet's avatar Bruno Colombet
Show whitespace changes
Inline Side-by-side
Showing with 42 additions and 0 deletions
+42 -0
  • Py_send_markers.md Py_send_markers.md +42 -0
  • No files found.
Py_send_markers.md 0 → 100644
View page @ 2d1e05f5
[[_TOC_]]
# Introduction
Create a list of object of type Marker and send them to AnyWave.
## Marker object
````python
import anywave
marker = anywave.Marker()
Marker.label # label of marker
Marker.position # position in seconds.
Marker.duration # duration in seconds.
Marker.value # value associated with marker
Marker.targets # list of electrode labels. Empty if the marker is GLOBAL.
Marker.colour # string coding the color in RVB. Must start with #. Example for red : '#FF0000'
# using the constructor
marker = anywave.Marker(label='My Marker', position = 1, duration = 0, value = 10, colour = '#FF0000')
````
Not all attributes are required. The only required attributes are:
- label
- position
If other attributes are not specified, the default values for them will be taken into account.
Duration will be 0s, value will be 0., targets will be an empty array, and colour an empty string meaning the default color will be black.
# Usage
Sending 2 markers to AnyWave.
One is a GLOBAL marker with a duration of 5s and colored in red.
The second is a marker targeting a channel, with no duration.
````python
import sys, anywave
anywave.init(sys.argv)
markers = []
markers[0] = anywave.Marker(label='first marker', position=1, duration=5, colour='#FF0000')
markers[1] = anywave.Marker(label='second marker', position=6, targets=['A1'])
anywave.send_markers(markers)
````
\ No newline at end of file
Clone repository
  • Build_AnyWave
  • CLI
  • CLI_List
  • Changes
  • ExportData
  • MATLAB_API
  • MATLAB_BIDS
  • MATLAB_debug
  • MATLAB_functions
  • MATLAB_get_data
  • MATLAB_get_data_ex
  • MATLAB_get_markers
  • MATLAB_get_props
  • MATLAB_init
  • MATLAB_run
View All Pages