Anti Antisaccade Task
“Anti” is a Eye Tracking Antisaccade Tasks (not to be confused with “AntiState” AntiState Mix) written in EPrime for ASL Eyetracker.
The task was used in Brain Mechanisms R01 (7T), behavioral visit of PET Study and Cog Grant (?)
Trials are like
- antifix – red cross, variable {
0.5,2,4,6} sec - gap – blank,
.2sec - cue – yellow circle,
1sec. At {40, 180,460, 600}px / 640px total, likely +/- 7 and 14 deg from center.
The 200ms blank screen “gap” event was dropped in some experiments (@ MR) to increase accuracy at younger ages. Velanova et al., 2008, Ordez et al., 2013
The Eprime file can be found in bea_res/Tasks/Behavorial/anti-beakid/ANTI.es
Output files are like bea_res/Data/Tasks/Anti/Basic/11910/20221216/Raw/EyeData/11910_20221216_anti.eyd
Also in Temporary Raw Data
find /Volumes/L/bea_res/Data/Temporary\ Raw\ Data/PET/ -iname '*anti*.eyd'|sort|head /Volumes/L/bea_res/Data/Temporary Raw Data/PET/10195_20170816/10195_anti.eyd /Volumes/L/bea_res/Data/Temporary Raw Data/PET/10195_20190319/10195_20190319_anti.eyd /Volumes/L/bea_res/Data/Temporary Raw Data/PET/10843_20170526/10843_anti.eyd /Volumes/L/bea_res/Data/Temporary Raw Data/PET/10843_20190528/10843_20190528_anti.eyd
EPrime Code
Task settings and order from EPrime file
perl -MData::Dumper -F= -slane 'next unless /^(\[Object|Name|Duration|Code|Text|ForeColor|.*Filename)/; $obj=$F[0] if $F[0] =~ /Object/; $h{$obj}->{$F[0] =~ s/.*Filename/Filename/r}=join("=",(@F[1..$#F] =~ s/"|\r//gr)); END {for $k (keys %h){ next unless ($h{$k}->{Duration}||$h{$k}->{Code}) and $h{$k}->{Name}; print join("\t", map {$h{$k}->{$_}} (qw/Name Duration ForeColor Filename Text Code/)); }}' /Volumes/L/bea_res/Tasks/Behavorial/anti-beakid/ANTI.es
| Name | Dur | Color | File | Text | Code |
|---|---|---|---|---|---|
| InstructAntiC | -1 | ||||
| InstructAntiB | -1 | cue.bmp | |||
| InstructAntiA | -1 | ||||
| greatjob | -1 | white | Great job!\n\nRelax your eyes for a minute.\n\nWe will begin again soon. | ||
| GetReady | -1 | ||||
| gap | 200 | black | |||
| EventMarkerDelay | 20 | ||||
| Endtrial | PupilSend(EVENTSTROBE+240) | ||||
| cue | 1000 | cue.bmp | |||
| ANTItarget4 | PupilSend(EVENTSTROBE+124) | ||||
| ANTItarget3 | PupilSend(EVENTSTROBE+123) | ||||
| ANTItarget2 | PupilSend(EVENTSTROBE+122) | ||||
| ANTItarget1 | PupilSend(EVENTSTROBE+121) | ||||
| antifix | [ColorDelay] | red | + | ||
| ANTIcue6000 | PupilSend(EVENTSTROBE+26) | ||||
| ANTIcue500 | PupilSend(EVENTSTROBE+25) | ||||
| ANTIcue4000 | PupilSend(EVENTSTROBE+24) | ||||
| ANTIcue2000 | PupilSend(EVENTSTROBE+22) | ||||
grep Flow /Volumes/L/bea_res/Tasks/Behavorial/anti-beakid/ANTI.es | tail -n 8 FlowLines(0).Count=7 FlowLines(0).FlowItem(0).Name="ANTIcue4000" FlowLines(0).FlowItem(1).Name="antifix" FlowLines(0).FlowItem(2).Name="gap" FlowLines(0).FlowItem(3).Name="ANTItarget4" FlowLines(0).FlowItem(4).Name="cue" FlowLines(0).FlowItem(5).Name="Endtrial" FlowLines(0).FlowItem(6).Name="EventMarkerDelay"
Cue Duration
In the 7T Behavioral Protocol, duration for the red fix cross are 0.5 2 4 6. There are 12 of each. The extra .2 seconds is the “gap” which does not have it's own trigger in the eye recording data.
raw_eye_data_file = '/Volumes/L/bea_res/Data/Tasks/Anti7TASL/10129/20180829/Raw/EyeData/txt/10129.20180829.1.data.tsv'
d <- read.table(raw_eye_data_file,header=T)
# XDAT is analogous to EEG trigger sent to and embedded in eye tracking recording
# <100 is cue, >100 is dot, 250 is "clear" (end of trial)
# sampling rate of ASL tracker is 60Hz
durs <- d %>%
mutate(trial=cumsum(XDAT!=lag(XDAT,default=0)),
event=cut(XDAT,c(0,100,200,250),
labels=c('cue','dot','end'))) %>%
group_by(trial,event,XDAT) %>%
summarise(dur=round(n()/60,1))
# how many trials at each duration do we have?
durs %>%
filter(event=="cue") %>%
with(rle(sort(dur)))
# Run Length Encoding
# lengths: int [1:4] 12 12 12 12
# values : num [1:4] 0.7 2.2 4.2 6.2
Visual Angle
Likely +/- 7 and 14 degrees from center using the post-renovation screen and screen-to-eye measurements (32deg screen) and using the EPrime force screen width resolution of 640px.
- loc_from_EP.bash
grep 'ValueString.*\tanti' '/Volumes/L/bea_res/Tasks/Behavorial/anti-beakid/ANTI.es'| perl -lne '@a=(split /\\t/, $_);print $a[4]'| sort -un 40 180 460 600
- angle.R
c(40,180,460,600)/640 * 32 - 32/2 # [1] -14 -7 7 14

