Skip to content

Commit

Permalink
2.0.0-rc.1 (#158)
Browse files Browse the repository at this point in the history
* Deserialization of Session from JSON data; refactored code for displaying inquiry evidence from session helper to session data structures.

* Refactored session helper to simplify and use session_data; added tests for session helper

* function for loading users (#125)

* WIP load users

* Add functionality to support no data directory and lint

* remove unused import

* Add unittest examples with some direction

* Testing

Testing uploaded code 2

* Ran Make Lint Command

Final edit before PR

* change input into load_users, update tests

Co-authored-by: Alister <[email protected]>
Co-authored-by: Tab Memmott <[email protected]>

* EDF conversion fixes (#126)

* EDF conversion fixes

* Feedback refinements; renaming and documentation

* Optional arguments

* Removed unused eeg_len parameter from session data

* Removed unused parameter from copy_phrase task

* remove display from unittests (mock) and lint (#128)

* Inquiry Preview (#129)

* Inquiry Preview Display and Key Input Method

* #176581753 ; added timeout to acquisition connector

* Added top level variable to LSL_TIMEOUT_SECONDS

* Add abstract base class for SignalModel

* Update citation on README (#131)

* #176151285 ; use stim_length parameter for Copy Phrase rather than hard-coding values

* Add abstract base class for SignalModel

* Add tests to prepare for refactoring PCA/RDA/KDE model

- export offline_analysis and return figure handles from
  generate_offline_analysis_screen() to allow testing
- Add integration tests in bcipy/signal/tests/model/test_offline_analysis.py,
  asserting model's current behavior for:
  - AUC (number only, no contents of pkl file)
  - lik_dens figure
  - mean_erp figure
- Add unit tests in bcipy/signal/tests/model/test_model.py,
  asserting model's current behavior
- Remove unused grid_search() function from cross_validation.py
- Add placeholder tests for notch and bandpass
- Add some notes in model training code
- Removing unnecessary folders, formatting, and removing unused code from demos
- Remove unnecessary DummyDimReduction
- Rename "mach_learning" to "ml

TODO - it might be worth considering deleting or updating the demos at
bcipy/signal/model/demo/ml

* Fix renaming issues by sticking with 'mach_learning' instead of new 'ml' name

* - undo formatting changes in demos and offline_analysis
- move demos back to original location

* vizualization -> visualization

* PR feedback

* - assert raise either StopIteration ( python <=3.6 ) or RuntimeError ( python >=3.7 )

- add test_producer_end

* Add function to compute probabilities after keyinput

* Update docstring

* rename files

* PR feedback

* PR feedback

- Making code compatible with python3.6
- use 'remove_text=True' for pytest-mpl
  (axis tick locations move slightly between matplotlib releases,
   but this should not cause test to fail)

* gitignore

* Add tests copy phrase (#138)

- Rename test_signal_model.py to test_copy_phrase_wrapper.py
- Add test for CopyPhraseWrapper
- Simplify and cleanup query_mechanisms.py
- Add makefile targets for unit and integration tests

* fix random seed in additional necessary places for tests (#140)

- fix random seed in additional necessary places for tests
- set target letter more obviously for inference test
- update expected output files for unit tests and integration tests

* Added unit tests for copy phrase task

* Additional logging for copy phrase task

* Lint and update test-all command (#142)

* Lint and update test-all command

* update dev requirements / lint

* remove version dependency

* Refactor pca rda kde (#141)

* Rename test_signal_model.py to test_copy_phrase_wrapper.py

- Add test for CopyPhraseWrapper
- Simplify and cleanup query_mechanisms.py
- Add PcaRdaKdeModel class and unit tests
- Rename test_kde plot
- Remove unused plot from test data
- use new PcaRdaKde model in copy_phrase_wrapper and bci_main
- move `load_signal_model` to `bcipy/signal/model`
- always use `alphabet()` helper function instead of manually creating alphabets
- Remove "lik_dens.pdf" figure from offline_analysis visualization
- Remove test for "lik_dens.pdf" from offline_analysis integration test
  and its expected output
- Move all code for PCA/RDA/KDE model into one module
- Move all tests for PCA/RDA/KDE model into one file, separated between
  internals and externals
- remove previous train and inference scripts (now replace by `model.fit` and `model.predict`
- Remove outdated demos
* Fix test_copy_phrase_wrapper
- Add tests for SignalException
- update `bcipy/signal/model` README

* Additional copy phrase tests; session data convenience function

* initial attempt to split copy phrase execute method into smaller methods

* Refactor work in progress; consistent handling of parameters; factored out  into smaller methods; fixed issues with fake data

* Rename variables for clarity; refactored implicit tuple to a namedtuple

* #178148421 ; fix bug in signal model loading

* Removed hard-coded value

* #178148286 ; fix error in model saving

* Copy Phrase refactoring ; moved all loop update code to the end of the run loop for clarity. Factored out more code into their own methods.

* Update README.md

Add Niklas to contributors

* Added namedtuple in stimulus helper to clarify a commonly used data tuple and refactored the DecisionMaker, CopyPhraseWrapper, and CopyPhrase task to use the new structure; In CopyPhraseWrapper, separated the addition of new evidence from making a decision to allow for additional evidence types to be added; created an enumeration for currently supported evidence types; Refactored session data to use a dict of evidences, rather than hard-code specific types; Extensively refactored the Copy Phrase task for clarity to support integration of inquiry preview evidence; incorporated evidence from inquiry preview into the decision maker; added documentation and typing throughout.

* Removed outdated section of README

* Refactored code to add evidence to copy phrase wrapper; refactored session data to only display evidence presented during a given inquiry

* isort imports

* Renaming for clarity

* CopyPhraseWrapper documentation and typing

* Added assertions that required copy phrase parameters are present

* Refactored EvidenceType to an Enum and moved it to the session_data module. Fixes to session_tools

* Updated resource for session test

* Refactor trial inquiry reshaper (#147)

- simplify and shorten preprocessing transforms, handle fs alongside data during transforms
- refactor trial_reshaper, move to TrialReshaper
- add InquiryReshaper
- change model pkl filename AUC to 4 digits of precision
- relax tolerance for comparing expected model AUC

* Fix targetness assignments in write copy phrase triggers (#148)

* Update license, code of conduct, move bci_main to make a better entry point (#150)

* calibration trigger refactor and cleanup (#149)

* Update main bcipy image to cambi.png (#152)

* Fix filtering in data viewer

* Refactored data_viewer for clarity

* Added PyQt port of data viewer

* pyqt viewer cleanup

* Increased the timeout in the LSL datasource to fix a bug in viewer initialization

* Stimuli Ordering (#153)

* Added code to place the viewer in a second monitor

* 178007109 task ready (#155)

* Add MessageBox, autoclose, and timeout

* Address Aziz PR comments (#145)

* Answered PR comments from Aziz's previous PR

* Style changes to toolbar

* Fixed issue with button text refresh

* Refactored pyqt viewer to make control widgets more responsive. Added widgets for controls to enforce a fixed height layout, allowing the data plots to expand correctly when the window is resized.

* Initialize viewer to 90% of the screen height

* Added the ability to set the fixed scale value. Added caching to the autoscale bounds

* Set size of the main panel and allow resize

* Cleanup

* Refinements: added typing information; pulled variables up to class vars; button turns green when paused to indicate that the viewer needs to be restarted

* Replace wxPython data viewer with the PyQt version (#157)

* Experiment anon field (#156)

* #178787961 ; fixes error when reshaping data for copy phrase

* #175674845 ; module for raw data format

* Cleaned up unit tests

* #179057693 ; provided DeviceSpec with an additional parameter for configuring channels to exclude from analysis

* Updated devices to correctly load excluded channels; updated list of channels excluded for analysis

* AUC output fix + report timing (#163)

* Update log level and add a timing decorator

* Add documentation and update log format

* add logs to offline analysis, fix test

* Refactor task (#162)

* add linux requirements shell script and CI spec (#167)

* Refactored lsl_recorder to use raw_data module; unit tests and cleanup

* LslClient feature parity with current acquisition client; marker writer integration; context manager support; added the ability to name the raw data file. Simplified interface of marker writer to reflect current usage. Updated the acquisition helper to initialize the LslClient.

* Work on offsets for lsl client

* Created a Clock object with the same interface as psychopy core.Clock that wraps lsl_local_clock. Updated all code to use the new internal clock.

* Removed unused multi-modal approaches

* Added unit tests for clock

* Removed support for TCP connection in acquisition helper

* Removed marker writer from acquisition clients and display code

* Re-wrote process_data_for_decision to query the acquisition client using timestamps rather than sample numbers. Modified acquisition client to record only the configured data, rather than all detected LSL data. Synced the recorded data offset with the client.

* #176100240 ; Replaced Tk dialog instances to use a PyQt FileDialog

* Update main.yml

update ubuntu before installing

* Language model base class (#164)

* initial commit language model base class

* Update code for python 3.7

* Reverted tests for producer

* Increased tolerance for unit test

* Added better logging for acquisition; updated multi-modal demos

* Fixed unit tests; better documentation; fixed edge case for data queries

* Fixed linting errors

* #179123977 ; annotated failing test with mark_slow to suppress during CI (#170)

* Address tests failing in CI

* Refinements and cleanup

* Adjusted test tolerance

* Fix clock error in get_key_press

* Fixed broken tests

* Modified Copy Phrase task to query the acquisition module for a given number of samples; added utility methods to raw_data module to assist in debugging.

* Refactored unit test

* Added buffer to lsl_client so consecutive data queries yield the same result

* "#179544118 ; Cleaned up lsl_recorder to ensure all remaining data is pulled on completion"

* Adds methods to convert.py to support data compression/decompression (#173)

* Adds methods to convert.py to support data compression/decompression

* Linting

* Added documentation, added name_checker helper method, added unit tests

Added tar_name_checker helper method to check for properly named tar archives with extensions, and added appropriate unit tests to check that it works within the three existing compression methods. Added documentation for the four compression related methods. Renamed file_list to archive_list.

* Small changes to merge PR

Co-authored-by: Tab Memmott <[email protected]>

* #179844387 ; replace uses of max_inq_per_trial parameter with max_inq_per_series (#176)

* #179844380 ; added parameter to configure the maximum number of selections in a copy phrase

* Add preview only mode (#177)

* Backspace always shown (#178)

* Matrix display (#182)

* Matrix Display

* Addressing PR comments

Co-authored-by: Julia Gangemi <[email protected]>

* Refactor generate_offline_analysis to visualize_erp (#183)

* #180155037 ; added the ability to define the precision of the evidence values in the session data

* #180154885 ; add selection to session data

* Bug fix

* Fixed sorting bug when deserializing from session.json data

* Refinements based on PR feedback

* Skipped timing test to fix failing CI

* #179649835 ; #179806994 ; Added computed metrics for all sessions; added custom metrics for Copy Phrase tasks

* Refinements to metric naming; refactored parameters for TaskSummary

* Trigger handling (#185)

* Add new Trigger, TriggerHandler, TriggerType

New classes/methods for trigger handling

* Added some unit tests for new trigger

* Editing new Trigger unit tests

* Editing trigger and trigger tests

* Attempted fixing of some unit tests with varying success

* mock file open using unittest patch, uncomment old tests, add coverage

* lint, split up load method and define as staticmethod, updated variable names

* Edited triggers to catch some exceptions, added corresponding tests

* linting

* Trigger refinement based on feedback

Refactored type and TriggerType as category and TriggerCategory to avoid confusion with Python built-in type functions. Renamed FlushSensitivity to FlushFrequency. Added a docstring for TriggerHandler.

* Commented out dataclass import

So the linting tests will stop yelling at me

* Refining of Trigger based on feedback

Added dataclass back in to make Trigger frozen/(mostly) immutable, refactored Trigger.time as a float instead of a str

* Further refactoring of Trigger from suggestions

* linting

Co-authored-by: Tab Memmott <[email protected]>

* Init commit for new language model infrastructure

* add transformer lm implementation

* Added Uniform language model; refactored CopyPhraseWrapper to always use a language model

* Updated the PRELM language model to reset the server state after every ; cleanup

* Changes to PRELM

* Better messaging for required parameters; added assertion for calculation

* Pyedflib fix (#190)

* update triggers.py, implement in tasks, deprecate unused tasks (#189)

* #180605653 ; added session metric for switch response time

* Added unit test for switch response calculation

* Factored out utility function; added custom exception to trigger reader to ensure the correct file format; renamed trigger type for key press event

* Renamed list_processing module to list

* updates after Trigger PR

* modifications done based on discussion during last meeting

* add load to init

* made changes based on discussion

* rename model file

* address lint issues

* rename base.py to base_model.py

* updates to integration tests to reflect recent changes (#195)

* Button press fix (#194)

- Update and simplify inquiry preview function
- Add explanation in docstring and add tests

* addressed PR comments

* addressed PR comments

* Matrix calibration (#192)

* Add matrix calibration display and task

* Work In Progress: updated matrix calibration to properly generate and display stimuli - still need to fix bug with triggers

* add target prompt, matrix trigger write, misc cleanup

* Fix bug in matrix calibration inquiry generator

Update to generate unique random stimuli in matrix calibration demo

* Updates to matrix calibration, refactored rsvp inquiry generator to general inquiry generator that can be used for matrix as well

* create paradigm submodule in display

* cleanup

* lint

* update trigger type

* Update display.py

* Update stimuli.py

Co-authored-by: Tab Memmott <[email protected]>

* Use a custom wait screen for copy phrase. use a better starting task text (#191)

* Unicode trigger labels (#196)

* #181018867 ; integrate new gpt2 language model; refactor parent LanguageModel to use stricter checking for supported response type and include common functionality; refactored other existing language models to use the parent class

* PR refinements; removed lang_enabled_parameter; removed import_submodules usage; updated lm_path parameter to give it a type directory path; required language model to be provided to CopyPhraseWrapper

* Removed normalized property from language model; modified PRELM to return probabilities

* Set ubuntu version for continuous integration

* Reverted workflow

* assign zero probability for symbols not returned by gpt2

* #178695472 ; remove docker language models

* #181349857 ; unit tests for gpt2

* Fix inquiry reshaper (#200)

Update InquiryReshaper to select correct window of time

* #181350204 ; always use configured backspace probability

* Updated UniformLanguageModel to remove redundant code

* improved method for character prediction

* set default beam width and search depth

* #181427286 ; bug fix so that Preview Mode does not add button evidence

* Added a check for invalid bool entries in Parameters module

* Updated CopyPhraseWrapper to treat the lm_backspace_prob parameter as a minimum value, allowing the language model to specify a higher probability.

* add types to function arguments

* remove extra comments

* fix lint errors

* address PR comments

* address Tab's PR comments

* add unigram symbol set equal check

* fix lint errors

* Matrix calibration (#205)

* Add matrix calibration display and task

* Work In Progress: updated matrix calibration to properly generate and display stimuli - still need to fix bug with triggers

* add target prompt, matrix trigger write, misc cleanup

* Fix bug in matrix calibration inquiry generator

Update to generate unique random stimuli in matrix calibration demo

* Updates to matrix calibration, refactored rsvp inquiry generator to general inquiry generator that can be used for matrix as well

* create paradigm submodule in display

* cleanup

* lint

* update trigger type

* Update display.py

* Update stimuli.py

* WIP- Modifications to inquiry generator to choose evenly distributed target positions and include no target inquiries, increased contrast in matrix and flashing characters

* WIP- Added functionality to toggle between randomly chosen or evenly distributed target positions for calibration

* WIP: Fixed bugs in distributed target positions for inquiry generator, added tests for new functionality

* updates to stimuli generation to respect num of nontarget inquirues. IP still need to test various parameter inputs.

* updates to stimuli generation, included alphabetical distributed target position, can use percentage of nontarget inquiries for random targets, lint

* update parameters.json for nontarget_inquiries

* address PR comments #205

* address PR comments, cleanup

* address PR comments, clean up

* Update calibration.py

Co-authored-by: Tab Memmott <[email protected]>

* Prestimulus, Inquiry Based Training, Model Tuning (#208)

Co-authored-by: Niklas <[email protected]>
Co-authored-by: lawhead <[email protected]>

* Ubuntu fix (#198)

* #181490020 ; removed legacy language model parameters

* #181489190 ; updated stimuli labels in copy phrase session to ensure that fixation stimuli are labeled as 'fixation' rather than 'nontarget'

* Bump pillow from 8.0.0 to 9.0.1 (#209)

* Prestim acq buffer (#212)

* Matrix timing validation (#213)

* #181987601 move session script to demo

* Release (#214)

* #181038299 ; updated documentation for acquisition module

* Updated docs

* Clear events before getting key presses in inquiry preview (#216)

* Added relevant links to LSL

* address PR comments and set python versions in setup.py

Co-authored-by: lawhead <[email protected]>
Co-authored-by: Alister Cedeno <[email protected]>
Co-authored-by: Niklas <[email protected]>
Co-authored-by: Basak Celik <[email protected]>
Co-authored-by: theJokerEvoker <[email protected]>
Co-authored-by: Julia Gangemi <[email protected]>
Co-authored-by: Shijia Liu <[email protected]>
Co-authored-by: jcgangemi1 <[email protected]>
  • Loading branch information
9 people authored Apr 29, 2022
1 parent c18878a commit e2d9b44
Show file tree
Hide file tree
Showing 327 changed files with 20,258 additions and 39,528 deletions.
36 changes: 36 additions & 0 deletions .bcipy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Experiments and Fields

BciPy experiments and fields allow users to collect metadata that may be integrated alongside core BciPy data. This is particularly useful when the experiment has completed and a researcher wants to curate their files for sharing with the community.

## Experiments

An experiment defines the name, summary and fields to collect. At this level, the requirement for collection during every task and whether or not to anonymize later will be set. The anonymization does not encrypt the data at rest, but instead defines how to handle the field later when uploading/sharing. The registered experiments are defined in `.bcipy/experiment/experiments.json` in the following format:

```js
{
name: {
fields : {
name: "",
required: bool,
anonymize: bool
},
summary: ""
}
}
```

## Fields

A field is a unit of data collection for an experiment. It has a name, help text and type. The type will determine how it is collected and validated. The registered fields are defined in `.bcipy/field/fields.json` in the following format:


```js
{
name: {
help_text: "",
type: "FieldType"
}
}
```

where FieldType may be str, bool, int, or float.
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ Link a pivotal ticket here
## Documentation

- Are documentation updates required? In-line, README, or [documentation](https://github.com/BciPy/bcipy.github.io)? Verify the updates you did here.

## Changelog

- Is the CHANGELOG.md updated with your detailed changes?
115 changes: 115 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: BciPy

on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
build-ubuntu:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev
sudo apt-get install freeglut3-dev
sudo apt-get install freetype*
sudo apt-get install portaudio*
sudo apt-get install libsndfile*
sudo apt-get install xvfb
python -m pip install --upgrade pip
pip install -r dev_requirements.txt
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 bcipy
- name: Unit test
if: always()
run: |
set +e
xvfb-run coverage run --branch --source=bcipy -m pytest --mpl -k "not slow"
if [ $? -eq 0 ]
then
echo "Ubuntu run complete!"
elif [ $? -eq 134 ]
then
echo "Ubuntu tests run successfully, memory issues may be present"
exit 0
else
echo "Ubuntu test failure"
fi
build-windows:

runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements.txt
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 bcipy
- name: Unit test
if: always()
run: |
coverage run --branch --source=bcipy -m pytest --mpl -k "not slow"
build-macos:

runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev_requirements.txt
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 bcipy
- name: Unit test
if: always()
run: |
coverage run --branch --source=bcipy -m pytest --mpl -k "not slow"
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
data/
# Virtualenv
venv/
venv*/
__pycache__/
.cache/

Expand All @@ -23,6 +24,5 @@ htmlcov/
bcipy.egg-info/
build/
dist/
.bcipy/*

bcipy/parameters/parameters_*
bcipy/parameters/parameters_*
96 changes: 94 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,106 @@
# 2.0.0-rc.1

## Contributions

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, #174
- `Language Model Refactor`: deprecation of docker base models. Addition of `LanguageModel` base class, `UniformLanguageModel` and a hugggingface model `GPT2LanguageModel`. #207
- `Signal 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, #208
- `Matrix Display: SCP`: A single character flash Matrix speller is now integrated. A `MatrixDisplay` and accompanying `MatrixCalibration` + `Matrix Time Test Calibration`. #192, #205, #213
- `Inquiry 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 (see `scripts/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!):

### Added

- `Makefile`: `run-with-defaults` make command for running `bcipy` and `viewer` command for running the data viewer #149
- `.bcipy/README.md`: describes experiments and fields in greater detail #156
- `signal/process/filter.py`: add `Notch` and `Bandpass` as classes #147
- `signal/process/transform.py`: add `Composition`, `Downsample`, and `get_default_transform` #147
- `helpers/visualization.py`: moved plot_edf function from demo to this module #126
- `helpers/raw_data.py`: module for raw data format support in BciPy #160
- `helpers/load.py`: add `load_users` method for extracting user names from data save location #125 add extract_mode method for determining the mode #126
- `helpers/task/`: add `Reshaper`, refactor trial reshaper and add inquiry reshaper #147 add `get_key_press` method with custom stamp argument. #129
- `helpers/stimuli.StimuliOrder`: defined ordering of inquiry stimuli. The current approach is to randomize. This adds an alphabetical option. #153
- `helpers/stimuli.alphabetize`: method for taking a list of strings and returning them in alphabetical order with characters last in the list. #153
- `helpers/validate`: `_validate_experiment_fields` and `validate_experiments`: validates experiments and fields in the correct format #156
- `bcipy/helpers/system_utils`: add report execution decorator #163
- `scripts/shell/linux_requirements.sh`: add script for installing necessary dependencies on linux systems #167
- `.github/workflows/main.yml`: adds support for CI in BciPy #166
- `bcipy/gui/file_dialog.py`: PyQt5 window for prompting for file locations #168
- `display/paradigm/matrix`: added MatrixDisplay class with single-character presentation (SCP). #180

### Updated

- `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 run `bcipy` instead of `python 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 to `calibration_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`: use `load_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 a `Reshaper`. 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 class `LanguageModel` #164
- `bcipy/tasks` --> `bcipy/task`: refactor for clarity, add README, organize tasks under paradigm #162 organize tasks operation objects into `control` 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 be `do_inquiry` or `preview_inquiry`) #149 Overall refactoring of properties into `StimuliProperties`, `InformationProperties`, `TaskDisplayProperties`. Added `PreviewInquiryProperties` and `preview_inquiry` kwarg. Add full-screen parameter to help with scaling stimuli. Add textbox to self.`_create_stimulus`. Add `preview_inquiry` and `_generate_inquiry_preview` methods. #129
- `static/images/gui_images`: updated to `gui` and refactored where defined #149
- `bcipy/display/main.py`: move `StimuliProperties`, `InformationProperties`, `TaskDisplayProperties` and `PreviewInquiryProperties` to higher level #180


- `helpers/stimuli.py `: refactored for clarity and add `get_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 add `CalibrationType`(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

### Removed

- `target_rsvp_inquiry_generator`: #153 unused
- `rsvp_copy_phrase_inq_generator`: #153 unused
- `tasks/rsvp/icon_to_icon.py`: #129 unused
- `tasks/rsvp/calibration/inter_inquiry_feedback_calibration.py`: unused
- `generate_icon_match_images`: #153 deprecated task
- `signal/process/demo/text_filter_demo.py`: #147 removes old matlab generated filter
- `signal/process/filter/resources/filters.txt`: #147 in favor of new filters and transforms
- `signal/process/filter/notch.py`: #147 in favor of new filters and transforms
- `signal/process/filter/downsample.py`: #147 in favor of new filters and transforms
- `signal/process/filter/bandpass.py`: #147 in favor of new filters and transforms

# 1.5.0

## Contributions

This version contains major refactoring and tooling improvements across the codebase. In addition, it indtrocudes the concept of BciPy Experiments and Fields. Below we describe the major changes along with a PR# in github where applicable.
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.

### Added
- 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 and #114 for more information on the additions!
- 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 #108
Expand Down
Loading

0 comments on commit e2d9b44

Please sign in to comment.