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

Python_package · Changes

Page history
transferring wiki from anywave to documentation authored Jun 06, 2024 by Bruno Colombet's avatar Bruno Colombet
Hide whitespace changes
Inline Side-by-side
Showing with 41 additions and 0 deletions
+41 -0
  • Python_package.md Python_package.md +41 -0
  • No files found.
Python_package.md 0 → 100644
View page @ 2d1e05f5
The core of a Python plugin is the main module \_\_main\_\_.py located in the plugin folder.
AnyWave will run the python interpreter on that module AnyWave once the plugin context is initialized.
# list of anywave package functions
| command | description | Documentation |
| ------ | ------ | --- |
| init() | must be called first! | [How to use init](Py_init) |
| get_data() | Request data. | [Go to the get_data documentation](Py_get_data) |
| get_markers() | Request markers | [Go to the get_markers documentation](Py_get_markers) |
| send_markers() | Send new markers | [Go to the send_markers documentation](Py_send_markers) |
| send_message() | Send a string message (for logging purpose) | [Go to the send_message documentation](Py_send_message) |
| get_props() | Get global settings related to the current file | [Go to get_props documentation](Py_get_props) |
| debug_connect() | Activate debug/developer mode | [How to debug my plugin](Py_debug) |
# Global settings for the plugin
Once you called anywave.init(sys.argv), the anywave module will get a variable called properties:
````python
print(anywave.properties) # output the content of a dict containing the global settings set by AnyWave for your plugin
````
````python
'bad_file' : full path to the .bad file,
'data_dir' : full path to the data dir,
'data_file' : data file name,
'data_path' : full path to the data file (concatenation of data dir and data_file),
'disp_file' : path to .disp file (not useful in the MATLAB context),
'lvl_file' : path to the .level file (not useful in the MATLAB context),
'sel_file' : path to the .sel file (not useful in the MATLAB context),
'flt_file' : path to the .flt file (not useful in the MATLAB context),
'marker_file' : path to the .mrk file,
'montage_file' : path to the .mtg file,
'iso_date' : date of data acquisition in ISO format,
'first_name' : first name of subject,
'last_name' : last name of subject,
'date' : date of acquistion,
'time' : time of acquisition,
'file_duration' : total length of data in seconds,
'max_sr' : maximum sampling rate of data,
'samples' : total number of samples
````
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