This version contains major refactoring efforts and features. We anticipate a few additional refactor efforts in the near term based on feature requests from the community and (CAMBI)[cambi.tech]. These will support multi-modality, data sharing, and more complex language modeling. We are utilizing a release candidate to make features and bugfixes available sooner despite the full second version being in-progress. Thank you for your understanding and continued support! All pull requests in Github from #123 until #217 represent the 2.0.0-rc.1 work.
The highlights:
Acquisition Enhancements
: multi-modal support and better performance overall! #171, #174Language Model Refactor
: deprecation of docker base models. Addition ofLanguageModel
base class,UniformLanguageModel
and a hugggingface modelGPT2LanguageModel
. #207Signal Model Refactor
: Refactor with base class definitions and general cleanup. PcaRdaKde model updates to decrease training time and limit the magnitude of likelihood responses. #132, #140, #141, #147, #208Matrix Display: SCP
: A single character flash Matrix speller is now integrated. AMatrixDisplay
and accompanyingMatrixCalibration
+Matrix Time Test Calibration
. #192, #205, #213Inquiry Preview
: a mode in RSVP spelling that allows a user to see an inquiry before it is presented in a serial fashion. The user may also engage with the preview using a key press; either to confirm or skip an inquiry. See below for more details.GUI updates
: all BciPy core GUIs and methods are converted to PyQt5 for better cross-platform availability and tooling. See below for more details.Linux compatibility
: with the upgrading of dependencies and a helpful shell script (seescripts/shell/linux_requirements.sh
) for setting up new machines, we are linux compatible. See below for more details.Prestimulus buffer and Inquiry Based Training
- support to add prestimulus data to reshaping and data queries to permit better filter application. Additionally, use this buffer and the inquiry reshaper to mimic data experienced in real time during training in offline_analysis.py #208
The details (incomplete, our apologies!):
Makefile
:run-with-defaults
make command for runningbcipy
andviewer
command for running the data viewer #149.bcipy/README.md
: describes experiments and fields in greater detail #156signal/process/filter.py
: addNotch
andBandpass
as classes #147signal/process/transform.py
: addComposition
,Downsample
, andget_default_transform
#147helpers/visualization.py
: moved plot_edf function from demo to this module #126helpers/raw_data.py
: module for raw data format support in BciPy #160helpers/load.py
: addload_users
method for extracting user names from data save location #125 add extract_mode method for determining the mode #126helpers/task/
: addReshaper
, refactor trial reshaper and add inquiry reshaper #147 addget_key_press
method with custom stamp argument. #129helpers/stimuli.StimuliOrder
: defined ordering of inquiry stimuli. The current approach is to randomize. This adds an alphabetical option. #153helpers/stimuli.alphabetize
: method for taking a list of strings and returning them in alphabetical order with characters last in the list. #153helpers/validate
:_validate_experiment_fields
andvalidate_experiments
: validates experiments and fields in the correct format #156bcipy/helpers/system_utils
: add report execution decorator #163scripts/shell/linux_requirements.sh
: add script for installing necessary dependencies on linux systems #167.github/workflows/main.yml
: adds support for CI in BciPy #166bcipy/gui/file_dialog.py
: PyQt5 window for prompting for file locations #168display/paradigm/matrix
: added MatrixDisplay class with single-character presentation (SCP). #180
-
LICENSE.md
: to used the Hippocratic license 2.1 -
CODE_OF_CONDUCT.md
: to latest version of the Contributor Covenant -
README.md
: Add new glossary terms: mode, session and task #126 #127 and cleanup #129 -
bcipy/main.py
: formally,bci_main.py
. To give a better console entry point and infrastructure for integration testing. In the terminal, you can now runbcipy
instead ofpython bci_main.py
-
parameters.json
: add stim_order #153 add max selections #175 remove max_inq_per_trial in favor of max_inq_per_series #176 add inquiry preview #177 with relevant stimuli units in help text, better starting stim_height, and inquiry preview keys #216 -
demo_stimuli_generation.py
: update imports and add a case showing the new ordering functionality. #153 -
copy_phrase_wrapper
: update logging and exception handling. add stim order. #153 BUGFIX: return transformed sampling rate #159 -
random_rsvp_calibration_inq_gen
: rename tocalibration_inquiry_generator
#153 -
ExperimentField.py
: updated to use new alert types with timeouts #156 -
ExperimentRegistry.py
: add the ability to toggle anonymization of field data and use new alert types with timeouts #156 -
FieldRegistry.py
: updated to use new alert types with timeout #156 -
gui/BCInterface.py
: useload_users
method to populate user dropdown and remove internal BCInterface load method #125 -
gui/gui_main.py
: update to return a value in FormInput, set a value for IntegerInput only if provided #156 -
gui/viewer/data_viewer.py
: Replaced the original WxPython version of the signal data viewer with the new PyQt version #157. Use signal process filters instead of duplicating logic #147. -
gui/viewer/file_viewer.py
: to use new raw data format #160 -
bcipy/acquisition
: refactored acquisition to support multi-modal acquisition and more performant real-time acquisition. These changes were significant and across multiple PRs. Support for new raw data format #160 -
ring_buffer_test.py
->test_ring_buffer.py
: to comply with naming conventions #156 -
signal/model/base_model.py
: add reshaper to base model class, requiring it to be defined in all models and return aReshaper
. Fix return types. #147 -
signal/model/offline_analysis.py
: updated to use new reshapers and transforms. #147 updated to report execution time and logging levels #163 -
bcipy/language_model/
-->bcipy/language/
refactor for clarity and add base classLanguageModel
#164 -
bcipy/tasks
-->bcipy/task
: refactor for clarity, add README, organize tasks under paradigm #162 organize tasks operation objects intocontrol
module #162 #178 -
task/paradigm/rsvp/copy_phrase.py
: refactored overall #146 to use new Session classes #127 and updated to use new reshapers and transforms #147 implements current state of inquiry preview #129 #177 to account for max selection parameter #175 fix targetness #179 -
bcipy/task/data.py
: to track number of decisions made #175 -
task/control/handler.py
: added the ability to set constants in defined stimuli agent #178 -
task/control/query.py
: remove redundant best_selection in favor of one with constants. Implemented constants in return_stimuli methods. #178 -
display/rsvp/display.py
: refactored to use new trigger pulse and ensure it occurs only on first display call (whether that bedo_inquiry
orpreview_inquiry
) #149 Overall refactoring of properties intoStimuliProperties
,InformationProperties
,TaskDisplayProperties
. AddedPreviewInquiryProperties
andpreview_inquiry
kwarg. Add full-screen parameter to help with scaling stimuli. Add textbox to self._create_stimulus
. Addpreview_inquiry
and_generate_inquiry_preview
methods. #129 -
static/images/gui_images
: updated togui
and refactored where defined #149 -
bcipy/display/main.py
: moveStimuliProperties
,InformationProperties
,TaskDisplayProperties
andPreviewInquiryProperties
to higher level #180 -
helpers/stimuli.py
: refactored for clarity and addget_fixation
method #149 glossary updates and remove unneeded code #178 fix targetness in copy phrase #179 -
helpers/triggers.py
: refactored_calibration_trigger for clarity
and addCalibrationType
(deprecating sound and adding text) #149 add an offset correction method #126 -
helpers/load.py
: updated to use new raw data format #160 -
helpers/convert.py
: mode, write_targetness, and annotation_channels keyword arguments #126 add compression/decompression support for experiments and BciPy session data #173 -
helpers/session.py
: refactored session helpers to use the new Session data structures. #127 -
helpers/exceptions
: refactored Field and Experiment exceptions to corresponding base exception #156 -
feedback/auditory_feedback
: to allow for easier setting of relevant parameters and testing #128 -
feedback/visual_feedback
: deprecate shape feedback type, line_color (in the administer method), and compare assertion as both were unused and added unneeded complexity. Set hard-coded values on the class instance for easier changing later. #128
target_rsvp_inquiry_generator
: #153 unusedrsvp_copy_phrase_inq_generator
: #153 unusedtasks/rsvp/icon_to_icon.py
: #129 unusedtasks/rsvp/calibration/inter_inquiry_feedback_calibration.py
: unusedgenerate_icon_match_images
: #153 deprecated tasksignal/process/demo/text_filter_demo.py
: #147 removes old matlab generated filtersignal/process/filter/resources/filters.txt
: #147 in favor of new filters and transformssignal/process/filter/notch.py
: #147 in favor of new filters and transformssignal/process/filter/downsample.py
: #147 in favor of new filters and transformssignal/process/filter/bandpass.py
: #147 in favor of new filters and transforms
This version contains major refactoring and tooling improvements across the codebase. In addition, it introduces the concept of BciPy Experiments and Fields. Below we describe the major changes along with a PR# in github where applicable.
- Language model histogram #91
- BciPy official glossary (Sequence -> Inquiry & Epoch -> Series) #121
- System information to
system_utils
(cpu, platform, etc) #98 - BciPy Experiments and Fields: See PRs #113 #111, #114 for more information on the additions!
.bcipy
system directory to support experiment and fields #100- support for python 3.7
rsvp/query_mechanisms
: to model the way we build inquiries #108Makefile
: contains useful install and development commandsconvert
: a module for data conversions that will be useful for data sharing. Implemented a conversion function to the EDF format. #104exceptions
: a module for BciPy core exceptions
acquisition
: refactored the acquisition module to separate the concept of a device (ex. DSI-24 headset) and a connection method to that device (TCP or LSL). #122setup.py
: with new repo location and CAMBI official support emailoffline_analysis
: to pull parameters from session file #90requirements.txt
: to the latest available #99 #107Parameters
(added help text, removed redundant parameters). Refactored to make them immutable. #101gui_main
: to use PyQt5. We will refactor all GUI code to use this in the future. After this PR, the signal viewer (WxPython) and a couple of loading functions will remain (Tk). #102BCInterface
: updated to use new gui_main methods. Added user if validations. #102 #120params_form
: moved into a parameters modules within GUI and updated to use PyQt5. #109dev_requirements
: used to be called test_requirements. It contains more than that, so we updated the name! #99README
: with relevant updates and contributors
RSVPKeyboard.py
- Artifact Rejection
signal.evaluate.Evaluator
- Evaluates sequences and flags sequences that break rules
signal.evaluate.Rule
- Defines rules that sequences should follow
- Re-added progress indicator for offline analysis
- Scripts
timing_tools.py
to help test display timing before experiments
- Tests
- Linting
- Documentation improvements
- DAQ file writing. Instead of writing to
raw_data.csv
during task executions, optionally writeraw_data.csv
on call tostop_acquisition
, and only write to SQLite database during task. get_data
queries inbuffer_server
to increase speed on Windows machines.- RSVP sequence stimuli presentation. Reduces reported timing slips on Windows and Linux machines.
- List of stimuli to be presented is now generated before each sequence is presented, rather than generating stimuli during the sequence.
- The screen is now only drawn once per stimulus, rather than redrawing the screen every frame.
- Signal viewer to shut down when data is no longer streaming
main_frame
andcopy_phrase
to fix bug that prevents copy phrase tasks from completing in fake data mode- Target generation for icon-matching tasks has been changed to minimize instances of duplicate target stimuli over the course of an experiment
- Fixed issue with icon-matching tasks flashing to desktop on Windows machines
params_form.py
is now launched by creating another wxPython frame, rather than launching a subprocess
- Module additions via
__init__
Patch for gui.viewer module. Missing init file.
This release focused on bug fixes, exposing parameters, and refactoring. Further dual screen configuration and testing was done to allow for simultaneous signal viewing and task operation.
- Dual screen configuration / updated support
- Parameters:
- Copy phrase decision thresholds
- Inter-sequence Feedback level thresholds
- RSVP Display: refactor
- Decision Maker / Evidence Fusion: refactor
- Signal Viewer: more distinct channel names
- bci_main: shutdown handling and bug fix
- Language Model Helper: bug fix for negative probabilities
- Multicolor Text
- Old LSL viewer
This release focused on the addition of a Signal Viewer, Inter-sequence Feedback Task, Signal Processing / Decomposition Methods, and miscellaneous cleanup.
- PSD: Power spectral density methods
- DSI VR-300 integration
- Logging session configuration and setup
- Version and git commit extraction
- Inter-sequence feedback task
- Backspace frequency parameterization and implementation
- Bandpass and Notch Filter implementation
- Custom Exceptions
- Refactor RSVP Task: Icon-to-Icon (WIP)
- Refactored Signal Module
- Dependencies (PsychoPy, pylsl, numpy, pandas, WxPython)
- Tests
- Documentation
- Bar Graph implementation
This release focused on the addition of a new Alert Tone Task, integration of the Language Model, and other fixes to make Copy Phrase work better.
- Alert Tone Task: a new calibration task that plays an alert tone prior to displaying the presentation letter. Adds parameters for the directory in which sounds (.wav files) are located as well as the length of the delay.
- SPACE symbol customization: allows users to customize the display of the SPACE character.
- New Language Model: experimental; adds a new oclm Language Model and allows users to select between this and the standard prelm model. Note that this functionality is still incomplete.
- Language Model integration: the Language Model now correctly starts up a Docker container on both Windows and Mac machines.
- Fixes to the CopyPhraseWrapper in its usage of the Language Model, including converting its output to the probability domain for integration, and correctly handling space characters.
- Fix for Copy Phrase backspace selection.
- Fixed issue loading EEG Classifier pkl files.
- General code cleanup in the acquisition module.
- Simplified code for starting a new task.
- There is now a task_registry which lists all available tasks and allows code to enumerate them.
- More obvious feedback when a CopyPhrase letter has been typed.
- Users can now override configuration for parameters with a drop-down menu. The previous behavior was to restrict users to the suggested values.
This is a working version for use with LSL on Calibration and Copy phrase tasks. It will break implementation from previous release. Future minor versions should not do this.
- Structure of Signal Module
- Signal Model and Trial Reshaper Refactored
- Documentation
- Data acquisition client naming
- Image scaling
- Initial Icon Word matching task
- Task breaks
- LSL offset correction
- Unittests
- AUC printing to filename
- logging
- Initial signal viewer
- Initial average ERP generation plots
- GUI enhancements
- Duplicate dependencies