9/7/2023 0 Comments Psychopy scale reset![]() makedirs ( exp_info ) # Create a unique filename for the experiment data data_fname = exp_info + '_' + exp_info # create initial file name from participant ID and date/time data_fname = os. getDateStr () # get date and time via data module exp_info = exp_name # set experiment name # Check if set data path exists, if not create it if not os. quit () #= # Data storage: basic information, filename & path #= # Get date and time exp_info = data. DlgFromDict ( dictionary = exp_info, title = exp_name ) # create GUI dialog box from dictionary # If 'Cancel' is pressed, quit experiment if dlg. #= # Import modules #= from psychopy import gui, core # import psychopy modules/functions #= # Create GUI dialog box for user input #= # Get subject name, age, handedness and other information through a dialog box exp_name = 'PfP_2021' # set experiment name exp_info = dlg = gui. Let’s assume we have obtained some data regarding favorite movies, snacks and animals from a group of fantastic students (obviously talking about you rockstars!) and now want to test how each respectively provided item is perceived/ evaluated by our entire sample: how would we do that? The question now is: which ones do we need to implement and run our experiment? Wait a minute…we genuinely didn’t even talk about the experiment yet… Nice, looks like a decent collection of useful/feasible modules/ functions. Many more …: we unfortunately can’t check out due to time constraints Psychopy.data: handling of condition parameters, response registration, trial order, etc. visual/ sound: presentation of stimuli of various types (e.g. Psychopy.event: handling of keyboard/mouse/other input from user ![]() Psychopy.gui: various basic functions, including timing & experiment termination re: various basic functions, including timing & experiment termination However, we actually haven’t checked out what modules/ functions PsychoPy has. Thus, we will add them at the beginning as we go along! Please note, that we will go through a realistic example of coding experiments in python and thus might not all modules/ functions we will actually need when we start. Comparably to jupyter notebook, we will do that at the beginning of our script. So, what’s the first thing we usually do? That’s right: importing modules and functions we need. While the transition from jupyter notebooks to python scripts might seem harsh at first, it’s actually straight-forward: the steps we conducted/ commands we run in an incremental fashion will also be indicated/ run in an incremental fashion here, just within one python script line-by-line. If you don’t get an import error, at least the basic installation should be ok!Ĭool, we are now ready to actually do some coding! As said before we will do that in our experiment.py script. Machine learning to predict age from rs-fmri Structural connectivity and diffusion imaging Nilearn GLM: statistical analyses of MRI in Pythonįunctional connectivity and resting state ![]() Using Python for neuroimaging data - Nilearn Using Python for neuroimaging data - NiBabel Visualization of different data types with python Introduction to scikit-learn & scikit-image Introduction VII - Introduction to Python IIIĮxperimentation I - Introduction to PsychoPy Iĭata analyzes I - basics in data handlingĭata analyzes II - data visualization and analyses Introduction VI - Introduction to Python II ![]() Introduction V - Introduction to Python - I Introduction IV - the jupyter ecosystem & notebooks Label_2 = visual.TextStim(win, text="certain", height=0.Introduction II - the (unix) command line: bash Label_1 = visual.TextStim(win, text="uncertain", height=0.05, color="red", pos=) Scale=' ', showValue=False, acceptPreText="OK", ![]() Rating_scale = visual.RatingScale(win=win, name='rating_scale', marker='circle', Monitor='testMonitor', color=, colorSpace='rgb',īlendMode='avg', useFBO=True, units='height') Win = visual.Window(size=, fullscr=True, screen=0, I’m very new to this but basically with labels = the scale appears, the labels too, in the right place, but both in light grey, and i would like to change the font color, in red for uncertain and green for certain. I tried putting this part before and after the rating scale and it just doesn’t work. Rating_scale = visual.RatingScale(win=win, name=‘rating_scale’, marker=‘circle’, Label_2 = visual.TextStim(win, text=‘certain’, height=0.5) Label_1 = visual.TextStim(win, text=‘uncertain’, height=0.5) Capture d’écran à 16.20.36 1920×920 76.4 KB Initialize components for Routine “rating” -Ĭonfidence = visual.TextStim(win=win, name=‘confidence’, ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |