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
    • cogstat.py - main module, handles the data and chooses the relevant results
    • cogstat_stat.py - creates graphs and strings of the statistical analysis
    • cogstat_stat_num.py - statistical functions that are not available in other Python modules
  • GUI
    • cogstat_gui.py - well, the GUI, except the dialogs
    • cogstat_dialogs.py - dialog handling for the GUI
  • Other
    • cogstat_util.py - various functions used in several modules
    • test/test_stat.py - 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 cogstat.py file
  • GUI for the function if relevant
  • Unit tests for the function
  • Documentation for the wiki and for the Jupyter notebook

Documentation for users

Introduction

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.