Logger only logs the first trial
Hi everyone!
I have an issue with my logger, it seems that it only records the first trial of the experiment but doesn't log anything else after that. Hence, showing only one single row in the file.
Previously, everything worked just fine and I had a custom list of variable in the logger settings. They all seem to get logged nicely. After that I decided to make some adjustments to the block of trials in my experiment because I wanted to randomize the order of the blocks (I only had one block loop that I set to repeat 4 times but I changed it into 4 separate block loops that are run in random order, I used this discussion page as a guide: https://forum.cogsci.nl/discussion/4041/feature-request-allow-each-row-within-a-loop-to-run-different-sequence#latest).
The logger started showing this issue after that. I already updated the custom list of variables, I also tried re-ticking the "automatically log all variables" again to see if it was the problem but it still showed the same result, all the variables seemed to get logged— just only on the first trial.
I included my experiment file below, feel free to try and run it. Honestly it might just be a silly issue that happened because of my clumsiness when I modified the blocks, but I hope anyone can help me resolve this issue because I can't seem to figure it out.
Thank you so much in advance, have a lovely day!
Comments
Hi @reirei,
This is happening because you placed a single instance of the log at the end of your task. The logger saves all of the variables from the task with the value they contain at the moment the log is run. Hence, if you run the log only once at the end of your task, it will only save one row of data with the values the differenet variables have at that moment. So, as it stands, your task is only saving the value of all the task's variables at the very end of your experiment (i.e., the only trial actually registered in the log is the last one.
You should put the log at the end of the "letter_sequence" sequence and a linked copy (important: linked) at the end of every sequence running a trial (number_sequence, block1_loop_sequence, etc.).
Incidentally, your task contains quite a lot of redundancy. Your trial sequence does the same thing across the whole experiment. You could have used a single trial sequence and use linked copies across the various blocks instead of creating 6 copies of the same sequence and its objects. The loops are in charge of indicating what stimulus, correct response etc. shoud be displayed, and these would be different. The sequence of event running in each block is essentially doing the same thing, so there is no need to create a distinct one for every block. It's no necessary to put each block within its own sequence either (e.g., block1_sequence, block2_sequence, etc.).
Your task will run as it is (once you place the logger in the correct places), but you could sreamline it to make it a lot shorter by removing redundancies (would make the task run smoother, and it also reduces the risk of making errors - right now, if you decided to change the duration of the stimulus, you'd have to go and change that in 6 different places, whereas with a single trial sequence and linked copies, you'd achieve that in one single change).
Hope this helps,
Fabrice.
Hi @Fab,
Thank you so much for your response, it works perfectly now!
And thank you so much for your helpful advice on using linked copies for my trial sequence! It could've saved me so much more time if I had known I could've done that. It's my first time using Open Sesame and my experiment was a product of me putting together a bunch of solutions I got from discussion forums, I definitely still have so much to learn.
At least now I can make my custom logged variable list shorter using linked copies of my sequence— making it easier for me to process my data, and have my experiment work as intended.
Thank you so much again, have a lovely day!