fixation cross location using yoked trials - Printable Version +- FindingFive Discussion Forum (http://discuss.findingfive.com) +-- Forum: Researchers (http://discuss.findingfive.com/forumdisplay.php?fid=3) +--- Forum: Study Grammar & Management (http://discuss.findingfive.com/forumdisplay.php?fid=5) +--- Thread: fixation cross location using yoked trials (/showthread.php?tid=164) Pages:
1
2
|
fixation cross location using yoked trials - aczyp - 10-20-2021 I have been trying to set up a speeded rating study where sentences are preceded by a fixation cross. The stimuli are tokenized_text sentences and text for the fixation cross. While it is easy to get a close-to-the-same location for fixation cross and the first word of the sentences, they slightly shift position if I put them on the same trial. In earlier related threads started by other users, you recommended not putting them on the same trial, but going via yoked trials in the procedures section instead. However, when I try to do this following the tutorial, I run into trouble because the code to explain how it works is made for priming, with equal numbers of stimuli in the primes_template and the targets_template: "target_prime_lexical_decision_block": { "trial_templates": ["primes_template", "targets_template"], "pattern": {"order": "alternate_random", "repeat": 1} } In my own study, I only have one stimulus in the trial template "fixation_cross", namely, a fixation cross. So the study won't run if I replace "primes_template" with "fixation_cross", since there is only one stimulus in this trial template. Could you recommend a way to specify in the procedures that the single stimulus in the trial template "fixation_cross" needs to be repeated over and over again, until the second trial template is done? Thank you very much in advance. RE: fixation cross location using yoked trials - Ting - 10-20-2021 Hi! Is it possible that somehow the trial template and the block definitions are mixed together? The code you listed is the definition of the block, which will expect two templates to "yoke" together. So, instead of putting "fixation_cross" in there, which I assume is the name of a stimulus, you'll need to create a new "fixation_cross_template" and use that instead. Something like: Code: "target_prime_lexical_decision_block": { The "fixation_cross_template" will then have the "fixation_cross" as the only stimulus in its stimulus list, like: Code: "fixation_cross_template" { Let me know if I got it right. Happy to follow up! RE: fixation cross location using yoked trials - aczyp - 10-20-2021 Hello Ting, thank you for your quick reply! Originally both the stimulus and the corresponding trial template were named "fixation_cross", probably not ideal. I followed your suggestion and changed the name of the template to make sure that there is no overlap, now it is "fixation_cross_template". I am afraid this did not help, the error message is still "The "alternate" pattern requires that all trial templates contain the same number of trials." - The same of course when I specify alternate_random as the pattern. The trial template for the fixation cross looks like this: "fixation_cross_template": { "type": "basic", "stimuli": ["fixation_cross"], "location": [5,5], "auto_advance": true}, In the procedures, it occurs like this: "practice": {"trial_templates":["fixation_cross_template", "practice"], "pattern":{"order":"alternate", "repeat":1}}, The trial template "practice" shows five stimuli in all. Thanks a lot! RE: fixation cross location using yoked trials - Ting - 10-20-2021 ahhhh! gotcha! I see the problem now. The yoking mechanism requires the templates being yoked together to produce the same number of trials. The error you are seeing is complaining exactly about that. So the solution is a bit hacky but simple, you'll only need to repeat "fixation_cross" 5 times in the fixation_cross_template, as in: Code: "stimuli": ["fixation_cross", "fixation_cross", "fixation_cross", "fixation_cross", "fixation_cross"] I know that's a bit silly, but it should work! The idea is to tell the template to generate 5 actual trials, each with just a fixation cross. If you need to pair the template again with another template (not "practice"), you can create another fixation cross template that repeats the stimulus a different number of times. A bit tedious, I am sorry, but it'll work! As an aside, the way you specify "location" isn't exactly correct, but it wouldn't matter because the default location for a single stimulus is just the center spot, 5. So you can remove the line completely. RE: fixation cross location using yoked trials - aczyp - 10-21-2021 Thanks again - not elegant, but working, that is all I needed! The timing of the two stimuli is looking good now. Unluckily, it did not actually solve the problem of where exactly on the screen things appear. The fixation cross appears about two lines in the chosen font size below the place where the first word of the sentence appears. This is odd, because they are not in the same trial template any more. I tried to play around with the location information (specifying "5" for both crosses and sentences, or leaving it out completely), but this did not seem to have any influence. The only reason that I could think of is that the fixation cross is not followed by a response, whereas the sentences are followed by a response after all words have been presented. So perhaps the words in one trial template are shifted upwards to make room for the response that is still in the trial template. Would that make sense? Is there a way to trick the fixation cross into having the same shift without adding a noticeable response? Thanks! RE: fixation cross location using yoked trials - Ting - 10-21-2021 Hmm...can you add me as a collaborator so that we can take a look at your code? This really shouldn't happen. There might be some seemingly irrelevant factors at play here. RE: fixation cross location using yoked trials - aczyp - 10-21-2021 Thanks a lot - just did. Quick update: I tried it without the response (so no speeded rating anymore, just tokenized text that goes on and on), and then the fixation cross and the stimuli appear in the same place. So it seems the issue is that the presence of the response shifts the stimuli presented earlier. Can this be solved in some way? RE: fixation cross location using yoked trials - Ting - 10-21-2021 Aha, I see what you mean - you want the Plus sign to line up with the tokenized text stimuli, in the presence of the choice response. Let me brainstorm with the team and see what everyone thinks. I vaguely recall we've encountered this issue before and came up with a solution then. But that solution now eludes me. Oh well! Please hang on for just a bit RE: fixation cross location using yoked trials - aczyp - 10-22-2021 That is exactly what I want to do. Thanks for discussing this in the team, looking forward to hearing more RE: fixation cross location using yoked trials - Ting - 10-23-2021 Hi Anna! We have a couple of solutions for you. The first one is a bit hacky but should be quick. The second one is a "proper" solution but may require a bit restructuring of the trial templates. Let me describe them first. Solution 1 Right now the fixation cross is at the dead center of the screen (as it should be), but the tokenized text stimulus on the next trial gets pushed up a bit by the ensuing choice response. Does the fixation cross needs to be at the absolute dead center? If not, we can manually push up the cross a bit, assuming the fixation cross is implemented with a "+" character in a text stimulus, so that it lines up with the tokenized text stimulus. This is relatively easy because you can HTML to the "content" of a text stimulus. We can add an empty invisible paragraph below the fixation cross like this: Code: "content": "+<p> </p>" You can repeat the "<p> </p>" thing (which is saying "add a paragraph on a new line with just a space in it") as many times as needed to line them up. This solution is hacky in spirit, but it's actually pretty quick and effective. Solution 2 Now if you need the fixation cross to be at the absolute center, or you'd just want a more robust solution, here's another way. We could put the timed choice responses on a separate trial template (yes, it's okay for a trial template to just have responses with no stimuli) and then yoke three templates together. That is, you'd be yoking: "fixation_cross_template", "singleton_reading_template" (my name for it), and then a "speeded_choice_template" (also my name) template together. Because the three elements (fixation, prime, target) are now on three different trials, all of them will be at the dead center of the screen. Looking at your code, I don't think it would introduce additional arbitrariness to your setup because you are already manually lining up the tokenized text stimuli and choice responses. The difference is that right now, they are lined up within the same trial template via the "stimuli" and "responses" mapping. This new approach would instead do it between trial templates. (sorry couldn't pass an opportunity to be nerdy about within and between designs. haha) ---- What do you think? My personal preference is Solution 2, but it is a bit of an overkill. |