neuropsychology / Neuropsydia.py
Licence: mpl-2.0
A Python Module for Creating Experiments, Tasks and Questionnaires.
Stars: ✭ 51
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Neuropsydia.py
programmingforpsych
A textbook for programming techniques for experiment creation and data-analysis
Stars: ✭ 18 (-64.71%)
Mutual labels: psychology, experiments
expfactory
software to generate a reproducible container with a battery of experiments
Stars: ✭ 29 (-43.14%)
Mutual labels: psychology, experiments
Outlookcaldavsynchronizer
Sync Outlook with Google, SOGo, Nextcloud or any other CalDAV/CardDAV server
Stars: ✭ 560 (+998.04%)
Mutual labels: tasks
Laravel Initializer
A convenient way to initialize your application
Stars: ✭ 597 (+1070.59%)
Mutual labels: tasks
Psychopy
For running psychology and neuroscience experiments
Stars: ✭ 1,020 (+1900%)
Mutual labels: psychology
Mind Expanding Books
📚 Books everyone should read!
Stars: ✭ 7,151 (+13921.57%)
Mutual labels: psychology
Django Cloud Tasks
Integrate Google Cloud Tasks with Django
Stars: ✭ 27 (-47.06%)
Mutual labels: tasks
Cpprestsdk
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Stars: ✭ 6,631 (+12901.96%)
Mutual labels: tasks
Vscode Todo Plus
Manage todo lists with ease. Powerful, easy to use and customizable.
Stars: ✭ 622 (+1119.61%)
Mutual labels: tasks
Gumby
Experiment runner framework for IPv8 and Tribler
Stars: ✭ 12 (-76.47%)
Mutual labels: experiments
Django Todo
A multi-user, multi-group todo/ticketing system for Django projects. Includes CSV import and integrated mail tracking.
Stars: ✭ 592 (+1060.78%)
Mutual labels: tasks
Gridcoin Tasks
tasks, wishes, ideas, ... for the Gridcoin project
Stars: ✭ 32 (-37.25%)
Mutual labels: tasks
Microsoft Graph Toolkit
Authentication Providers and UI components for Microsoft Graph 🦒
Stars: ✭ 518 (+915.69%)
Mutual labels: tasks
Arq
Fast job queuing and RPC in python with asyncio and redis.
Stars: ✭ 695 (+1262.75%)
Mutual labels: tasks
Simex
Start-to-end photon experiment simulation platform
Stars: ✭ 18 (-64.71%)
Mutual labels: experiments
A Python Module for Creating Experiments, Tasks and Questionnaires.
Name | neuropsydia |
---|---|
Latest Version | |
Documentation | |
Discussion | |
Questions | |
Authors | |
Support | Windows 7, 8, 10 |
Installation
To get the latest stable version (1.0.6
), run the following in the command prompt (might take a few minutes):
pip install https://github.com/neuropsychology/Neuropsydia.py/zipball/master
Not working? Check this out!
NOTE: We strongly recommend (for Windows users) the use of the WinPython bundle, that will allow you to have a ready-to-go scientific and portable Python setup.
To upgrade Neuropsydia, uninstall it and reinstall it 😉.
pip uninstall neuropsydia
Contribute
- You need some help? You found a bug? You would like to request a new feature? Just open an issue ☺️
- Want to add yourself a feature? Correct a bug? You're more than welcome to contribute! Check this page to see how to submit your changes on github.
Citation
You can cite Neuropsydia with the following:
Makowski, D. & Dutriaux, L. (2016). Neuropsydia: A Python Module for Creating Experiments, Tasks and Questionnaires.
Memory and Cognition Lab' Day, 01 November, Paris, France
Note: The authors do not give any warranty. If this software causes your keyboard to blow up, your brain to liquefy, your toilet to clog or a zombie plague to leak, the authors CANNOT IN ANY WAY be held responsible.
Tutorials, Examples and Documentation
-
Tutorials
- [x] Getting Started
- [x] Create a Stroop Task
-
Examples
- [x] State-Trait Anxiety Inventory (STAI-Y)
- [x] Digit Span
- [x] Go/No Go
- [x] Flanker
- API Documentation
Example
A Go/No-Go Task in 50 lines
Try this!
import neuropsydia as n # Load neuropsydia
import random # Import the random module
import pandas as pd # To manipulate and save the data
import numpy as np # To do some maths
n.start() # Start neuropsydia
n.instructions("Goal: Hit SPACE whenever a GREEN circle appears. \nWhen it is RED, don't press anything.") # Display instructions and break line with \n
n.newpage("grey") # Fill the screen
n.countdown() # Display countdown
# Initialize the data storage with a dictionary containing empty lists
data = {"Trial": [],
"Stimulus": [],
"ISI":[],
"RT":[],
"Response":[]}
for trial in range(5): # Iterate over the number of trials
stimulus = random.choice(["green", "red"]) # Select a stimulus type
ISI = random.randrange(start=500, stop=2000, step=500) # Select the inter-stimuli interval (ISI)
n.newpage("grey") # Fill the screen
n.write("+") # Fixation cross
n.refresh() # Diplay it on screen
n.time.wait(ISI) # Wait
n.circle(size=2, fill_color=stimulus) # Display the stimulus (filled with the color selected above)
n.refresh() # Diplay it on screen
response, RT = n.response(time_max=1500) # Wait until 1.5s and collect the response and its time
# Categorize the response
if response == "SPACE" and stimulus == "green":
response_type = "HIT" # Hit
if response != "SPACE" and stimulus == "green":
response_type = "MISS" # Miss
if response == "SPACE" and stimulus == "red":
response_type = "FA" # False Alarm
if response != "SPACE" and stimulus == "red":
response_type = "CR" # Correct Rejection
# Store data by appending each item to its list
data["Trial"].append(trial)
data["Stimulus"].append(stimulus)
data["ISI"].append(ISI)
data["RT"].append(RT)
data["Response"].append(response_type)
# Data saving
df = pd.DataFrame.from_dict(data) # Transform the data dictionary into a proper and savable dataframe
df.to_csv("data.csv") # Save it
# Quick analysis
RTs = df.query('Response=="HIT"')["RT"] # Select the Hits' RTs
print("Mean RT: " + str(round(RTs.mean(), 2))) # Print the mean
print("SD RT: " + str(round(RTs.std(), 2))) # Print the standard deviation
print("Number of False Alarms: " + str(len(df[df['Response']=="FA"]))) # Print the number of intrusions (false alarms)
n.close() # Close neuropsydia
Features
Write, Ask and Display Images
- [x] Easily write, display images and interact with the user.
- [x] Detailed control over the timing and latency: preload images and display them exactly whenever you want.
import neuropsydia as n
n.start()
n.write("Welcome", style="title")
name = n.ask("What is your name?", y=5)
n.write("Ok, " + name + ", here is a super cool cat.", y=3)
n.image("cat.png", size=3, y=-3.5)
n.refresh()
n.time.wait(2000)
n.close()
Scales and Questionnaires
- [x] Fully automated questionnaires.
- [x] Powerful scale creation.
import neuropsydia as n
n.start()
n.newpage()
n.scale(title="Is Python great?",
y=3.3,
anchors=["", ""],
style="blue",
analog=False,
edges=[1,5],
labels=["not at all", "not really", "maybe", "quite", "totally"],
labels_size=0.6
)
n.scale(title="How is neuropsydia?",
y=-3.3,
line_length=12,
edges=[0,100],
anchors=["atrocious", "brilliant"],
point_center=True,
separation_labels=["Bad","Good"],
style="purple",
show_result=True,
show_result_shape_line_color="blue"
)
n.close()
Choices
- [x] Easily display clickable choices, useful in case of recognition tasks or so.
import neuropsydia as n
n.start()
n.newpage()
response = n.choice(["Yes", "No"], y=5, title="Isn't it easy?")
response = n.choice(["Hell no", "Nope", "Dunno", "Sure"],
y=-5,
title="Am I better looking?",
height=-2,
boxes_edge_size=0,
boxes_background=["red", "amber", "teal", "blue"],
help_list=["means not at all", "means no", "means you don't know", "means yes"])
n.close()
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].