Sketchpad messes resolution / logger stores whole path.
Hi OpenSesame people!
I have built an experiment that works pretty well, with the Expyriment backend. It includes presentation of some images, one at a time (which is done by inline script), and then presentation of two images simultaneously (which is done with a sketchpad).
I have two issues that I haven't managed to solve.
- When the time comes for the sketchpad to run, the experiment exits fullscreen mode. So, it runs in fullscreen from the beggining, but it minimizes when the sketchpad runs.
- Concerning the logger, I have asked it to log the images that are presented each time. However, it stores the whole file path, not just the name with which I have defined each file in the script. This is not really a big problem, but as I will need to analyze lots of observations, it would be best if the data looked simpler.
To give you some more info: I ask it to log variables image1, image2, image3.
Those have been defined as such:
var.image1=my_list_stimuli[0] var.image2=my_list_stimuli[1] var.image3=my_list_stimuli[2]
'my_list_stimuli' contains the following names:
my_list_stimuli = [bird_green, bird_red, bird_yellow]
and those names are defined as such
bird_green = pool["bird_green.png"] bird_red = pool["bird_red.png"] bird_yellow = pool["bird_yellow.png"]
So instead of logging just those names, it logs this:
Does anyone have any ideas?
Thank you very much, in advance.
Comments
I also forgot to add the following:
In another version of the same experiment, that runs with psycho (I prefer it because i also play sound in that version), when logging the response time, it comes out in a weird format, so like that:
Is there a way to control this so that it just comes out in ms?
Hi,
When the time comes for the sketchpad to run, the experiment exits fullscreen mode. So, it runs in fullscreen from the beggining, but it minimizes when the sketchpad runs.
I have never heard of such a thing. Could you record it and share the vid here?
However, it stores the whole file path, not just the name with which I have defined each file in the script.
The
pool[xxx]
command is responsible for translating a simple filename to the entire path (essentially adding the current directory or wherever the file is located to the file name. So, if you want only the name logged, and not the entire path, you need to add a layer of abstraction:And then log only red_bird and not bird_red. See what I mean?
Is there a way to control this so that it just comes out in ms?
Quite sure these are ms. The
E+15
means that you multiple the number with 10 to the power of 15. So it is just a very large response time you have. Whether this is a mistake in your code, or some problem with Psychopy I can't see without further info. Normally though, the problem is with importing files to Excel rather than the actual logging of info. You can share a log file here, and I can check whether the file itself is fine.Eduard
Hi Eduard :)
sorry this took so long.
Concerning the 2nd question, where the logger logged the whole filepath, i did as you suggested and added another layer of abstraction. However it keeps logging the whole path.
So I did this. Do you have any ideas?
Well, the canvas needs the full path for showing the image. So, you essentially can't use the same variable for logging and for presenting. Log them separately, e.g. var.stimulus1 = 'bird.png' while var.stim1_file = <full_path>
You could also change the order of your code, to make this more intuitive:
Hope this helps,
Eduard