Practicum Experimental Psychology (2023/2024 blok 4)
Assignment 2: The Detection Task............................................................................1
Assignment 3A+3B....................................................................................................3
Assignment 4. String Handling..................................................................................7
Assignment 5 Reading files from multiple folders....................................................12
Assignment 2: The Detection Task
Storyboard:
1
,Pseudocode:
Start
1. Display Welcome_Screen + instructions
2. Wait until SPACEBAR click to start experiment
-force end routine
-keys 'space'
Trial
4. Make a condition file with --
|stim_name | CorrectAns | mask_img
|Assignment2\u_1.png | left
|Assignment2\u_2.png | left
---
|Assignment\a_1.png | right
|
5. Add interstimulus interval (ISI)
0.0 tot 0.45
6. Show fixation cross in the center of the screen for ... S
size [ w,h] = [53,53] px
position = [0,0]
Start time: 0.45
End time: 1.0 s
7. Display randomized picture of Amersfoort of Utrecht a_1/a_10/u_1/u_10 for ... S
Start time: 1.0
End time: 1.45 s
Set every repeat
2
, 8. Display mask randomization m1 to m4 for ... S
Start time: 1.4
End time: 1.8
Set every repeat
9. Let mask disappear and allow the part to respond after
Participant response = utrecht = LEFT , amersfoort = RIGHT
10. Record participant response
store: last key
store correct: CHECKED
correct answer: $CorrectAns
11. Check participant response with CorrectAns
12. Add +1 to is_correct = 0
13. Make a loop: repeat for 15 trials --> fix cross, random a/u, mask, answer etc.
Conditions file: killingmyselfpart2.xlsx
Looptype: random
Middle/end
14. Count number of correct answers per participant
15. Display number of correct answers per participant
End
16. Thank you for participating! screen
Code blocks used:
In ‘begin experiment’: correct_count = 0
In ‘end routine’: if Part_Resp.keys == CorrectAns:
correct_count += 1
In routine: result_screen
Result_text.text = f"You answered {correct_count} out of 20 correctly!"
Result_text.color = 'green'
Assignment 3A+3B
#Library for fast, flexible and expressive data structures
import pandas as pd
import numpy as np
3
Assignment 2: The Detection Task............................................................................1
Assignment 3A+3B....................................................................................................3
Assignment 4. String Handling..................................................................................7
Assignment 5 Reading files from multiple folders....................................................12
Assignment 2: The Detection Task
Storyboard:
1
,Pseudocode:
Start
1. Display Welcome_Screen + instructions
2. Wait until SPACEBAR click to start experiment
-force end routine
-keys 'space'
Trial
4. Make a condition file with --
|stim_name | CorrectAns | mask_img
|Assignment2\u_1.png | left
|Assignment2\u_2.png | left
---
|Assignment\a_1.png | right
|
5. Add interstimulus interval (ISI)
0.0 tot 0.45
6. Show fixation cross in the center of the screen for ... S
size [ w,h] = [53,53] px
position = [0,0]
Start time: 0.45
End time: 1.0 s
7. Display randomized picture of Amersfoort of Utrecht a_1/a_10/u_1/u_10 for ... S
Start time: 1.0
End time: 1.45 s
Set every repeat
2
, 8. Display mask randomization m1 to m4 for ... S
Start time: 1.4
End time: 1.8
Set every repeat
9. Let mask disappear and allow the part to respond after
Participant response = utrecht = LEFT , amersfoort = RIGHT
10. Record participant response
store: last key
store correct: CHECKED
correct answer: $CorrectAns
11. Check participant response with CorrectAns
12. Add +1 to is_correct = 0
13. Make a loop: repeat for 15 trials --> fix cross, random a/u, mask, answer etc.
Conditions file: killingmyselfpart2.xlsx
Looptype: random
Middle/end
14. Count number of correct answers per participant
15. Display number of correct answers per participant
End
16. Thank you for participating! screen
Code blocks used:
In ‘begin experiment’: correct_count = 0
In ‘end routine’: if Part_Resp.keys == CorrectAns:
correct_count += 1
In routine: result_screen
Result_text.text = f"You answered {correct_count} out of 20 correctly!"
Result_text.color = 'green'
Assignment 3A+3B
#Library for fast, flexible and expressive data structures
import pandas as pd
import numpy as np
3