Can't save the data of response time for mouse click online

Excuse me , I use mouse click in the whole experiment . It could successfully save the data of response time in my offline study , while not in my online study . Actually , it could only save the object name which mouse clicked online. Why ? Is it a bug now ? Thanks!

@dvbridges could you look into this

@Succi_Wang it always helps if you provide a link to the study in question.

Thanks

No problem. I think the problem is related to setting the mouse save state to “Final”. With Final, only clickable stim is being written is the JS code. @jon, this might be a good time to copy the refactored mouse component code from Python to JS - alternatively I can push a quick fix. In the meantime, @Succi_Wang, if you save mouse state “on click”, you should get your desired output, depending on how you have set up your trials i.e., whether they end on mouse clicks.

Hmm, if the experiment is set to save “Final state” rather than a click it seems to me that we wouldn’t expect a reaction time to be saved. In that case the online experiment is doing the right thing, and the local experiment is doing the wrong thing! The final state suggests to me “What was the mouse state at the end of the routine?” so it says whether the buttons at that point were up/down and what was the location.

I agree with David that your solution is to set it to save the click first/last/all if you want an RT because RT is necessarily related to clicks.

@jon,@dvbridges ,thank you a lot ! I changed my mouse setting from "final state " into “on click” , and the problem has been solved ! :grin:

1 Like

I think time was misinterpreted in the data file as an RT, it is actually the mouse clock time at the end of the routine that is saved when using “final”.

Along those lines: I noticed that when I set the mouse settings to save “on click” I get the average of all click positions until the component ends. However, what I want is the state of the mouse and its RT when a clickable object is clicked for the first time, which ends the routine. I did not find the option to save the mouse state and RT for “final click”, which would be the solution for me?!

Would be grateful for comments/insights! Thanks

We are soon starting our measurements and I would like to use pavlovia for that, but there are still these unsolved issues (see above). Can someone help?

Hi @fragmag, I am not sure what issue you have. If you set the mouse to end the routine on valid clicks, and add your valid clickable stimuli names to “clickable stimuli” in the mouse component, you will get the x,y position and RT of your first valid click.

Hi,
the problem I had was, that even though I set the mouse to save on valid click and then end the routine, other clicks, that were outside the clickable object, were also registered. So, for example in one routine one could click the bottom left corner of the screen several times, then click on the clickable object in the middle of the screen which would end the routine. The entries in the logfile for mouse.position.x and mouse.position.y for that trial would be values around -1 instead of values around 0.

Ok, well you cannot save on valid clicks, you can only end the routine on valid clicks. So, if set up correctly, only valid clicks will be registered. Here is an example of valid clicks.validClicks.psyexp (5.6 KB)

Thank you for the demo. I did two trials of your validClicks routine. On one I clicked the top right corner sevral times, then the middle of the screen. On the second, I clicked the bottom left corner several times, then the middle of the screen. The output logs x/y positions of the mouse which aren’t inside the clickable object…
14_validClicks_2019_Nov_06_1003.xlsx (5.6 KB)

If you go to Experiment Settings > Data tab, check the save csv (trial by trial) setting, but uncheck the save csv (summaries) setting, save and repeat. This should give you normal trial by trial data instead of summaries, such as mean. This demo works correctly on my machine where only click inside the polygon image end trials. What computer are you using, and are you using retina display?

@dvbridges, I had the same problem and used your solution. However, setting mouse state to on Click saves the first click RT even if it is not in the valid stimuli to end the routine. Can I get the final RT for valid clicks?

Hi @dvbridges, sorry if this is a very obvious question, but is there any way, on Pavlovia, to save the name of the object that is clicked on, rather than just x,y position?

@ade_mh, yes when you set up your mouse component in Builder, you can list your clickable objects in the said field, and then add name, as the parameter of the object you wish to store. This should save a list of clicked object names in your data file.