Quail logo


Quail is a Python package that facilitates analyses of behavioral data from memory experiments. (The current focus is on free recall experiments.) Key features include:

The intended user of this toolbox is a memory researcher who seeks an easy way to analyze and visualize data from free recall psychology experiments.

The toolbox name is inspired by Douglas Quail, the main character from the Philip K. Dick short story We Can Remember It for You Wholesale (the inspiration for the film Total Recall).

Try it!

Check out our repo of Jupyter notebooks.


To install quail in the recommended way, run:

pip install quail

This will install quail with basic functionality. To install with speech decoding dependencies (Note: you will still need to install ffmpeg manually on your computer since it is not pip installable. For instructions, see here):

pip install quail[speech-decoding]

For CDL users, you can install speech decoding and efficient learning capabilities like this:

pip install quail[speech-decoding, efficient-learning]

To install directly from this repo (not recommended, but you'll get the "bleeding edge" version of the code):

git clone

Then, navigate to the folder and type:

pip install -e .

(this assumes you have pip installed on your system)

This will work on clean systems, but if you encounter issues you may need to run:

sudo pip install --upgrade --ignore-installed -e .


If installing from github (instead of pip), you must also install the requirements: pip install -r requirements.txt


Check out our readthedocs: here.

We also have a repo with example notebooks from the paper here.


Please cite as:

Heusser AC, Fitzpatrick PC, Field CE, Ziman K, Manning JR (2017) Quail: A Python toolbox for analyzing and plotting free recall data. The Journal of Open Source Software, 2(18)

Here is a bibtex formatted reference:

@ARTICLE {HeusEtal2017b,
    doi = {10.21105/joss.00424},
    url = {},
    year = 2017,
    publisher = {The Open Journal},
    volume = {2},
    number = {18},
    author = {Andrew C. Heusser and Paxton C. Fitzpatrick and Campbell E. Field and Kirsten Ziman and Jeremy R. Manning},
    title = {Quail: A Python toolbox for analyzing and plotting free recall data},
    journal = {The Journal of Open Source Software}


(Some text borrowed from Matplotlib contributing guide.)

Submitting a bug report

If you are reporting a bug, please do your best to include the following:

  1. A short, top-level summary of the bug. In most cases, this should be 1-2 sentences.
  2. A short, self-contained code snippet to reproduce the bug, ideally allowing a simple copy and paste to reproduce. Please do your best to reduce the code snippet to the minimum required.
  3. The actual outcome of the code snippet
  4. The expected outcome of the code snippet

Contributing code

The preferred way to contribute to quail is to fork the main repository on GitHub, then submit a pull request.


If you have a question, comment or concern about the software, please post a question to Stack Overflow, or send us an email at


Build Status

To test quail, install pytest (pip install pytest) and run pytest in the quail folder


See here for more examples.

Create an egg!

Eggs are the fundamental data structure in quail. They are comprised of lists of presented words, lists of recalled words, and a few other optional components.

import quail

# presented words
presented_words = [['cat', 'bat', 'hat', 'goat'],['zoo', 'animal', 'zebra', 'horse']]

# recalled words
recalled_words = [['bat', 'cat', 'goat', 'hat'],['animal', 'horse', 'zoo']]

# create egg
egg = quail.Egg(pres=presented_words, rec=recalled_words)

Analyze some data

#load data
egg = quail.load_example_data()

analyzed_data = quail.analyze(egg, analysis='accuracy', listgroup=['average']*8)

Plot Accuracy

analyzed_data = quail.analyze(egg, analysis='accuracy', listgroup=['average']*8)
ax = quail.plot(analyzed_data, title='Recall Accuracy')

Plot Accuracy

Plot Serial Position Curve

analyzed_data = quail.analyze(egg, analysis='spc', listgroup=['average']*8)
ax = quail.plot(analyzed_data, title='Serial Position Curve')

Plot SPC

Plot Probability of First Recall

analyzed_data = quail.analyze(egg, analysis='pfr', listgroup=['average']*8)
ax = quail.plot(analyzed_data, title='Probability of First Recall')

Plot PFR

Plot Lag-CRP

analyzed_data = quail.analyze(egg, analysis='lagcrp', listgroup=['average']*8)
ax = quail.plot(analyzed_data, title='Lag-CRP')

Plot Lag-CRP

Plot Memory Fingerprint

analyzed_data = quail.analyze(egg, analysis='fingerprint', listgroup=['average']*8)
ax = quail.plot(analyzed_data, title='Memory Fingerprint')

Plot Fingerprint