#PsyScope 1.0 # Script template, Version 1.02 # 7/19/95 -- CPT.NBack.OR.Degraded # Runs randomly ordered cycles of either a 4 (memory load) or 4 (stimulus quality) design: # For the memory load condition, levels include a 0-Back (simple letter detection) task, and # 1-Back, 2-Back, and 3-back (letter repeat detection) tasks. # For the stimulus quality condition, there are 4 levels of stimulus degradation: # Degrade-0 present letters in perfect condition, while Degrade-1, Degrade-2, and Degrade-3 # offer progressively less clear images of stimulus letters. Degradation is accomplished # by randomly removing a proportion of pixels from a given letter image. # # The stimulus quality manipulation provides a way for parametrically manipulating task # difficulty in a manner that does not affect memory. This can be used as a control for # general effects of task difficulty on the process, factor or brain region of interest. # # To run, hit the Run button. # The program will then put up a timer bar while it precompiles the next set of trials. # After compiling the word "PAUSE" will appear. To start the block, click the mouse. # Then the first block's instructions will be shown for a period. Then the trials begin. # When the block is over, "PAUSE" will appear again, etc. # A cycle of blocks (4 is default ) will be run with each condition run once in random order. # These cycles will continue for the number of repetitions specified (5 cycles is default) # Then you be returned to the Console window again. # When the whole experiment is over, you can hit the Quit button in the Console window. # When you quit, the program will ask you if you want to save changes to the script -- # *Don't* Save changes. # # For target letters, respond with the "1" key, or the left button-box button. # For non-target letters, respond with the "2" key, or the right button-box button. # # Feedback is given after each letter: a "beep" following correct responses, a "buzz" following # incorrect responses, and a "bloop" following missed (or slow) responses # # A few explanations: there are 2 important 'non-standard' menus, "General" & "CPT Options". # # ****** General Menu ****** # The General menu lets you set general purpose input/output parameters, including what # devices will be used for input & timing. A lot of these menus can be ignored. # (1) User Level; (2),Settings; (3) Stimulus Features -- don't do anything with these. # (4) Reverse Video -- the experiment is currently set up to use a black screen, with white # letters ("reverse" of the usual Mac black letters on white background). We always use # this setting, but if you need to change to Black-on-White, it's easy with this menu item: # just click on "Off". # (5) Input Devices -- Right now, it's set to use just the Mac's mouse and keyboard, # but if you have a CMU Button Box, you will want to click on the Button Box option. # If you do set this option, though, be aware that PsyScope will not let you run the script # unless a button box is actually attached to the Mac. Because you might occasionally want # to try the script without a button box, we include a Don't Use BBox menu item (see below). # (6) Timing Device -- again, it's set to the Mac for now, but you'll want to set it to BBox # if you have one (it gives much better precision for reaction times). The same warnings # about attaching a button box, discussed in (5) above, also apply here. # (7) Data Output; (8) Optimization -- don't do anything with these. # (9) Don't Use BBox -- instantly un-sets the Button Box options in both the Input Devices and # Timing Device menus. (You will have to reset both device options again when you attach a bbox.) # (10) Test BBox -- lets you run hardware tests on your button box buttons & lights. # (11) Screen Flip -- lets you diplay everything on the screen upside-down and/or backwards. # The way our scanner is set up, with a projector and mirrors, we need to display all stimuli # upside-down, so that the subject sees things right-side-up. If you're set-up is similar, # you will want to check the Vertical box. Note that EVERYTHING is affected by this option, # including instructions. For backwards stimuli you can check the Horizontal box; you can # also check both if the need arises. # # ******* CPT Options Menu ******* # (1) NbackConditions - This lets you select which of the 4 N-back conditions will be run # (0, 1, 2, or 3 - back) in the experiment. # # (2) DegConditions - This lets you select which of the 4 degraded conditions will be run # (Degraded Levels 0,1,2 or 3) in the experiment. # # (3) Degrading -- This lets you set how bad the degraded letters look. You can type in numbers # between 0.0 (no degrading) to 0.99 (complete degrading). The number corresponds directly # to the probability that any given pixel in a letter will disappear, thereby eating away # its appearance. # # (4) FontType -- This is fairly self-explanatory. We used 36-point and Bold to make letters # big and thick, to better allow for control over degrading. In experiments where there was # no degradation manipulation, we typically used 24-point. # # (5) Durations -- There are only 2 timings to worry about, all values are milliseconds. # (a) Stimulus - how long the letter appears; and # (b) ITI - how long between when the letter disappears and the next letter appears # The current settings use fairly long ITIs, to increase the time-related load on working memory. # (c) Total Trial Duration - for your reference, just the sum of the first two durations # (d) Instructions - time after pause when the next block's instructions are displayed # (the default is 3 seconds, but this can be changed) # # (6) Frequencies -- There are a bunch of options here: # (a) Target freq. & (b) Control freq. - the relative frequencies of a CPT target versus # non-target. We traditionally use twice as many non-targets as targets. # (c) New Item freq & (c) Repeat Item freq - for non-target trials, the relative # frequencies in which a new item is presented versus when a (1,2,3 or 4 -back) repeat # item is presented. The higher the frequency of these repeat distractors, the more # difficult the task. For each condition, there are three other distractors: # 1,2,3 -back distractors for the 0-back condition; 2,3,4 -back distractors for the # 1-back condition; 1,3,4 -back conditions for the 2-back condition; and 1,2,4-back # distractors for the 3-back condition. We typically have 30% of non-targets be # a distractor repeat (10% for each of the distractor types; 6.6% of total trials). # # (7) Blocks -- There are two options here: # (a) Test trials per block - how many trials within one block of one condition. There are # always 4 "lead trials" in every block, to "set up the stack": if a subject were in the # 3-Back condition, you need to have at least 3 trials of non-targets before you can have # a target. For technical reasons, we always have 4 non-targets in all conditions, just to # prepare for conditions like this. These lead trials don't count as part of the number # that you type in here, though. For example, a setting of 21 means that there are actually # 25 trials in the block, including the lead trials. (Actually, there are 26 trials, when # you count the instructions given at the beginning. PsyScope counts this internally, # when it precompiles, but we can ignore that.) The Block Duration that is shown is # calculated by multiplying the Total trial duration, calculated from the settings in the # Durations menu item, times the Total Trials Per Block, calculated here, plus the # Instructions durations, also from Durations menu item. You should make # sure that the number of Test trials per block is an even multiple of the sum of (a) Target # and (b) Control frequencies. So if you keep Target freq. = 1 and Control freq. = 2, then # you need to make the Test trials per block be a multiple of 3, such as 12, 15, 18, etc. # (b) Cycle Repetitions - how many times each cycle will be run. A cycle consists of 1 # block of all nback/degraded conditions tested presented in random order. This # allows you to control the length of the experiment (or provide rest breaks, if you # want to stop at some point and then restart). Blocks Per Cycle calculates how many # of the 4 conditions you are running in the experiment (how many boxes selected from # either NbackConditions or DegConditions). Total Blocks is calculated by multiplying # Blocks Per Cycle * Cycle Repetitions (e.g., 4 conditions * 5 reps = 20 total blocks). # # (8) Session: There are 3 types of sessions in which you would use this script, 1) Pre-Practice, # outside of the scanner, to make sure that the subject performs adequately in all conditions, # or 2) Run-NBack or 3) Run-Degraded, the two sessions in the scanner. # If you select Pre-Practice, another set of options will appear, to let you run any of the # conditions by itself. We do things this way, because we require subjects to keep practicing # on any given condition until they've reached a performance criterion (like 75% # correct on targets), and sometimes a subject only has difficulties with one particular # condition. This way, you also run conditions in any order you want. For the Run sessions, # however, things are more constrained, because of the scanner, and because we don't want # differences between different subjects. If the task is run in a pure behavioral study, # use which ever mode is most convenient. # # ****** SUBJECT INSTRUCTIONS ****** # # We don't have any written standardized instructions that we give subjects. We typically # practice subjects in each condition separately. Before starting the practice, we say, # "This task involves viewing single letters presented sequentially on the screen. For each # letter you see, your job is to determine whether the letter is a target or nontarget. # If the letter is a target you should press the left button (or 1-key), if the letter is # a non-target you should press the right button (or 2-key). There a number of different # conditions which have different rules for how targets are determined." We first practice # on the 0-back condition, saying "For this first condition , the target is a particular # letter which will be specified right before the block starts. So when you see this target # letter, press the left button (1-key), otherwise press the right button (2-key)." [NOTE: # The instructions will put up the target letter with random case (e.g., for the letter C as # target, sometimes it will be "c" and sometimes "C"). Make sure that subjects know either # case of that letter is a valid target] . After practicing this condition until they are # successful, we practice the 1-back conditions, saying "For the next condition, a letter is a # target if it is the same as the letter presented in the previous trial". We give a verbal # example, such as saying if the last letter you saw was a B then if the current letter is a # B, press the target button. Again, since letters are presented in random case, make sure # that they understand that the case of the letter is not important in determining targets, # only it's identity. After successful practice of this condition, we practice the 2-back # condition, saying, "In the next condition, a letter is a target if it is the same as the # letter presented in the trial two back. And then we give an example ("so if you saw a # B two trials back, and then a C in the last trial, then if the current trial is a B press # the target button"). The same type of explanation is provided for the 3-back condition. # We also usually make a point of telling the subjects that the conditions are purposefully # getting harder and are intended to be very difficult to do. This helps subjects not to # get too frustrated with the task's difficulty. # # For the degraded conditions, the instructions are the same as for the 0-back condition. # We tell subjects, "In this condition, letters will be harder to recognize, because some # of the pixels are removed from each character. Sometimes you may not know what the letter # is, however it is important to respond for every letter, making your best guess if you # are not sure." # # After practicing all conditions to completion, we tell subjects that they will be performing # multiple repetitions of each of the task conditions, and that each will occur in blocks of # about 1 minute in duration. There will be a pause between each block. (NOTE: if subjects # are doing the task behaviorally, we tell them that they control the start of each block, by # pressing the mouse button, so that they can rest if necessary). Standard instructions # regarding speed & accuracy are given (e.g., "Please respond as quickly as possible while # not sacrificing accuracy"). # # # ****** MISCELLANEOUS NOTES ****** # You need to make a folder called "Data" and put it in the same folder that you put this # script into. All subjects data will be stored there in a plain text file, with a filename # constructed as the subject number + subject's initials + ".CPT_NB". The data files # are self-explanatory, with one caveat: there will be trials missing, those corresponding # to the instruction trial at the beginning of each block. # # You'll want to give PsyScope as much memory as you comfortably can. (more than 3 Megs) # # The Practice button in the PsyScope Console window (the main window that comes up at # the beginning) shouldn't be used at all. For practice, just hit the run button, and # select Pre-Practice instead of Run as your Session. # # The Subject Number that you give a subject is important: aside from identifying subjects # in a non-name dependent fashion, the number is used to determine what letter that subject # is given as a target in the Control conditions. Subject 1 gets B, 2 gets C, 3 gets D, etc. # This way, targets are varied between-subjects, but you still can have control. If you # use the same subject number for a given subject in Pre-Practice and Run Sessions (and # you should), then the subject will have the same letter target in both sessions. If you # run more than 18 subjects, the target letter will "wrap around" (return to B). # # Keep in mind that PsyScope is a complete programming language, so that if you can't # find a way to change something using the few menus that are provided, there's still almost # certainly a way to reprogram the script to get it to do what you want. # # # ****** DISCLAIMER ****** # We are happy to distribute this script to all interested parties to use in whatever fashion # they desire. This is a script that we have used successfully in previous experiments. # However, there are a couple of disclaimers we must make about its use: # # 1) We do not guarantee that this script is bug-free. If you discover a bug, we would be # very grateful to be informed of it, but we cannot promise that we will fix it for you. # # 2) We are unable to provide assistance in either general PsyScope programming or # in modifying this script. Please feel free to make any modifications you wish, # however, this is at your own risk and time. For general PsyScope questions, there are # are reference manuals available, plus a PsyScope users bboard, and for consortium # members, a programmer available for consultation. Experiments:: "1-3Back Letter Practice" Current: 1 #----------------------------------------------------------------------------------------- #> ExperimentDefinitions 1-3Back Letter Practice:: Format: Factor InputDevices: Key Mouse Timer: Macintosh Flags: NO_SAVE_SCREEN STORE_AT_END DataFields: STIMULUS RESPONSE_LABEL DataHeader: SubjectNumber RunNumber DataFile: @AutoDataFile ScaleBlocks: 1 Blocks: @@Session AccessType:> Sequential Cycles: @CycleReps BackColor: Black DefaultColor: White Port: Center 100% Center 100% 0 StimType: Text Style: @FontType Flip: @"Screen Flip" # Precompile: All Optimize: Standard #---------------------------------------------------------------------------------------- #> BlockDefinitions ScannerPause:: Templates: PauseForScanner Cycles: 1 DegRunBlocks:: @DegConditions NBackRunBlocks:: @NbackConditions 0BD0:: @: CommonAttribs @: 0BackAttribs Degradation: 0.0 0.0 ConditionName: "0B D0 [< >]" 0BD1:: @: CommonAttribs @: 0BackAttribs Degradation: @DegLevel1 0.0 ConditionName: "0B D1 [< >]" 0BD2:: @: CommonAttribs @: 0BackAttribs Degradation: @DegLevel2 0.0 ConditionName: "0B D2 [< >]" 0BD3:: @: CommonAttribs @: 0BackAttribs Degradation: @DegLevel3 0.0 ConditionName: "0B D3 [< >]" 1BD0:: @: CommonAttribs @: 1BackAttribs Degradation: 0.0 0.0 ConditionName: "1B D0 [< >]" 2BD0:: @: CommonAttribs @: 2BackAttribs Degradation: 0.0 0.0 ConditionName: "2B D0 [< >]" 3BD0:: @: CommonAttribs @: 3BackAttribs Degradation: 0.0 0.0 ConditionName: "3B D0 [< >]" CommonAttribs:: Blocks: InstructionsBlock Trials Factors: LetterConditions AccessTypes:> Factor Sets:> 1 Types:> List CorrectResponse: FactorAttrib(LetterConditions, CorrectResponse) IncorrectResponse: FactorAttrib(LetterConditions, IncorrectResponse) InstructionStims: InstructionText 0BackAttribs:: Instructions: Strcat("Target = ", @@FixedLetter) TargetStim: Addfixedtarget(@FixedLetter) ControlStim: FindStim(@FixedLetter, 0BackAttribs>>GetStim) GetStim: NewLetter 1BackLetter 2BackLetter 3BackLetter Weights:> RepeatFreqs.1 (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) AccessType:> Random 1BackAttribs:: Instructions: "Target = Immediate (1-BACK) letter repeats" TargetStim: Addtarget(@1Backletter) ControlStim: FindStim(@1BackLetter, 1BackAttribs>>GetStim) GetStim: NewLetter 2BackLetter 3BackLetter 4BackLetter Weights:> RepeatFreqs.1 (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) AccessType:> Random 2BackAttribs:: Instructions: "Target = 2-BACK letter repeats" TargetStim: Addtarget(@2Backletter) ControlStim: FindStim(@2BackLetter, 2BackAttribs>>GetStim) GetStim: NewLetter 1BackLetter 3BackLetter 4BackLetter Weights:> RepeatFreqs.1 (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) AccessType:> Random 3BackAttribs:: Instructions: "Target = 3-BACK letter repeats" TargetStim: Addtarget(@3Backletter) ControlStim: FindStim(@3BackLetter, 3BackAttribs>>GetStim) GetStim: NewLetter 1BackLetter 2BackLetter 4BackLetter Weights:> RepeatFreqs.1 (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) (RepeatFreqs.2 / 3) AccessType:> Random InstructionsBlock:: Templates: "Instructions Trial" Cycles: 1 Trials:: Templates: LeadTrial TestTrial Weights:> @NumLeadTrials @TrialsPerblock Cycles: @ActualTrialsPerBlock # ---------------------------------------------------------------------------------------------- #> FactorDefinitions LetterConditions:: Levels: "TargetLet" "ControlLet" Weights:> TrialFreqs.1 TrialFreqs.2 AccessType:> Random TargetLet:: Stimulus: @BlockAttrib(TargetStim) CorrectResponse: @TargetResponse IncorrectResponse: @ControlResponse ControlLet:: Stimulus: @BlockAttrib(ControlStim) CorrectResponse: @ControlResponse IncorrectResponse: @TargetResponse # RESPONSE STUFF ----------------------- TargetResponse:: Conditions[ Key[1] Bbox[Button1 Line4] ] ControlResponse:: Conditions[ Key[2] Bbox[Button3 Line7] ] CorrectActions:: Actions[ RT["CORRECT" ActiveUntil: ITI] Beep["Correct Beep" ActiveUntil: ITI] CancelAction[RT ITI ActiveUntil: ITI] CancelAction[Beep ITI ActiveUntil: ITI] CancelAction[RT Stimulus ActiveUntil: ITI] CancelAction[Beep Stimulus ActiveUntil: ITI]] IncorrectActions:: Actions[ RT["WRONG" ActiveUntil: ITI] Beep["Incorrect Beep" ActiveUntil: ITI] CancelAction[RT ITI ActiveUntil: ITI] CancelAction[Beep ITI ActiveUntil: ITI] CancelAction[RT Stimulus ActiveUntil: ITI] CancelAction[Beep Stimulus ActiveUntil: ITI]] # ---------------------------------------------------------------------------------------------- #> TemplateDefinitions Instructions Trial:: Events: Pause Instructions InstructionsITI LeadTrial:: ConditionName: "Lead Trial []" Events: LeadStimulus ITI TestTrial:: Events: Stimulus ITI PauseForScanner:: Events: ScanWaitEvent # ---------------------------------------------------------------------------------------------- #> EventDefinitions ScanWaitEvent:: EventType: Text Stimulus: "Hit the [S] key to begin" Size: 24 Duration: Key[ s "SHIFT-s" ] Pause:: Stimulus: "PAUSE" Duration: Mouse[Click] Size: 24 EventActions: Conditions[End[]] => Actions[Beep[ "Correct Beep" ]] StartRef: "0 after end of START" Degradation: 0.0 0.0 Instructions:: Stimuli: BlockAttrib(InstructionStims) StartRef: strcat(@Pause_Instruction_Delay, " after end of Pause") Duration: @InstructDuration - @Pause_Instruction_Delay Degradation: 0.0 0.0 InstructionsITI:: EventType: Null Duration: @Pause_Instruction_Delay InstructionText:: Stimulus: BlockAttrib(Instructions) Size: 24 Degradation: 0.0 0.0 Stimulus:: Stimulus: FactorAttrib(LetterConditions, Stimulus) EventName: Stimulus Duration: Durations.1 Degradation: BlockAttrib(Degradation) EventActions: BlockAttrib(CorrectResponse) => @CorrectActions BlockAttrib(IncorrectResponse) => @IncorrectActions LeadStimulus:: Stimulus: @BlockAttrib(ControlStim) EventName: Stimulus Duration: Durations.1 Degradation: BlockAttrib(Degradation) EventActions: @ControlResponse => @CorrectActions @TargetResponse => @IncorrectActions ITI:: EventType: Null Duration: Durations.2 EventActions: Conditions[End[]] => Actions[ RT["NO_RESP" Stimulus] Beep[Bloop]] # ---------------------------------------------------------------------------------------------- #> StimulusDefinitions FixedLetter:: Let1 Letters:: Let2 Let3 Let4 Let5 Let6 Let7 Let8 Let9 Let10 Let11 Let12 Let13 Let14 Let15 Let16 Let17 Let18 AccessType: Random AllLetters:: Let1 Let2 Let3 Let4 Let5 Let6 Let7 Let8 Let9 Let10 Let11 Let12 Let13 Let14 Let15 Let16 Let17 Let18 Let1:: Access([b B AccessType: Random]) Let2:: Access([c C AccessType: Random]) Let3:: Access([d D AccessType: Random]) Let4:: Access([f F AccessType: Random]) Let5:: Access([g G AccessType: Random]) Let6:: Access([h H AccessType: Random]) Let7:: Access([j J AccessType: Random]) Let8:: Access([k K AccessType: Random]) Let9:: Access([m M AccessType: Random]) Let10:: Access([n N AccessType: Random]) Let11:: Access([p P AccessType: Random]) Let12:: Access([q Q AccessType: Random]) Let13:: Access([r R AccessType: Random]) Let14:: Access([s S AccessType: Random]) Let15:: Access([t T AccessType: Random]) Let16:: Access([v V AccessType: Random]) Let17:: Access([x X AccessType: Random]) Let18:: Access([z Z AccessType: Random]) # ---------------------------------------------------------------------------------------------- #> SubjectInfo SubjectNumAndGroup:: TRUE Dialog: SubjectNumAndGroup SubjectCount: 0 RunCount: 1 GroupRunCount: 1 SubjectNumber: 1 RestrictAlert: Script Notify: False RunNumber: 1 GroupSpecs: SubjectNumber:: 1 Dialog: Standard Type: Int RunNumber:: 1 Dialog: Standard Type: Int AutoDatafile:: "Practice.LetterNB @ :Data:" Strings: Practice ".LetterNB" Dialog: MakeFileName Folder: ":Data:" UseDir: TRUE # ---------------------------------------------------------------------------------------------- #> InterfaceDefinition Console:: SubjectNumber AutoDatafile # ---------------------------------------------------------------------------------------------- #> MenuDefinitions Menus:: General "CPT Options" General:: @AllStdLibMenuItems "-" "Screen Flip" CPT Options:: NbackConditions DegConditions Degrading FontType Durations Frequencies Blocks Session # ---------------------------------------------------------------------------------------------- #> DialogDefinitions Screen Flip:: Dialog: CheckBoxes CheckBoxes: Vertical Horizontal Degrading:: @DegLevel1 @DegLevel2 @DegLevel3 Prompts: "Degrade 1" "Degrade 2" "Degrade 3" Default: 0.6 0.8 0.9 Width: 60 PromptWidth: 100 DegLevel1:: "0.6" DegLevel2:: "0.8" DegLevel3:: "0.9" FontType:: Helvetica 60 "Bold " Copy Default Dialog: Style NbackConditions:: 1BD0 3BD0 Dialog: CheckBoxes CheckBoxes: 0BD0 1BD0 2BD0 3BD0 Prompts: "0 Back" "1 Back" "2 Back" "3 Back" DegConditions:: Dialog: CheckBoxes CheckBoxes: 0BD0 0BD1 0BD2 0BD3 Prompts: "Degrade 0" "Degrade 1" "Degrade 2" "Degrade 3" Durations:: 500 2000 (THIS.1 + THIS.2) @InstructDuration Prompts: Stimulus ITI "Total trial duration" Instructions Defaults: 500 2500 3000 3000 PromptWidth: 280 InstructDuration:: 3000 Pause_Instruction_Delay:: 300 Frequencies:: TrialFreqs RepeatFreqs Dialog: Custom TrialFreqs:: 1 1 Prompts: "Target freq:" "Control freq:" Defaults: 1 2 Width: 30 PromptWidth: 95 RepeatFreqs:: 4 4 Prompts: "New Item freq:" "Repeat Item freq:" Defaults: 1 2 Width: 30 Margin: 30 PromptWidth: 150 NewLine: FALSE Blocks:: TrialsPerBlock CycleReps ActualTrialsPerBlock BlocksPerCycle BlockDuration TotalNumBlocks Dialog: Custom NumLeadTrials:: 3 TrialsPerBlock:: 10 Prompt: "Test trials per block:" Default: 18 PromptWidth: 150 Width: 20 BPCycle:: ListSize(@Session) BlocksPerCycle:: @BPCycle Prompt: "Blocks per Cycle:" PromptWidth: 130 Margin: 15 Width: 20 NewLine: FALSE ActualTrialsPerBlock:: @TrialsPerBlock + @NumLeadTrials Prompt: "Total trials per block =" PromptWidth: 150 Width: 20 CycleReps:: 1 Prompt: "Cycle Repetitions:" PromptWidth: 130 Margin: 15 Width: 20 NewLine: FALSE BlockDuration:: (Durations.3 * @ActualTrialsPerBlock + @InstructDuration)/1000 Prompt: "Block duration (secs):" PromptWidth: 150 Width: 20 TotalNumBlocks:: @BlocksPerCycle * @CycleReps Prompt: "Total Blocks =" PromptWidth: 130 Width: 20 Margin: 15 NewLine: FALSE Session:: NBackRunBlocks Dialog: Buttons Buttons: PrepracticeBlocks NBackRunBlocks DegRunBlocks Prompts: "Pre-practice" "Run-NBack" "Run-Degraded" PrePracticeBlocks:: 3BD0 Dialog: Buttons Buttons: 0BD0 1BD0 2BD0 3BD0 0BD1 0BD2 0BD3 # ---------------------------------------------------------------------------------------------- #> Functions FillEntry:: `target `listofentries Result: NULL(DeleteTok(Targletter,1)) NULL(DeleteTok(Nextletter,1)) NULL(AppendTok(Nextletter,@Access(listofentries))) NULL(AppendTok(Targletter,target)) FindStim:: `target `listofentries Result: NULL(FillEntry(target, listofentries)) If( @Targletter == @Nextletter, FindStim(target, listofentries) Addcontrol(@Nextletter) ) Addtarget:: `letter Result: NULL(AppendTok(LetterStack,letter)) NULL(DeleteTok(LetterStack,1)) LetterStack.4 Addfixedtarget:: `letter Result: NULL(AppendTok(LetterStack,letter)) NULL(DeleteTok(LetterStack,1)) @FixedLetter Addcontrol:: `letter Result: NULL(AppendTok(LetterStack,letter)) NULL(DeleteTok(LetterStack,1)) LetterStack.4 NotInLetterStack:: `candidate Result: If( IsItemInList(LetterStack candidate), NotInLetterStack(Access("Letters")) candidate) # nBack STACK ----------------------------------- # OLDEST\ /NEWEST # 4 3 2 1 -Back LetterStack:: Let13 Let18 Let15 Let3 Targletter:: Let17 Nextletter:: Let18 NewLetter:: NotInLetterStack(Access("Letters")) 1BackLetter:: LetterStack.4 2BackLetter:: LetterStack.3 3BackLetter:: LetterStack.2 4BackLetter:: LetterStack.1 # ---------------------------------------------------------------------------------------------- #> LogFile LogRunStart:: SubjectNumber RunNumber Dialog: LogInfo # ---------------------------------------------------------------------------------------------- #> OtherConfiguration ExperimentStartUp:: SubjectNumAndGroup SubjectNumber NULL(ResetAll()) NULL(CopyContent(Letters, AllLetters)) NULL(DeleteTok(Letters, @SubjectNumber)) NULL(@FixedLetter = AllLetters.@SubjectNumber) NULL(LetterStack.1 = Access(Letters)) NULL(LetterStack.2 = Access(Letters)) NULL(LetterStack.3 = Access(Letters)) NULL(LetterStack.4 = Access(Letters)) RunStart:: if(@Session == PrePracticeBlocks, PrePracticeBlocks) # RunNumber AutoDataFile LogRunStart Notes:: "1-3Back Letter Practice": # ---------------------------------------------------------------------------------------------- #> BuilderData # I deleted this section for now. If you ever open the Design window, this deleted # information will be re-created. If it re-appears, don't mess with it -- # it's not worth looking at this stuff, and it sure isn't worth trying to edit it. # It's only used for the GUI programming environment. BuilderData:: "1-3Back Letter Practice": LayoutWindow:> 90 160 500 286 Zoomed:>> False ObjectType:> Experiment LayoutPos:> 429 0 0BD0: Links:> ObjectType:> Block LayoutPos:> 195 40 BlocksInScript: 0BD0 InstructionsBlock Trials 1BD0 2BD0 3BD0 0BD1 0BD2 0BD3 InstructionsBlock: Links:> 0BD0 1BD0 2BD0 3BD0 0BD1 0BD2 0BD3 ObjectType:> Block LayoutPos:> 279 91 "Instructions Trial": Links:> InstructionsBlock ObjectType:> Template LayoutPos:> 279 131 TemplatesInScript: "Instructions Trial" LeadTrial TestTrial Pause: Links:> "Instructions Trial" ObjectType:> Event LayoutPos:> 208 171 EventsInScript: Pause Instructions InstructionsITI LeadStimulus ITI Stimulus Instructions: Links:> "Instructions Trial" ObjectType:> Event LayoutPos:> 265 171 InstructionsITI: Links:> "Instructions Trial" ObjectType:> Event LayoutPos:> 350 171 Trials: Links:> 0BD0 1BD0 2BD0 3BD0 0BD1 0BD2 0BD3 ObjectType:> Block LayoutPos:> 528 91 LeadTrial: Links:> Trials ObjectType:> Template LayoutPos:> 492 131 LeadStimulus: Links:> LeadTrial ObjectType:> Event LayoutPos:> 447 171 ITI: Links:> LeadTrial TestTrial ObjectType:> Event LayoutPos:> 537 171 TestTrial: Links:> Trials ObjectType:> Template LayoutPos:> 565 131 Stimulus: Links:> TestTrial ObjectType:> Event FactorLinks:> LetterConditions LayoutPos:> 587 171 LetterConditions: LinkedItems:> "Stimulus>>Stimulus" Links:> 0BD0 1BD0 2BD0 3BD0 0BD1 0BD2 0BD3 ObjectType:> Factor FactorAttribs:> Stimulus Text Stimulus ; CorrectResponse Text Stimulus ; IncorrectResponse Text Stimulus LayoutPos:> 698 41 FactorsInScript: LetterConditions TargetLet: Links:> LetterConditions ObjectType:> Level LayoutPos:> 660 91 LevelsInScript: TargetLet ControlLet ControlLet: Links:> LetterConditions ObjectType:> Level LayoutPos:> 735 91 1BD0: Links:> "1-3Back Letter Practice" ObjectType:> Block LayoutPos:> 323 41 2BD0: Links:> ObjectType:> Block LayoutPos:> 483 41 3BD0: Links:> "1-3Back Letter Practice" ObjectType:> Block LayoutPos:> 643 41 Desk: Trash: 0BD1: Links:> ObjectType:> Block LayoutPos:> 359 41 0BD2: Links:> ObjectType:> Block LayoutPos:> 414 41 0BD3: Links:> ObjectType:> Block LayoutPos:> 469 41 ExperimentsInScript: "1-3Back Letter Practice"