Skip to content

Latest commit

 

History

History
74 lines (39 loc) · 2.14 KB

README.rst

File metadata and controls

74 lines (39 loc) · 2.14 KB

lncdtask

Psychopy wrapper for tasks run in the LNCD.

Useful where a "task" can be described by the sequence:

  1. draw function
  2. wait until onset
  3. flip & mark in external sources (e.g. eye tracker event, ttl marker)

Install with pip:

python3 -m pip install git+https://github.com/LabNeuroCogDevel/lncdtask --user --upgrade
python3 -m lncdtask.eyecal
# and/or
python3 -m lncdtask.dollarreward

Or clone and inspect helloworldtask.py, lncdtask/eyecal.py, and lncdtask/dollarreward.py for examples.

For specific sites, see MS Windows read *.bat files.

For developing on a git clone using pipx (avoid older system psychopy):

git clone https://github.com/LabNeuroCogDevel/lncdtask && cd lncdtask
pipx install -e $(pwd) --force
pipx inject lncdtask psychopy

Features

Provides a generic classes:

  • LNCDTask with functions
    • self.flip_at(onset, info1, info2,...) to wait until onset and send external marks "info1 info2"
    • default colored "+" stims self.iti and self.isi
    • run() over onset_df dataframe (columns "onset" and "event_name", see add_onsets()) with functions registered to event_names using add_event_type()
  • ExternalCom and implementations Arrington EyeLink and ParallelPortEEG to send events to external sources.
  • exposes start(), stop(), new(), and event()
  • LNCDTask takes a list of ExternalCom classes and will send events with AllExternal in flip_at()

The task is organized by events rather than trials. The timing dataframe onset_df is "long" instead of "wide." This provides a less featured alternative to psychopy.data's TrialHandler2

Credits