OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2.6
Standard Standalone? (y/n) If not then what?: Y
**What are you trying to achieve?:
Hi guys! I’m trying to build a task that requires the participant to use the brush tool to paint the “right spot” on an image. I know the brush tool does not automatically saves it’s data on the .csv file that’s created after a trial, but it shows up on the .log file, like this:
92.1524 DATA Mouse: Left button down, pos=(810,647) 92.1524 EXP Resetting brush parameter: brushPos. 92.1525 EXP Creating ShapeStim for brush 94.1191 DATA Mouse: Left button up, pos=(876,650)
So at first i figured i could try to make the program save data for all positions from the brush component, but it would generate A LOT of data.
So i thought about it and now my idea is to make the program understand where the “right spot” is, so when the participant’s painting starts and ends at the “right spot”, a “correctAnswer” variable changes value (eg. from 0 to 1).
I don’t know if this is the best approach to this issue, but i need your help with a couple things:
1- How do i teach the program to save the brush position data on a .csv file in addition to the .log one?
2- Is there a way to make the program show me my mouse coords is in real time as i’m testing it? Something like this:
3- How do i code so that the program knows the full “right spot”? eg.:
This is one of the images:
The marks here are where i want the “right spot” to be, AKA if the participant starts and ends the brush tool inside this area, it will be considered a correct answer:
4- Is there a function to make this work? Something that tells the program something like this?
if brushTool starts inside this whole area, CorrectBrushStart = 1 else CorrectBrushStart = 0 if brushTools ends inside this whole area, CorrectBrushEnd = 1 else CorrectBrushEnd = 0 if CorrectBrushStart = 1 and CorrectBrushEnd = 1 CorrectAnswer = 1
If so, what is it?
5- Is there a way to make a “reset button”, like a button where if the participant clicks on it, brush position and variables are reset? I know there is a way to reset the brush, since the .log show this line:
22.8348 EXP Resetting brush
But i don’t know the function to code it.
As always, thank you in advance!