Skip to content

Technical background for coding

krajcsi edited this page Jan 3, 2020 · 2 revisions

Python language

  • CogStat is written in Python 3 (and when needed, in R)
    • Python is used, because it is a free, high level, general language, that is becoming more popular among scientist and also its statistical modules are improving
    • When appropriate function is not available in Python, R is used occasionally (at this point, all R parts have been removed, but in future versions we're ready to include them again if a required procedure is not available in Python, and if we don't want to implement it)

Python packages used by CogStat

  • pandas - handling the data
  • statsmodels - for most of the statistical calculations
  • numpy, scipy.stats - for some other statistical calculations
  • rpy - for R-Python connection
  • matplotlib - for most of the graphs
  • PyQT (qt5) - for the GUI
  • python-bidi - for RTL languages displaying matplotlib labels

Main modules of CogStat

  • Core analysis functions
    • - main module, handles the data and chooses the relevant results
    • - creates graphs and strings of the statistical analysis
    • - statistical functions that are not available in other Python modules
  • GUI
    • - well, the GUI, except the dialogs
    • - dialog handling for the GUI
  • Other
    • - various functions used in several modules
    • test/ - tests for the statistical functions

Some additional details are partly available in the code comments and docs.

Many part of the code needs refactoring, partly because in former phases of the development the technical solutions changed a lot.

Adding new functions

When adding new functions it should include:

  • Implementing the new function in the core analysis part - appropriate method in the file
  • GUI for the function if relevant
  • Unit tests for the function
  • Documentation for the wiki and for the Jupyter notebook

Documentation for users


Using CogStat

Advanced topics

Get help

Documentation for contributors

Statistical and methodological documentation

Documentation for developers

Clone this wiki locally
You can’t perform that action at this time.