

Scripts = for i in upnum_tabs for j in i if j.startswith('Script file')] Pnums = for i in upnum_tabs for j in i if j.startswith('SubjectNumber')] #if Cindy's set: change SubjectNumber to SubectName and 14 to 12 #makes list of ALL pnums entered (even not collected) *add column named 'firstattempt' to data set first, filled with ints 88888 txt extension)Įndfile: string enter output filename (include. Startfile: string enter original filename (include. #IMPORTS DATA FROM CSV #make sure to check file nameĭef firstattempt(startfile,endfile): #function finds first attempt per trial

# MAKE SURE NEW COLUMNS ARE CREATED AND HAVE CONGRUENT DATA IN THEM #
#Psyscope language code#
#- must add record pnum feature (or if name, change code accordingly below) #- SAME AMOUNT OF COLUMNS FOR ALL Ss PER TEXT FILE TO BE CONVERTED Get to your analyses! - you'll find your CSV data set in your directory! e.g., if you want to convert one data file to a CSV, type:ħ. you'll see it open, and give information about the module to to look at the filepath currently set, simply type 'pwd' into the PyLab terminal and press RETURN e.g., if your directory was in /Users/Admin/PyScope: type the command: 'cd' + + (no brackets or single quotes), then press RETURN (enter) Change the filepath so that PyLab reads and writes files in the directory you created for example, if your data file is named 'data', rename it will '.txt' appended to the end ('data.txt')ĥ. Add a '.txt' extension to your raw data files Make a directory (folder) where you will keep both the PyScope script (pyscope.py) and your raw and extracted data files.ģ.

you will find the final installed PyLab standalone (what you click to open it) in your Application (Mac) or Program Files (Windows) folders.Ģ.
#Psyscope language install#
this package will install PyLab, the 'application' from which you will load the python language into your terminal, where you will then execute the commands. It will always ask for a participant number before running.įor those unfamiliar with running python scripts, this is a quick guide to setting up and executing the PyScope functions to extract your data. Go to 'Prompt When:', and set it to 'Experiment is run' Highlight the SubjectNumber row, and click the 'Configure' box on the top-right check the 'Data File' column for the 'SubjectNumber' row (under 'Item' column) go to top left of psyscope, and enter the 'Subject Info' interface ‚Ä¢ assumes participant number is included in data set (for additional help, contact Ryan Stolier: requirements: (For additional help, contact Ryan Stolier: module help It also has functions for marking first and last attempts at each trial. This is a Python module for extracting PsyScope data from txt data files and organizing it into a csv, carrying pnum and script data into each respective row.
