# Problem with csv log

**URL:** <https://discourse.psychopy.org/t/problem-with-csv-log/8686>\
**Category:** Builder\
**Created:** [July 31, 2019, 2:22pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686 "2019-07-31T14:22:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/robbu/32/4425_2.png) [@robbu](https://discourse.psychopy.org/u/robbu)\
**Post date:** [July 31, 2019, 2:22pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/1 "2019-07-31T14:22:26Z")

</div>

I’m ready to start my thesis project after many many tests.

This is the experiment:  
A stimulus image appears for 4 sec after that two other images appear and the subject have to choose ones with a ps3 controller to go on.  
The two images are one the left and one on the right and how they swing from left to right is decided by this script:

from random import shuffle  
pos = [[0.4, 0], [-0.4, 0]]

My problem is that the csv file doesn’t report the final position every trial.  
So i don’t know which image is choosed by the subject. How can I solved my problem?

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [July 31, 2019, 2:33pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/2 "2019-07-31T14:33:09Z")

</div>

Hi @robbu, are you using the Joystick component, and does the component dialog box look like this:

![Untitled](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/a/2a79e31a085c7ae8f457126aa642901b662e67b9.png)

---

<div class="post-metadata">

**Author:** ![robbu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/robbu/32/4425_2.png) [@robbu](https://discourse.psychopy.org/u/robbu)\
**Post date:** [July 31, 2019, 3:19pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/3 "2019-07-31T15:19:03Z")

</div>

no, only “name” and I see only 0 and 1 .

![Cattura](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/8/28f545a1b1e8c5af30101c89b61d62b951c558cf.png)

Probably i’ve just set the joystick component so bad that it doesn’t give me the output that I want.  
I’ve asked subjects to press L1 for left images and R1 for right images and yes, it stores it! for every trial when L1 is pressed and so R1. But what I need is knowing which images is displayed in that trial on the left and on the right.  
I hope to be clear.

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [July 31, 2019, 3:26pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/4 "2019-07-31T15:26:47Z")

</div>

Thanks, it sounds like you just want to save the position of the images that are presented. You can do this in the `End Routine` tab of the code component:

```auto
thisExp.addData("leftImagePos", leftImage.pos ) 
thisExp.addData("rightImagePos", rightImage.pos ) 

# Where leftImage and rightImage are the names of your image components

```

---

<div class="post-metadata">

**Author:** ![robbu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/robbu/32/4425_2.png) [@robbu](https://discourse.psychopy.org/u/robbu)\
**Post date:** [July 31, 2019, 4:00pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/5 "2019-07-31T16:00:02Z")

</div>

![2](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/0/204c7b663c6a065af8c4900514dcc3dd6a2ab39a.png)

ohh perfect! Now I see all the coordinates. Thank you so much!

---

<div class="post-metadata">

**Author:** ![robbu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/robbu/32/4425_2.png) [@robbu](https://discourse.psychopy.org/u/robbu)\
**Post date:** [July 31, 2019, 4:10pm UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/6 "2019-07-31T16:10:04Z")

</div>

Can I see this data in function of position?  
something like 2 column of “left” and “right” and than all the images listed

but this is a big progress for my work!

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [August 1, 2019, 9:05am UTC](https://discourse.psychopy.org/t/problem-with-csv-log/8686/7 "2019-08-01T09:05:05Z")

</div>

If you want to save the name of the images? Then, try:

```auto
thisExp.addData("leftImage_image", leftImage.image) 
thisExp.addData("rightImage_image", rightImage.image) 

```
