Neuropsydia.py
Neuropsydia.py: A Python Module for Creating Experiments, Tasks and Questionnaires - Published in JOSS (2017)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
1 of 6 committers (16.7%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Scientific Fields
Repository
A Python Module for Creating Experiments, Tasks and Questionnaires.
Basic Info
Statistics
- Stars: 65
- Watchers: 10
- Forks: 24
- Open Issues: 14
- Releases: 3
Topics
Metadata Files
README.md
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):
python
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 :wink:. ```python pip uninstall neuropsydia
```
Contribute
- You need some help? You found a bug? You would like to request a new feature? Just open an issue :relaxed:
- 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!
```python 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.fromdict(data) # Transform the data dictionary into a proper and savable dataframe df.tocsv("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.
```python 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.
```python 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, linelength=12, edges=[0,100], anchors=["atrocious", "brilliant"], pointcenter=True, separationlabels=["Bad","Good"], style="purple", showresult=True, showresultshapelinecolor="blue" )
n.close() ```
Choices
- [x] Easily display clickable choices, useful in case of recognition tasks or so.
```python 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, boxesedgesize=0, boxesbackground=["red", "amber", "teal", "blue"], helplist=["means not at all", "means no", "means you don't know", "means yes"])
n.close() ```
Owner
- Name: École de Neuropsychologie
- Login: neuropsychology
- Kind: organization
- Email: dom.makowski@gmail.com
- Location: Paris, France
- Repositories: 9
- Profile: https://github.com/neuropsychology
An open community of people interested in improving Neuropsychology. Contact us if you're interested to join!
JOSS Publication
Neuropsydia.py: A Python Module for Creating Experiments, Tasks and Questionnaires
Authors
Tags
python psychology questionnaire experiments neuropsychology tasks assessmentGitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Dominique Makowski | d****9@g****m | 525 |
| LeoDutriaux | l****x@g****m | 29 |
| Pham Thanh Tam | t****1@e****g | 4 |
| marcosperduti | m****i@y****t | 1 |
| afif hendrawan | a****n@g****m | 1 |
| The Gitter Badger | b****r@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 22
- Total pull requests: 8
- Average time to close issues: over 1 year
- Average time to close pull requests: 3 minutes
- Total issue authors: 8
- Total pull request authors: 4
- Average comments per issue: 2.18
- Average comments per pull request: 0.25
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- DominiqueMakowski (14)
- cMadan (2)
- nuunuu (1)
- zhanghao1988 (1)
- atnplab (1)
- shanzayaziz (1)
- LeoDutriaux (1)
- maggieqqw (1)
Pull Request Authors
- DominiqueMakowski (3)
- Tam-Pham (3)
- gitter-badger (1)
- hndr91 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 9 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: neuropsydia
A Python Module for Creating Experiments, Tasks and Questionnaires.
- Homepage: https://github.com/neuropsychology/Neuropsydia.py/
- Documentation: https://neuropsydia.readthedocs.io/
- License: Mozilla Public License Version 2.0
-
Latest release: 1.0.4
published over 8 years ago
Rankings
Maintainers (1)
Dependencies
- Pillow *
- cryptography *
- neurokit *
- numpy *
- pandas *
- pygame *
- python-docx *
- pyxid *
- statsmodels *
- Pillow *
- cryptography *
- neurokit *
- numpy >=1.11.2
- pandas *
- pygame *
- python-docx *
- pyxid *
- scipy >=0.18.1
- statsmodels *
- Pillow *
- cryptography *
- neurokit *
- numpy *
- pandas *
- pygame *
- python-docx *
- pyxid *
- statsmodels *

