Utilities to interface with iMotions from oTree
Project description
iomotions
This project provides useful utilities for interfacing with iMotions software from third party applications.
Initial support is intended for oTree, a behavioral experiment software. Its chief goal is to enhance experiments where subjects are tracked using iMotions, making it simple to mark events surrounding page interactions.
Over time this repository may grow to provide more hooks to iMotions APIs.
Installation
To use this module add the following line to your requirements.txt
file:
iomotions>=0.0.1
Then install your requirements as usual.
pip3 install -r requirements.txt
As usual it's recommended that you use a virtual environment for your dependencies.
Usage
oTree Integration API
ScenePage
ScenePage
makes it simple to send start and end scene markers to oTree. Subclass this type instead of Page
and the
scene markers will use the class name as the scene description. When the page loads a start scene marker is sent to
iMotions, and following a successful Post
it will send the end scene marker, prior to progressing to the next page.
from iomotions.otree.pages import ScenePage
...
class QuizPage(ScenePage):
pass
If you would like to provide an alternative scene identifier than the class name, simply override the scene_name
property with the string you would like to use instead.
from iomotions.otree.pages import ScenePage
...
class QuizPage(ScenePage):
scene_name = 'Question'
Note: The current round number will also be appended to the scene name to account for pages that appear in multi-round apps.
You can similarly specify a scene_description
property to add the Description property to the iMotions start scene marker.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for iomotions-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15d807b5e33768839b3b234ac0d23c847744fa5503d4bf140bb86be344b0745b |
|
MD5 | 8b5757a7143f4aa409068029a0607d1d |
|
BLAKE2b-256 | 21dd1660706adccc70cb8c88819b3cf6438754355362d38e0bc88ef99e5e3ed8 |