Skip to content

Commit c50a32e

Browse files
committed
upd: organize debi data collection
1 parent 15fbfe2 commit c50a32e

5 files changed

Lines changed: 426 additions & 1 deletion

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Overall experimental setting
2+
3+
The experimental setting is to obtain anatomical MRI scan with synchronized eye tracking recording (the right eye gaze trajectories and eye movement events including blinking, saccades and fixation).
4+
5+
Here is the illustration of the overall experiment:
6+
7+
![overall_setting](../../assets/debi_protocol/overview/overall_setting.png){: style="width: 100%;display: block; margin: 0 auto;"}
8+
9+
The graph above can be divided into the following components:
10+
11+
- SyncBox: A NordicLabs SyncBox sends TTL (transistor-transistor logic) triggers to the scanner and forward the signal converted to the keyboard signal "s" to the PsychoPy laptop.
12+
13+
- Scanner: 3T clinical scanner (MAGNETOM PrismaFit, Siemens Healthineers) with a 64-channel head-neck coil with an attached mirror.
14+
- Eye tracker: We use the EyeLink 1000 Plus (SR Research Ltd.) for eye tracking.
15+
(i) The eye tracker consists of an infrared lens and camera sensor on one side, along with an infrared lamp to illuminate the subject's right eye. It is positioned inside the scanner bore.
16+
(ii) An infrared mirror is mounted on the head coil.
17+
- The Eye Tracker PC is bi-directionally connected to both the eye tracker and the PsychoPy laptop. It receives eye tracking data from the tracker, processes the eye movement trajectories and images, calculates pupil sizes by segmenting the pupil area, and classifies eye movement events based on predefined thresholds. The ET PC also receives trigger and task event messages from the PsychoPy laptop, logs data, and sends both the eye tracking data and logs back to the PsychoPy laptop.
18+
- Stimuli laptop (PsychoPy Laptop): The PsychoPy laptop runs the PsychoPy software, which is used to execute the task programs. These programs coordinate various hardware components, including the ET PC, eye tracker, the screen, and SyncBox. In our DEBI experiment, the 'MR-Eye' protocol displays a central dot that changes color at a frequency of 10Hz. In the 'MREye-Track' protocol, a gray dot sequentially appears at the top, bottom, left, and right sides of the screen. The laptop also stores the data and logs generated by the Eye Tracker PC after the experiment.
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
## Session Preparation
2+
3+
### Documentation
4+
5+
- [ ] Prepare the informed consent form ([EN](../../assets/files/informed_consent/form-en.pdf)|[FR](../../assets/files/informed_consent/form-fr.pdf)|[DE](../../assets/files/informed_consent/form-de.pdf))
6+
- [ ] Prepare an MRI safety screener ([EN](../../assets/files/mri_safety/safety_form-en.pdf)|[FR](../../assets/files/mri_safety/safety_form-fr.pdf))
7+
- [ ] Prepare a pen and a receipt form that the participant will sign when they are given the compensation
8+
9+
### Configure the IP address
10+
11+
If you are connecting your PC to the eye tracker (ET) for the first time, you need to reconfigure the IP address.
12+
On windows:
13+
14+
- Go to `Control Panel` -> `Network and Internet` -> `Network Connections`
15+
- Double-click on the `Ethernet` connection.
16+
- Select `Internet Protocol Version 4 (TCP/IPv4)` and click `Properties`.
17+
- Update the IP address to `100.1.1.2` and the subnet mask `255.255.255.0`.
18+
19+
![0-e-ip](../../assets/debi_protocol/selected/0-e-ip.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
20+
![0-e2-ip](../../assets/debi_protocol/selected/0-e2-ip.png){: style="width: 80%;display: block; margin: 0 auto;"}
21+
22+
### Prepare Equipment Outside the Scanner Room
23+
24+
#### Turn on the projector
25+
26+
!!! important "If someone is already scanning, ask first if you can switch the projector on already"
27+
28+
Turn on the Sony projector located in the back room of the scanner room.
29+
![projector-e](../../assets/debi_protocol/selected/1-projector-e.png){: style="width: 80%;display: block; margin: 0 auto;"}
30+
31+
Ensure the projector beam is directed into the scanner room.
32+
33+
#### Set up the Psychopy laptop on the table
34+
35+
- Take the psychopy PC from JB's office.
36+
![laptop-office](../../assets/debi_protocol/selected/2-e-jb-office-laptop.png){: style="width: 80%;display: block; margin: 0 auto;"}
37+
38+
- Insert the hdmi into the Psychopy laptop to monitor the visual stimuli on the screen. The hdmi should be from the 3-cable bundle (which connects PC, projector and the Psychopy laptop).
39+
![psychopy-laptop](../../assets/debi_protocol/selected/2-e-psychopy-laptop.png){: style="width: 80%;display: block; margin: 0 auto;"}
40+
41+
- If the monitor does not automatically switch the screen source, use the button below to manually change it.
42+
![button-monitor](../../assets/debi_protocol/selected/3-e-button-monitor.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
43+
44+
- Change the resolution of the screen of the laptop to 800x600 to ensure the whole screen is projected to the participant inside the scanner.
45+
46+
- Ensure that the PC beneath the monitor remains turned on.
47+
![pc-under-screen](../../assets/debi_protocol/selected/3-e-pc-under-screen.png){: style="width: 80%;display: block; margin: 0 auto;"}
48+
49+
- Connect the USB cable from the SyncBox to the PsychoPy laptop.
50+
![usb-from-SyncBox-1](../../assets/debi_protocol/selected/4-e-usb-from-syncbox.png){: style="width: 80%;display: block; margin: 0 auto;"}
51+
![usb-from-SyncBox-2](../../assets/debi_protocol/selected/4-e2-usb-from-syncbox.png){: style="width: 80%;display: block; margin: 0 auto;"}
52+
53+
- Plug the Ethernet from the ET computer to the psychopy laptop.
54+
![ethernet](../../assets/debi_protocol/selected/5-e-ethernet.png){: style="width: 80%;display: block; margin: 0 auto;"}
55+
!!! danger "Make sure the IP address is reset if the laptop is connected to the ET PC for the first time!"
56+
57+
#### Set up the SyncBox
58+
59+
- Ensure the SyncBox cable (RJ45) is already plugged onto the interface to the scanner room.
60+
![rj45-1](../../assets/debi_protocol/selected/6-rj45-plugged.png){: style="width: 80%;display: block; margin: 0 auto;"}
61+
- Plug the other end of the cable into the SyncBox.
62+
![rj45-2](../../assets/debi_protocol/selected/6-e2-rj45-plugged.png){: style="width: 80%;display: block; margin: 0 auto;"}
63+
- Turn on the SyncBox
64+
- Check synchronization
65+
- [ ] Enter the <span class="syncbox">Synchronization</span> mode by selecting it and pushing the enter button :fontawesome-solid-circle:{ .bluecolor }.
66+
- [ ] Hit the down arrow button :fontawesome-solid-caret-down:{ .bluecolor } until you find <span class="syncbox">Send triggerpulse to PC</span>
67+
- [ ] Push the enter button :fontawesome-solid-circle:{ .bluecolor } every time you want to send an <span class="keypress">s</span> character.
68+
- [ ] Check that the *PsychoPy* laptop types those triggers (e.g., on an open editor receiving keypresses, or the shell prompt, or looking at your open log).
69+
70+
![Trigger to PsychoPy PC](../../assets/debi_protocol/selected/19-pc-trigger-signal.png){: style="width: 80%;display: block; margin: 0 auto;"}
71+
**Trigger to PsychoPy PC**
72+
{: style="text-align: center;"}
73+
74+
- [ ] Check that the *PsychoPy* laptop types those triggers onto the scanner's PC.
75+
76+
![Trigger to Scanner](../../assets/debi_protocol/selected/19-scanner-signal.png){: style="width: 80%;display: block; margin: 0 auto;"}
77+
**Trigger to Scanner**
78+
{: style="text-align: center;"}
79+
80+
- Go to the `Simulation`, and we can see the `Start Session` on the page.
81+
![start-sync-1](../../assets/debi_protocol/selected/7-e-start-sync.png){: style="width: 80%;display: block; margin: 0 auto;"}
82+
![start-sync-2](../../assets/debi_protocol/selected/7-e2-start-sync.png){: style="width: 80%;display: block; margin: 0 auto;"}
83+
- Configure the TR time to 2500 ms according to our sequence. The TR determines the interval between two triggers.
84+
![tr-sync](../../assets/debi_protocol/selected/7-e3-tr-sync.png){: style="width: 80%;display: block; margin: 0 auto;"}
85+
86+
#### Set up the ET system
87+
88+
- Make sure the ET PC is plugged in.
89+
![charge-et-pc](../../assets/debi_protocol/selected/8-e-charge-ET-PC.png){: style="width: 80%;display: block; margin: 0 auto;"}
90+
- Before turning on the ET computer, ensure it is connected to the PsychoPy laptop (this should have been done in the previous step).
91+
- Switch on the ET’s PC using the power-on button at the front
92+
- Select "Eyelink" when given the option of which operating system to launch.
93+
- Initialize the ET software from the ET work station here by typing "elcl.exe" in the terminal
94+
![et-initial](../../assets/debi_protocol/selected/8-e-ET-initial.png){: style="width: 80%;display: block; margin: 0 auto;"}
95+
96+
!!! warning "The command elcl.exe will only work and start the software once the eye tracker device is connected to the ET PC. If you encounter any error messages, please ensure the eye tracker is connected to the PC inside the scanner room and try running the command again."
97+
98+
#### Prepare the Eye Tracker device
99+
100+
- All the lenses, mirrors, and other equipment are in the box in JB's office.
101+
![box](../../assets/debi_protocol/selected/9-e-box.png){: style="width: 80%;display: block; margin: 0 auto;"}
102+
- Install the <mark>50mm</mark> lens onto the eye tracker (the compatible lens has a silver screw on it) <mark>(photos from Oscar's SOP)</mark>
103+
104+
![lens-1](../../assets/debi_protocol/selected/10-e1-cover-mri-compatible-lens.png){: style="width: 80%;display: block; margin: 0 auto;"}
105+
![lens-2](../../assets/debi_protocol/selected/10-e2-cover-mri-compatible-lens.png){: style="width: 80%;display: block; margin: 0 auto;"}
106+
107+
!!! tip "The default position of the screw for convenient focus is typically set to around `1`. ![install-lens](../../assets/debi_protocol/selected/20-e-screw-of-lens.jpg)However, the exact value can vary depending on the specific participant and setup for each time. It's recommended to start with the screw at value `1` and adjust from there for optimal focus during setup. If you're following a specific SOP, it might provide additional details for your equipment."
108+
![install-lens](../../assets/debi_protocol/selected/11-install-lens-ET.png){: style="width: 80%;display: block; margin: 0 auto;"}
109+
110+
#### Place the infrared-mirror onto the head coil
111+
112+
- Detach the standard mirror's frame from the head coil, if it is placed there.
113+
- Take the infrared mirror out of the «fMRI usage» box. It should be always protected by a mask unless in use.
114+
!!! warning "This infrared mirror is the most delicate part, because the mirror cannot be replaced nor cleaned. This mirror is EXTREMELY EXPENSIVE."
115+
![ir-mirror](../../assets/debi_protocol/selected/12-e-infered-mirror.png){: style="width: 80%;display: block; margin: 0 auto;"}
116+
117+
- Get two gloves (e.g., from the box hanging at the entrance of the scanner room)
118+
- Put the gloves on, and **DON'T TOUCH ANYTHING**. You must have the standard mirror dismounted and ahead of this step.
119+
- **WITH THE GLOVES** proceed to extract the infra-red mirror from its box, being extremely careful. **YOU CAN ONLY TOUCH THE MIRROR WITH GLOVES**, because it cannot be cleaned up. Watch out for FINGERPRINTS and once taken out of the protection mask, IMMEDIATELY AND CAREFULLY ATTACH IT to the head coil.
120+
![head_coil_mirror](../../assets/debi_protocol/selected/22_anno_head_coil_mirror.png){: style="width: 80%;display: block; margin: 0 auto;"}
121+
122+
### Preparation in the scanner room
123+
124+
#### Connect the external cables to ET and scanner
125+
126+
![cables](../../assets/debi_protocol/selected/13-e-cables.png){: style="width: 80%;display: block; margin: 0 auto;"}
127+
128+
- Unroll and connect the cables (two plugs for the black, one plug for the orange).
129+
![et-cables](../../assets/debi_protocol/selected/13-e-ET-cables.png){: style="width: 80%;display: block; margin: 0 auto;"}
130+
131+
!!! warning "No photo here due to magnetic field."
132+
133+
#### Place the eye tracker and screen
134+
135+
- Place the glass plate (stored in JB's office) on the scanner
136+
- Position the ET on the glass plate according to the stickers on the plate.
137+
138+
!!! danger "Hold the ET arm FIRMLY, because the magnetic field imposes some resistance."
139+
140+
- Place the half-circle one-direction screen, which is on the table behind the scanner, onto the glass plate. Position it between the projector and the eye tracker to reflect the projector's image.
141+
![half-circle-screen](../../assets/debi_protocol/selected/14-half-circle-screen.png){: style="width: 80%;display: block; margin: 0 auto;"}
142+
143+
- Check the output of the following command and verify that IP/mask is **100.1.1.2/24**, and the protocol is IP version 4.
144+
145+
``` shell
146+
ifconfig -a
147+
```
148+
149+
- Check whether the link is properly established. The ET should respond to echos sent from a terminal with:
150+
151+
```shell
152+
ping 100.1.1.1
153+
```
154+
155+
#### Place the participant
156+
157+
##### Place the subject on the bed
158+
159+
- Provide the participant with a blanket, ear plugs and sand bags.
160+
- Adjust the head coil and the mirror. If necessary, apply some pads to adjust the participant's head position to ensure the forehead tightly positioned against the head coil.
161+
- Ensure the participant does not cross the legs.
162+
- Provide the participant with the emergency button and explain that it can be pressed it in case of an emergency.
163+
164+
##### Adjust the scanner before send the subject inside
165+
166+
- Twist the knob to adjust the height of the bed and  wait for it to stop.
167+
- Gently move the participant with the manual controls. Stop when the head is under the head-localizer. Instruct the participant to close the eyes.
168+
- Turn on the red light to localize the head. Put one hand on the head coil, then turn the knob left or right to align the red light with the mark on the head coil. Once aligned, turn off the red light and instruct the participant to open the eyes.
169+
- Turn off the ventilation and set the scanner light to the minimum level.
170+
- Send the participant into the scanner, then proceed to the console at the back of scanner.
171+
172+
##### Adjust the lens of eye tracker
173+
174+
- Point the lens of eye tracker towards the participant's right eye.
175+
- The default position of the screw on the lens can be set to around 1 for convenient adjustment.
176+
![install-lens](../../assets/debi_protocol/selected/20-e-screw-of-lens.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
177+
- Rotate the lens until the pupil is in focus on the screen during camera mode. Adjust until the image is sharp, with both the pupil and eyelashes well defined.
178+
![no-pupil](../../assets/debi_protocol/selected/17-e-no-pupil.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
179+
![good-pupil](../../assets/debi_protocol/selected/17-e-good-pupil.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
180+
181+
### ET Calibration
182+
183+
#### Inform the participant
184+
185+
Inform the participant that you are leaving the room and will shortly come back for a final preparation.
186+
187+
#### Open psychopy in the psychopy laptop
188+
189+
If you are connecting the eye tracker to the experimental laptop for the first time, you will need to configure it (see Section 0).
190+
191+
#### Run the experiment on psychopy
192+
193+
Click the `Run Experiment` button, or run the experiment from the terminal by typing:
194+
`python experiment.py`. All the experiments must have a calibration and validation phase before the experiment itself (they come with the software).
195+
196+
!!!info "Click [here](https://github.com/Evelyn92/MREye_psychopy/blob/main/ver25/fixation_dots_T1weighted_250127_last_run.py) to check out the psychopy code for the [2.0 MR-Eye study](https://data.snf.ch/grants/grant/220433), and [here](https://github.com/MattechLab/MR-EyeTrack/blob/dev/visual_stimuli/fixed_dot-16_grid_T1w.py) for the [MR-Eye Track study](https://hee-projets.heig-vd.ch/en/projects/183/MREye-Track)"
197+
198+
![et-calibration](../../assets/debi_protocol/selected/18-e-calibration.png)
199+
<!-- {: style="width: 80%;display: block; margin: 0 auto;"} -->
200+
**Example psychopy project (MR-Eye Track)**
201+
{: style="text-align: center;"}
202+
203+
!!! important "Make sure that once the experiment start after the calibration, the data are being stored to the xx.EDF file. There should be a message about that displayed <mark>at the ET’s PC screen</mark>. <mark>(According to Helene's SOP, but we did not notice there was such message popping out before)</mark>"
204+
205+
!!! important "For every new visual stimulation, even on the same subject, there must be new calibration and validation phases to ensure a proper generated EDF"
206+
207+
#### Run the calibration
208+
209+
Once the stimulation begins, follow the messages on the screen to run the calibration, make sure the following options are selected correctly
210+
211+
- Calibration Type: `5 points calibration`
212+
- Sampling rate: `1k`
213+
- Tracking mode: `Pupil-CR`
214+
- Pupil Tracking: `Ellipse`
215+
- Camera Position: `Right`
216+
217+
#### Apply threshold to find the pupil
218+
219+
- On the ET PC, click `Apply Threshold` (top left corner, as shown in the figure below). Ensure that the pupil is detected and that you see the blue cross on the eye. If you encounter issues, check the lighting inside the scanner (ensure it's not too bright or too dim) and verify the participant's position inside the coil. Once the calibration starts, accept the calibration points when they turn green by clicking `Accept Fixation` (the first click is always manual, the following ones are automatic or manual).
220+
- If the calibration was successful, you will see the sentence `calibration successful` at the bottom in green. Check the stability of the accepted points and overall score of the calibration.
221+
!!!tip "If the calibration points form a cross, it is a perfect calibration."
222+
![good-cross](../../assets/debi_protocol/selected/16-e-good-cross.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
223+
224+
#### Follow up with the validation
225+
226+
!!! tip "What you should see in an ideal situation is: the reference dot on the center of the screen and another dot that corresponds to the pupil calibration. The calibration dot is more or less stable moving a little around the reference dot."
227+
!!! warning "If the calibration dot is unstable and is moving around far from the reference dot, the experimenter should go back clicking the restart button, adjust the contrast and redo the calibration. Once the calibration dot is quite stable, proceed with the validation clicking the accept fixation."
228+
229+
![validation](../../assets/debi_protocol/selected/18-e-validation.jpg){: style="width: 80%;display: block; margin: 0 auto;"}
230+
231+
#### Go into the scanner room and inform the participant
232+
233+
Inform the participant that you are leaving the room and will now close the door to start. Let them also know that you are going to communicate with them very shortly to check that communications through the speaker are functioning.
234+
235+
#### Exit the Scanning Room
236+
237+
#### Close the Scanning Room door

0 commit comments

Comments
 (0)