Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor of CN and IC module #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bburan
Copy link

@bburan bburan commented Aug 24, 2021

This refactor will make it easier for me to integrate the EFR
simulations into the Bayesian regression models I'm running. Main
changes include:

  • Breaking out common operations (e.g., calculating the bilinear filter
    and inserting delays) into their own functions.
  • Updating the code to better handle N-dimensional arrays. Original
    version of the code assumes that the AN and CN data will only be 2
    dimensional with dimensions (time x CF). This was causing problems
    because my simulation is using four dimensions (stimulus x subject x
    CF x time).
  • Time should generally be the last dimension due to Python coding
    conventions (in Matlab, time is usually the first dimension, but
    this has to do with Matlab being Fortran based vs. Python/Numpy being
    C/C++ based).
  • The run_model2018.py has been updated to reflect the dimension
    reordering of the ic_cn2018 module. Eventually I will submit changes
    reflecting the CF x time ordering for additional modules.

These changes have been verified against the original code and shown to
yield identical results for CN and IC outputs.

bburan and others added 2 commits August 24, 2021 11:36
This refactor will make it easier for me to integrate the EFR
simulations into the Bayesian regression models I'm running. Main
changes include:

* Breaking out common operations (e.g., calculating the bilinear filter
  and inserting delays) into their own functions.
* Updating the code to better handle N-dimensional arrays. Original
  version of the code assumes that the AN and CN data will only be 2
  dimensional with dimensions (time x CF). This was causing problems
  because my simulation is using four dimensions (stimulus x subject x
  CF x time).
* Time should generally be the *last* dimension due to Python coding
  conventions (in Matlab, time is usually the *first* dimension, but
  this has to do with Matlab being Fortran based vs. Python/Numpy being
  C/C++ based).
* The run_model2018.py has been updated to reflect the dimension
  reordering of the ic_cn2018 module. Eventually I will submit changes
  reflecting the CF x time ordering for additional modules.

These changes have been verified against the original code and shown to
yield identical results for CN and IC outputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant