CNL Wiki

Docs: Running the MovieParadigm MATLAB tasks

Updated on June 10, 2026

Running the MATLAB tasks #

More “click to continue” screens have been added to the most recent version of the code, and (I think) all instruction slides are on for approx 5 seconds without the ability to continue, and then some additional text will appear to indicate that you can click to continue off that slide.

Playing the movie (and optional free recall) #

In MATLAB’s Current Folder window navigate to Movie_24/runfromhere_movies

In MATLAB’s Command Window type: showmovie

Movie selection #

  • Select the appropriate option from the pop up window: “Merlin”, “24”, or “Other video” .
  • Selecting “Merlin” or “24” will take you to the run parameters pop up.
  • Selecting “Other video” will produce another pop up where you can select which video file to play, after which the run parameters pop up will appear.

Run parameters pop up #

The run parameters pop up includes:

  • Subject number
    • input the 3 digit subject ID number.
  • 24 episode number
    • This is legacy functionality, to chose which episode of 24 to show. We only show episode 1.
    • For Merlin or other videos changing this will not have any effect on them.
    • Parameter input:
      • Merlin: 0
      • 24: 1
      • Other video: 0
  • Full episode?
    • This is legacy functionality, not currently used to my knowledge.
    • Do not use any other value than 1 for Merlin or other video, effect on those is unknown.
    • Parameter input:
      • Merlin: 1
      • 24: 1
      • Other video: 1
  • With pulses?
    • Default 1 to have TTLs during task. Set to 0 if not connected to DAQ (eg when debugging without TTLs).
  • Resume session?
    • Default 0. Set to 1 if continuing from a session that has just experienced a crash or was aborted.
  • Debug mode?
    • Default 0. Set to 1 when debugging and want shortened sections and transparent window.
  • Do free recall at end?
    • Set this value to 1 for free recall to occur within this task run at the end of movie watch.
    • Parameter input:
      • Merlin: 0
      • 24: 0
      • Other video: 1
  • Record spontaneous before movie?
    • Set this value to 1 to record 5 minutes of spontaneous activity before the movie starts.
    • Currently not typically run.
    • Parameter input:
      • Merlin: 0
      • 24: 0
      • Other video: 0

Video playback controls #

During the video playback:

  • you can pause the video with the space bar, and unpause by clicking on the trackpad (this will not exit out to matlab)
  • you can exit with Esc any time 
    • will exit to matlab
    • can restart task and resume playback by re-running showmovie and inputting 1 for ‘Resume session?’ in params pop-up

Free recall #

Free recall in the memory task code is identical to that in the memory task code. See below for details.

 

Outputs #

The data will be saved in the subject folder within runfromhere_movies.

Memory tasks #

