MRI Setup: Difference between revisions

From CCN Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:


== Travel to CTRC ==
== Travel to CTRC ==
Be sure to leave enough time to get yourself to the CTRC lobby, including time required to find a parking spot and walk to the building. Aim to be at the CTRC at least 45 minutes before the scheduled start of scan.
Be sure to leave enough time to get yourself to the CTRC lobby, including time required to find a parking spot and walk to the building. Aim to be at the CTRC at least 45 minutes before the scheduled start of scan. A summary of local parking options can be found at [http://www.bnmc.org/parking-bnmc/ http://www.bnmc.org/parking-bnmc].


== Upon Arrival ==
== Upon Arrival ==

Revision as of 09:42, 26 July 2016

Checklist

Before leaving for the MRI Center, ensure you have the following:

  • Experimenter Laptop (check that you know its whereabouts prior to the scan date!)
  • Physical experimental stimuli (if any)
  • Contact information for all participants for that day
  • 100% certainty about what experiment you are running that day (it is possible that multiple fMRI experiments will be going on in the lab at any given time)

Travel to CTRC

Be sure to leave enough time to get yourself to the CTRC lobby, including time required to find a parking spot and walk to the building. Aim to be at the CTRC at least 45 minutes before the scheduled start of scan. A summary of local parking options can be found at http://www.bnmc.org/parking-bnmc.

Upon Arrival

Empty your pockets of anything metallic

Experimenter Laptop Setup

The laptop connects via USB to the Lumina console. The console masquerades as an external USB keypad and sends participant keypresses and scanner trigger events to the laptop.

Connect the Lumina console to the laptop

  1. Boot up the laptop first
  2. Log in as the experimenter on the laptop
  3. Locate the white USB cable in the back of the Lumina console
  4. Plug the other end into a USB port in the laptop

Check that the keypad is sending signals to the laptop

Before you enter the Magnet area, ensure that you are metal free!

  1. Set the Lumina controller to send the expected signals
    • The Controller Mode should be set "As Keyboard"
    • Toggle the Using to E-Prime
  2. Find the two 2-button response boxes are in the scanner room
    • They are likely to be found attached to the wheeled display mount stand
    • If they are not attached, ask the technician for help setting them up
    • Examine the button boxes closely. You will see they are labeled L (blue/yellow) and R (red/green)
  3. Open a terminal window
  4. Navigate to the directory containing the Keyboard test script
  5. Launch MATLAB
ptb3-matlab
  1. Run the keyboard test script
>>keyboard_info
    • The script will give you a number of potential keyboards to test out. Select Cedrus Corporation Lumina Keyboard (see troubleshooting section below if there are more than one matching keyboards)
    • One of the experimenters should press each of the keypad buttons while the other monitors that the button presses are registering in MATLAB
    • If the Lumina box is configured correctly to send E-Prime signals, the key-presses should be showing up as the numbers 1 to 4 (the scanner trigger will register as a ^6)
  1. Troubleshoot if necessary, because running the experiment will absolutely depend on the external USB keyboard being configured (see the next section)

Keyboard Troubleshooting

Our fMRI experiments usually listen for events from the external keypad. However the laptop has a built-in keyboard as well, but the software only wants to listen to one of them at a time.

If the external USB keyboard has not yet been connected, the scripts will default to listening to the laptop keyboard. We can simulate the scanner room events by pressing the laptop keyboard buttons:

  • A laptop keypress of '6' simulates a scanner trigger (the experiments often wait for this trigger signal to synchronize the experiment with the scanner)
  • Keypresses of 1, 2, 3 or 4 simulate the participant button box responses (see below), which you might need to do if the experiment script waits on participant responses

Keyboard Voodoo

I'm not 100% sure about what, if any, rules govern how PsychToolbox + MATLAB + Linux juggle their keyboards. The problem is that the scanner triggers and the participant button boxes appear as an external keypad, but the laptop has it's own internal keyboard that's critical for being able to type useful commands. PsychToolbox only wants to listen to one at a time, and there was some mystery about how you would force it to listen to the right keyboard at any particular point in time.

I've tried a couple experiments, changing the sequence of when the external keyboard should be plugged into the experimenter laptop. I haven't seen any documentation about this, which is why I call this section Voodoo, however the following procedure seems to work:

  1. Boot up the laptop up with the external keyboard disconnected
  2. Log in as the experimenter
  3. Plug in the external keyboard
  4. Launch ptb3-matlab

Now the keyboard should have been assigned a device number, and MATLAB should be able to detect it.

Other Potential Problems

One thing I ran into (which may not be an issue with the input device used at the scanner), but my external keyboard had 2 entries when I ran the keyboard_info script. Moreover, when I tested both of those keyboard device IDs using the keyboard_info script, only ONE of them sent keystrokes. By chance, on one occasion, it was the device with the higher ID. However if there are multiple keyboards with the same name the experiment script might accidentally tune into the device that doesn't send any key strokes (this happened on one of my tests). When I unplugged/plugged in the keyboard and restarted MATLAB, new device IDs were assigned, and this time it worked okay. The moral of the story is to make sure that you have only one matching external keyboard, but if you don't (for some reason), to check that the entry with the smaller device ID gives you input when you run the keyboard_info script. If not, quit Matlab, unplug, plug in, and restart until the problem is resolved.

Display Setup

  1. An HDMI cable (Amazon.com branded) should be poking up through the desk. Connect it to the HDMI port on the laptop (there is only one port that this cable can possibly fit into)
  2. Participants will typically be looking at stimuli presented on a display positioned at the head of the scanner
  3. Ensure that the stimuli are projected in the correct orientation
      • Because they are looking through a mirror, the image will have to be flipped horizontally
      • Depending on the mirror attached to the head coil, the image may also need to be flipped vertically
      • The SensaView display control box has a series of 4 toggle buttons that control the display
      • The most likely orientation is marked with a piece of tape on the SensaVue control box. Double-check with the scanner technician to confirm
        • The 16-channel head coil requires the image to be LR flipped; the 32-channel coil requires the image to be LR and TB flipped

Audio Setup

We have not yet run an experiment with auditory stimuli, so this is not yet sorted. However a sketch of the procedure will entail playing a test script that presents some auditory items, and having one of the scan team listen over the MRI headphones while the other runs the script.

Troubleshooting

  • Whether or not the external keyboard is plugged in at the time that you launch MATLAB seems to dictate whether or not MATLAB will see it
    • If you are finding that the keyboard check script is not detecting the external USB keypad, relaunch MATLAB, ensuring that the USB keypad is plugged in when MATLAB is launched
  • If all else fails, reboot the laptop
  • Its helpful to have important experimental parameters specified in an external configuration file, rather than hard coded in a script. This approach is employed in the LDT experiment. Apparently, the getExperimentConfig.m function requires that this file is edited in a text editor like gedit, rather than using the MATLAB editor. Changes made using the MATLAB editor will cause a parsing error.