Guide to adding new signal calculation methods - galizia-lab/pyview GitHub Wiki
Step 1
Decide a value of view_calcMethod to use. See here for existing values.
Step 2
- Add this value and a short description to the documentation of the flag here.
- Also add the same to the column "Selectable Options" for the flag "view_calcMethod" in the file "view/flags_and_metadata_definitions/view_flags_definition.csv" (If you used MS-Excel/Libreoffice to edit the CSV file, please open the file after saving in a text editor and make sure the format is COMMA-separated. Sometimes, MS-Excel/Libreoffice saves data in TAB or SEMICOLON separated)
Step 3
In the file "view.python_core.calc_methods.py", create a function for calculating signals from raw data. The signature of this function should be the same as other functions in this file, for example "calc_method_0" and "calc_method_1".
Step 4
Add the value of "view_calcMethod" for your setup and the newly created function for signal calculation to the if-else ladder in the method "view.python_core.calc_methods.get_calc_method"
Step 5
Congrats, you are done!