The memory tasks are:

  • free recall
  • recognition
  • cued recall
  • optional concept fixation (not typically run, but when run is only in morning as very last task as can bias memory

 

In MATLAB’s Current Folder window navigate to Movie_24/runfromhere_memory

In MATLAB’s Command Window type: run_movie_test_cnl

Test selection #

A pop up will appear giving the following options:

  • Merlin S04E11 vs S04E09E12
    • select this to run the Merlin memory tests
  • 24 S06E01 vs S06E02
    • select this to run the 24 memory tests.
  • Select movie file for recall
    • this will then create another pop up where you can select the video file to be recalled (for calculation of recall duration, and so we have a log of which video is being recalled in the TTLs).
    • this is only for free recall (the run parameters default values reflect this) and will crash if other memory tasks are attempted.
    • typically this will be used for free recall of the non-24 video in the morning, but can be used for any recall as long as the appropriate video file is selected.

Soon we will be adding another test option (Merlin S04E10 vs S04E09/11) when we move to showing the same 2 videos to each participant (instead of a bespoke video).

 

Run parameters pop up #

The run parameters pop up includes:

  • Subject number
    • input the 3 digit subject ID number.
  • With pulses?
    • Default is 1 to have TTLs during task. Set to 0 if not connected to DAQ (eg when debugging without TTLs).
  • Resume session?
    • Default 0. Set to 1 if continuing from a session that has just experienced a crash or was aborted.
  • Debug mode?
    • Default 0. Set to 1 when debugging and want shortened sections and transparent window.
  • Do free recall at beginning?
    • Set this value to 1 for free recall to occur at the beginning of the memory test.
    • Only set to 0 if you ran free recall with the showmovie code.
    • Parameter input:
      • Merlin: 1
      • 24: 1 
      • Other video: 1
  • Do recognition memory test?
    • Set this value to 1 to run the recognition memory task.
    • Parameter input:
      • Merlin: 1
      • 24: 1 
      • Other video: 0 (the task will crash if you set this to  1)
  • Ask cued recall questions?
    • Set this value to 1 to run the cued recall task.
    • Parameter input:
      • Merlin: 1
      • 24: 1 
      • Other video: 0 (the task will crash if you set this to  1)
  • Do concept fixation?
    • Set this value to 1 to run the concept fixation task.
    • Not often run now, but if it is should only be run in the morning as the last part of 24 memory as it can bias memory.
    • Parameter input:
      • Merlin: 0 (task will crash with 1)
      • 24: 0
      • Other video: 0 (task will crash with 1)

 

Task controls #

During recognition task can exit with esc

  • does not work during clip presentation, only after during response window
  • will exit to matlab
  • can be restarted from exited trial by re-running run_movie_test_cnl and inputting 1 for ‘Resume session?’ in params pop-up

 

Free recall #

There is no way to prematurely end the free recall portion. This is by design to promote the participant to think and hopefully recall more about the videos.

The free recall instructions given to the participant are:

We would like you to recall the episode you saw. Please recall in as much detail as possible and recount as many events or scenes from the episode as you can.

We would like the verbal instructions to emphasize giving specific details about the video. We specifically do not mention any particular order in which they have to recall.

The duration of free recall is related to the length of the video shown (minimum 2 minutes, maximum 5 minutes). Another instruction slide will appear to indicate how long the recall period will be, and that a timer will countdown each minute. It also informs the participant that they can continue after the timer is finished.

Once the recall period is over a screen appears encouraging the participant to continue if they can, and to click the mouse when they are done. This mouse click is now linked to a TTL pulse and will be a useful marker of when the recall period ends so please make sure it is clicked upon completion of recall.

 

Recognition memory task #

Participants are shown 150 short clips (0.8 to 3 seconds long).

  • 75 are from the video they just watched (aka “target” clips).
  • 75 are from another episode in the same season (“foil” clips).

After each clip they are asked:

‘Was this clip from the episode you watched?’

And have to respond ‘yes’ or ‘no’ by moving the cursor to click with the mouse on the answer on screen.

Trials are pseudorandomly ordered so that within every 20 trials there are 10 targets and 10 foils. Within each block of 20 trials the trial order is random. The order of presentation is different for each participant.

The clips are defined by frame on and frame off values which are loaded from a csv when the task is started. The csvs are kept here: Movie_24/runfromhere_memory/recognition_clip_tables

 

Cued recall #

Participants are shown 6 images with open-ended questions and must verbally answer the onscreen question.

The image and question are onscreen for 10 seconds. The participant is given 45 seconds to respond, but encouraged to continue after that if possible.

Once the participant has finished recalling they can click to move on to the next question.

From Aug-11-2025 onwards participants are asked to read the question aloud and wait until the image is off screen before answering the question.

24 cued recall questions:

  • Where does Chloe work and what upsets her about Jack?
  • Who are these characters and how do they relate to terrorism?
  • Who spoke to the President in the episode? What did they talk about?
  • What was his story?
  • Describe the times Jack was restrained. How did he get there or get free?
  • Where are the various locations that the episode takes place? [edit added Aug-11-2025/ pt 585] Can you describe some events from each place?

Merlin cued recall questions:

  • What happens to Arthur in this episode?
  • Describe Arthur and Merlin’s interactions over the episode.
  • What did Agravaine steal? What happens because of this?
  • Where do we see Gwen in this episode? How does she get to these places?
  • Describe the times magic is used in the episode.
  • Describe scenes that take place in the forest.

The order of presentation is the same for all participants.

Concept fixation (24 only) #

NOTE 1: This is NOT run when doing the Merlin-24 task.

NOTE 2: This is only to be run in the morning as the final task epoch as it can bias memory.

Participants are shown an image with a text label on screen for 2 seconds. They are asked to hold this concept in memory until they hear a beep (which occurs 7 seconds after the image/text have left the screen). There is a “practice” first trial of an apple for you to walk through with the participant so they understand the task.

There are 36 fixations in total (excluding the apple practice trial).

  • There are 12 ’24’ concepts
    • Ahmed Amar, Jack Bauer, Bomb, White House, Los Angeles, Bill Buchanan, Hostage, Chloe O’Brian, President Palmer, CTU (government agency), handcuffs, Abu Fayed
  • and 6 non-24 concepts
    • Lady Gaga, New York City, Denzel Washington, Bruce Willis, Mount Rushmore, Apple Inc.

 

All concepts are shown twice. The order is pseudorandom so that within each block of 18 trials each concept is shown once. The order of presentation is the same for all participants.

 

Outputs #

The data will be saved in the subject folder within runfromhere_memory.

 

Crash handling #

If the task crashes and is unresponsive to exit with esc try the below:

  1. ctl-c (x 2) then type ‘sca’ and hit enter
    • this should stop the task and close all psychtoolbox windows
    • matlab should remain open
  2. cmd-q (for mac) or alt-F4 (windows)
    • this should close matlab
  3. ctl-up (mac) or win-tab (windows) to try to change desktop
    • this should allow you to close the matlab window as it will exit the psychtoolbox fullscreen
    • there might be track pad gestures to achieve this also (eg three finger swipe up on mac)

If none of the above work then you will likely need to restart the laptop.

If you have to use any of the methods above then ‘Resume session’ will not work.