{ "info": { "author": "Henry S. Harrison", "author_email": "henry.schafer.harrison@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "=========================================\nexperimentator: Python experiment builder\n=========================================\n\n+--------------------+-------------------+-------------------+\n| | |travis-badge| | | |version-badge| | | |git-badge| |\n| | |coverage-badge| | | |doi-badge| | | |license-badge| |\n+--------------------+-------------------+-------------------+\n\n.. |travis-badge| image:: http://img.shields.io/travis/hsharrison/experimentator.png?style=flat\n :alt: Travis-CI Build Status\n :target: https://travis-ci.org/hsharrison/experimentator\n\n.. |coverage-badge| image:: http://img.shields.io/coveralls/hsharrison/experimentator.png?style=flat\n :alt: Coverage Status\n :target: https://coveralls.io/r/hsharrison/experimentator\n\n.. |version-badge| image:: http://img.shields.io/pypi/v/experimentator.png?style=flat\n :alt: PyPi Package\n :target: https://pypi.python.org/pypi/experimentator\n\n.. |license-badge| image:: http://img.shields.io/badge/license-MIT-blue.png?style=flat\n :alt: License\n :target: https://pypi.python.org/pypi/experimentator\n\n.. |git-badge| image:: http://img.shields.io/badge/repo-git-lightgrey.png?style=flat\n :alt: Git Repository\n :target: https://github.com/hsharrison/experimentator\n\n.. |doi-badge| image:: https://zenodo.org/badge/22554/hsharrison/experimentator.svg\n :alt: doi\n :target: https://zenodo.org/badge/latestdoi/22554/hsharrison/experimentator\n\n`Documentation contents`_\n\n.. _Documentation contents: http://experimentator.readthedocs.org/en/latest/#contents\n\n\nDo you write code to run experiments?\nIf so, you've probably had the experience of sitting down to code an experiment\nbut getting side-tracked by all the logistics:\ncrossing your independent variables to form conditions,\nrepeating your conditions,\nrandomization,\nstoring intermediate data,\netc.\nIt's frustrating to put all that effort in\nbefore even getting to what's really unique about your experiment.\nWorse, it encourages bad coding practices\nlike copy-pasting boilerplate from someone else's experiment code\nwithout understanding it.\n\nThe purpose of **experimentator** is\nto handle all the boring logistics of running experiments\nand allow you to get straight to what really interests you, whatever that may be.\nThis package was originally intended for behavioral experiments\nin which human participants are interacting with a graphical interface,\nbut there is nothing domain-specific about it--it should be useful for anyone running experiments with a computer.\nYou might say that **experimentator** is a library for\n'repeatedly calling a function while systematically varying its inputs and saving the data'\n(although that doesn't do it full justice).\n\nNot handled here\n================\n\n* graphics\n* timing\n* hardware interfacing\n* statistics\n* data processing\n\nThe philosophy of experimentator is to do one thing and do it well.\nIt is meant to be used with other libraries that handle the above functionality,\nand gives you the freedom to choose which you prefer.\nIt is best suited for someone with programming experience and some knowledge of the Python ecosystem,\nwho would rather choose the best tool for each aspect of a project than use an all-in-one package.\n\nOf course, there are alternatives that offer experimental design features along with other capabilities.\nA selection, as well as recommended complimentary packages, are listed later in the documentation.\n\nAn example\n==========\n\nTo demonstrate, let's create a simple perceptual experiment.\nFor the sake of example, imagine we will present some stimulus\nto either the left or right side of the screen\nfor a specified amount of time,\nand ask the participant to identify it.\nWe'll use a factorial 2 (side) x 3 (display time) design,\nand have a total of 60 trials per participant (10 per condition).\nHere's how it might look in experimentator:\n\n.. code-block:: python\n\n import random\n from time import time\n from experimentator import Experiment, order\n\n\n def present_stimulus_and_get_response(stimulus, side, duration):\n # Use your imagination...\n return random.choice(['yes', 'no'])\n\n\n def run_trial(experiment, trial):\n stimulus, answer = random.choice(\n list(experiment.experiment_data['stimuli'].items()))\n start_time = time()\n response = present_stimulus_and_get_response(trial.data['side'], trial.data['display_time'])\n result = {\n 'reaction_time': time() - start_time,\n 'correct': response == answer\n }\n return result\n\n\n if __name__ == '__main__':\n independent_variables = {\n 'side': ['left', 'right'],\n 'display_time': [0.1, 0.55, 1],\n }\n stimuli_and_answers = {\n 'cat.jpg': 'yes',\n 'dog.jpg': 'no',\n }\n\n experiment = Experiment.within_subjects(independent_variables,\n n_participants=20,\n ordering=order.Shuffle(10),\n filename='exp_1.exp')\n\n experiment.experiment_data['stimuli'] = stimuli_and_answers\n experiment.add_callback('trial', run_trial)\n experiment.save()\n\nRunning this script will create the experiment in the file ``exp_1.exp``.\nWe can now run sessions from the command line::\n\n exp run exp_1.exp participant 1\n # or\n exp run exp_1.exp --next participant\n\nEventually, we can export the data to a text file::\n\n exp export exp_1.exp exp_1_data.csv\n\nOr, access the data in a Python session:\n\n.. code-block:: python\n\n from experimentator import Experiment\n\n data = Experiment.load('exp_1.exp').dataframe\n\nIn this example the data will be a pandas ``DataFrame`` with six columns:\ntwo index columns with labels ``'participant'`` and ``'trial'``,\ntwo columns from the IVs, with labels ``'side'`` and ``'display_time'``,\nand two data columns with labels ``'reaction_time'`` and ``'correct'``\n(the keys in the dictionary returned by ``run_Trial``).\n\nInstallation\n============\n\n.. note::\n\n If you use experimentator in your work, published or not,\n please `let me know `_.\n I'm curious to know what you use it for!\n If you do publish, citation information can be found `here `_.\n\nDependencies\n------------\n\nExperimentator requires Python 3.3 or later.\nIt also depends on the following Python libraries:\n\n- `numpy`_\n- `pandas`_\n- `docopt `_\n- `schema `_\n- `PyYAML `_\n- `NetworkX `_\n\nRequired for tests:\n\n- `pytest `_\n\nRequired for generating docs:\n\n- `Sphinx `_\n- `numpydoc `_\n- `sphinx-rtd-theme `_\n\nThe easiest way to install these libraries, especially on Windows,\nis with Continuum's free Python distribution `Anaconda `_.\nFor experimentator, Anaconda3 or the lightweight Miniconda3 is recommended,\nalthough you can create a Python3 ``conda`` environment regardless of which\nversion you initially download.\n\nFor example, to install dependencies to a clean environment (with name ``experiment``)::\n\n conda update conda\n conda create -n experiment python=3 pip\n source activate experiment\n conda install numpy pandas pyyaml networkx\n pip install docopt schema\n\n>From PyPi\n---------\n\nTo install (and upgrade) experimentator::\n\n pip install --upgrade experimentator\n\nBe sure to run ``pip`` from a Python 3 environment.\n\n>From source (development version)\n---------------------------------\n\nExperimentator is hosted on\n`GitHub `_::\n\n git clone git@github.com:hsharrison/experimentator\n cd experimentator\n pip install -e . --upgrade\n\nOther libraries\n===============\n\n*Please, feel free to submit a pull request to add your software to one of these lists.*\n\nAlternatives\n------------\n\nThe Python ecosystem offers some wonderful alternatives that provide experiment logistics\nin addition to other functionality like graphics and input/output:\n\n- `expyriment `_:\n Graphics, input/output, hardware interfacing, data preprocessing, experimental design.\n If you are coming from the Matlab world, this is the closest thing to\n `Psychtoolbox `_.\n- `OpenSesame `_:\n An all-in-one package with a graphical interface to boot. An impressive piece of software.\n\nComplimentary libraries\n-----------------------\n\nWhat about all those important things that experimentator doesn't do?\nHere's a short selection.\nIf you're already using Python some of these will go without saying,\nbut they're included here for completeness:\n\n- *experimental design*\n - `pyDOE `_:\n Construct design matrices in a format that experimentator can use to build your experiment.\n- *graphics*\n - `PsychoPy `_:\n A stimulus-presentation library with an emphasis on calibration and temporal precision.\n Unfortunately, at the time of this writing it is not yet Python3-compatible, and so cannot be easily combined with experimentator.\n - `Pygame `_:\n Very popular.\n - `Pyglet `_:\n A smaller community than Pygame, but has several advantages, including cross-compatibility and a more pythonic API.\n Includes OpenGL bindings.\n - `PyOpenGL `_:\n If all you need is to make OpenGL calls.\n- *graphical user interfaces*\n - `urwid `_:\n Console user interface library, ncurses-style.\n - `wxPython `_:\n Python bindings for the wxWidgets C++ library.\n - `PyQT `_:\n QT bindings.\n - `PySide `_:\n Another QT option.\n - `PyGTK `_:\n Python bindings for GTK+.\n- *statistics and data processing*\n - `pandas`_:\n Convenient data structures. Experimental data in experimentator is stored in a pandas ``DataFrame``.\n - `numpy`_:\n Matrix operations. The core of the Python scientific computing stack.\n - `SciPy `_:\n A comprehensive scientific computing library spanning many domains.\n - `Statsmodels `_:\n Statistical modeling and hypothesis testing.\n - `scikit-learn `_:\n Machine learning.\n - `rpy2 `_:\n Call ``R`` from Python. Because sometimes the model or test you need isn't in statsmodels or scikit-learn.\n\nLicense\n=======\n\n*Licensed under the MIT license.*\n\n.. _numpy: http://www.numpy.org\n.. _pandas: http://pandas.pydata.org", "description_content_type": null, "docs_url": null, "download_url": "https://bitbucket.org/hharrison/experimentator/get/default.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://experimentator.readthedocs.org", "keywords": "experiment science psychology experimental design research", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "experimentator", "package_url": "https://pypi.org/project/experimentator/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/experimentator/", "project_urls": { "Download": "https://bitbucket.org/hharrison/experimentator/get/default.tar.gz", "Homepage": "http://experimentator.readthedocs.org" }, "release_url": "https://pypi.org/project/experimentator/0.3.1/", "requires_dist": [ "docopt", "networkx", "numpy", "pandas", "pyyaml", "schema" ], "requires_python": "", "summary": "Experiment builder", "version": "0.3.1" }, "last_serial": 2155241, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "2fd88636e66aecc20cdb0411834a0aca", "sha256": "39ae77bcfce9990b3bea25ef56c4a673685165a5a075c665ce4d68d7de2b2ac0" }, "downloads": -1, "filename": "experimentator-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2fd88636e66aecc20cdb0411834a0aca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1251116, "upload_time": "2014-07-02T00:43:05", "url": "https://files.pythonhosted.org/packages/79/8c/b3bc7a6902a1265752216a052aacaa337c46401fb9df25fe7a43840c771a/experimentator-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6781bc8774bb7ee14f1086bee3d473a2", "sha256": "5011826f847e217404466948f8d4a9422d1542e270f5ccc786b513ae25a992da" }, "downloads": -1, "filename": "experimentator-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6781bc8774bb7ee14f1086bee3d473a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1630703, "upload_time": "2014-07-02T03:59:40", "url": "https://files.pythonhosted.org/packages/10/d1/a9caf4ee7d491ff2b5e273f620864e38d5bb8dca38a68f701c80f17a5ed6/experimentator-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "7fbedd0a1d8cf3c08b0a0e8ae07e7e6e", "sha256": "52d1bc849f3d660385000b56a9285e6904bd79ab1873f89ca838b4fd7de1311d" }, "downloads": -1, "filename": "experimentator-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7fbedd0a1d8cf3c08b0a0e8ae07e7e6e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 38763, "upload_time": "2014-07-08T22:28:49", "url": "https://files.pythonhosted.org/packages/50/4f/140eba31426ce8f0edcc2b1f511253eb2099f2ffb50cbdc58da7f42098f3/experimentator-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "518e329122cb572f7599c1e9f73d008c", "sha256": "58c2cd92a35328604d85ac8224ea4f9548229d2b7df62429b9d2180323837864" }, "downloads": -1, "filename": "experimentator-0.2.2.tar.gz", "has_sig": false, "md5_digest": "518e329122cb572f7599c1e9f73d008c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1662893, "upload_time": "2014-07-04T04:11:24", "url": "https://files.pythonhosted.org/packages/cd/45/2b01a7de4942a81cfd925d5fe6c1603fe4babec4e761e0773053cc0a204f/experimentator-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "333a5d91e1fbf85f2d074f1b5693e30e", "sha256": "6fa3504a0de11e7235eae562e8b9005936b14d3243b74202a17945d68845e0de" }, "downloads": -1, "filename": "experimentator-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "333a5d91e1fbf85f2d074f1b5693e30e", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 37060, "upload_time": "2014-07-22T01:19:11", "url": "https://files.pythonhosted.org/packages/63/8d/da328b65142a546668e9241ad4a9b3ba1d77ee0b8f0399a66188ebabc250/experimentator-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d26f9cc6aecb0f6986a81ca7bec3150", "sha256": "6db08f3265a6ec7e9752b645021f7bbd8ebc097d76e895b9100ca609266658e5" }, "downloads": -1, "filename": "experimentator-0.2.3.tar.gz", "has_sig": false, "md5_digest": "8d26f9cc6aecb0f6986a81ca7bec3150", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 146730, "upload_time": "2014-07-22T01:19:09", "url": "https://files.pythonhosted.org/packages/31/31/8f4e4ec443150e6b03748d58e75ec8f1eedcc9d91d69813f03b1c6a8b6a6/experimentator-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "3743106d7764a6e0c6e64a19b33b3653", "sha256": "a8226f880db6c93f5b4a7a20eefa5415c56feb7112a556606333a69e88d94ded" }, "downloads": -1, "filename": "experimentator-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "3743106d7764a6e0c6e64a19b33b3653", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 37208, "upload_time": "2014-07-31T06:09:14", "url": "https://files.pythonhosted.org/packages/3e/22/aef36fb85af8e86d3e996775003240034dbc61b1beb2150fbae202915b13/experimentator-0.2.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e719f87c9580871564d359ca0aae3fba", "sha256": "bd64e7c953e2f51f4ed8304f6ebbeb54b48a85b1911d461833994502de73018c" }, "downloads": -1, "filename": "experimentator-0.2.4.tar.gz", "has_sig": false, "md5_digest": "e719f87c9580871564d359ca0aae3fba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 144782, "upload_time": "2014-07-31T06:09:11", "url": "https://files.pythonhosted.org/packages/85/74/5676c9ce63ed018bdfd8465f87c421a3bb06e288435d068f850b622c8aa8/experimentator-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "62fc3d899a5cf21500e31ad27e7a47b2", "sha256": "2433cd84f20ecba44acedddc5bd2e13da92f48d3388c12149a0aaf571a278ef9" }, "downloads": -1, "filename": "experimentator-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "62fc3d899a5cf21500e31ad27e7a47b2", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 37198, "upload_time": "2015-03-23T22:32:54", "url": "https://files.pythonhosted.org/packages/b8/94/54b009ad9235b98b7cd76afd74dc53795227ed8524a4564dfb5f67c8b1e2/experimentator-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba9dd8845e57f18f8eebe5eab183e9e7", "sha256": "1bc31540084c7337d3674191978ff094ef7152f2f28d1a4cc5937251573aaed8" }, "downloads": -1, "filename": "experimentator-0.2.5.tar.gz", "has_sig": false, "md5_digest": "ba9dd8845e57f18f8eebe5eab183e9e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 218815, "upload_time": "2015-03-23T22:27:55", "url": "https://files.pythonhosted.org/packages/37/6c/15323421a6829f836959ff7c88243b6b4032e5ef1341e84760c4c20a827f/experimentator-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f45bcb0431fbbb74d6c47be8a7c41587", "sha256": "00b801105c997fd2849de1c899d29465b1fe273cb8009a14ab668a401854da57" }, "downloads": -1, "filename": "experimentator-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f45bcb0431fbbb74d6c47be8a7c41587", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39588, "upload_time": "2015-08-26T19:04:07", "url": "https://files.pythonhosted.org/packages/bf/6b/f5b0fccb2c9b0740aaf10311785630a71a083e2cccea47d6248be2bb9aa6/experimentator-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9b1431f067c9ff73eea555319cf22af6", "sha256": "1384169f6a0a254326d38f2ee02500e329206402ba5f8c03ea4c7737cde2a7af" }, "downloads": -1, "filename": "experimentator-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9b1431f067c9ff73eea555319cf22af6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 219108, "upload_time": "2015-08-26T19:04:13", "url": "https://files.pythonhosted.org/packages/69/a0/b75fd20acd407722e01ebdd5f9885503836488993dab6d1785e83388f7a3/experimentator-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "e0f56dd88484d9622cbf4b8ae093dc89", "sha256": "d728f5126c78ca619d5d747e0019fcebcc7a068b32cb49710902660ec880fc2d" }, "downloads": -1, "filename": "experimentator-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e0f56dd88484d9622cbf4b8ae093dc89", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39477, "upload_time": "2016-06-07T16:29:42", "url": "https://files.pythonhosted.org/packages/95/e5/380a937d90e3cded01b56c99e4ea884e3a1fe00159abe8056937bab2d6f4/experimentator-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d241fd6dcd68e0a882f8edf29e92ffd", "sha256": "714e72b795e713c112fd092fe35582187a642212ccaa792771c376f963206007" }, "downloads": -1, "filename": "experimentator-0.3.1.tar.gz", "has_sig": false, "md5_digest": "2d241fd6dcd68e0a882f8edf29e92ffd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71709, "upload_time": "2016-06-07T16:30:34", "url": "https://files.pythonhosted.org/packages/ee/ca/8ab27c60e14e70c7915d56744b6347a8ce7b50d340a59bd1c8c0024691dc/experimentator-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0f56dd88484d9622cbf4b8ae093dc89", "sha256": "d728f5126c78ca619d5d747e0019fcebcc7a068b32cb49710902660ec880fc2d" }, "downloads": -1, "filename": "experimentator-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e0f56dd88484d9622cbf4b8ae093dc89", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 39477, "upload_time": "2016-06-07T16:29:42", "url": "https://files.pythonhosted.org/packages/95/e5/380a937d90e3cded01b56c99e4ea884e3a1fe00159abe8056937bab2d6f4/experimentator-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d241fd6dcd68e0a882f8edf29e92ffd", "sha256": "714e72b795e713c112fd092fe35582187a642212ccaa792771c376f963206007" }, "downloads": -1, "filename": "experimentator-0.3.1.tar.gz", "has_sig": false, "md5_digest": "2d241fd6dcd68e0a882f8edf29e92ffd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71709, "upload_time": "2016-06-07T16:30:34", "url": "https://files.pythonhosted.org/packages/ee/ca/8ab27c60e14e70c7915d56744b6347a8ce7b50d340a59bd1c8c0024691dc/experimentator-0.3.1.tar.gz" } ] }