-
Notifications
You must be signed in to change notification settings - Fork 3
Encoding Arguments
Here is a full list of arguments used for encoding plots:
The subject ids are specified as a list. For podcast, we use 777. For 247, we can use any combinations of subject ids.
The keys are specified as a list. For podcast, we use comp. For 247, we use comp and/or prod.
The encoding results folders are specified as a list.
A typical format could look like this: 'data/encoding/tfs/kw-tfs-full-625-glove50-lag10k-25/*/*_%s.csv'. Inside the encoding script, we will search for files with paths that fits this format. The format filepath can be either relative or absolute. The %s in the format is a placeholder, meaning we can replace them later in the script. Here, we usually replace them with keys (either comp or prod). So each format can represent two filepaths.
Sometimes, we can generalize each format to represent more filepaths by using more than one %s. For instance, a format like this: data/encoding/tfs/kw-tfs-full-%s-glove50-lag10k-25/*/*_%s.csv contains two %s, where the first one can be replaced by any sid and the second one by any keys.
The labels are specified as a list. The number of labels should be the same as the number of formats, where each label correspond to a format.
The significant electrodes are specified in the following two arguments. SIG_FN_DIR represents the significant electrode file directory in a string, while SIG_FN represents the significant electrode filename format in a list
- Leave
SIG_FNempty to plot all electrodes - When providing sig elec files, provide them in the (sid keys) combination order. For instance, if
sid = 625 676andkeys = comp prod, then sig elec files should be in this order: (625 comp) (625 prod) (676 comp) (676 prod)- Here, the number of sig elec files should equal to # of
sid* # ofkeys
- Here, the number of sig elec files should equal to # of
- Alternatively, generalize sig files by using
%sas placeholders for subject ids- Here, the number of sig elec files should equal to # of
keys
- Here, the number of sig elec files should equal to # of
# Google's newest sig test
SIG_FN_DIR := 'data/plotting/sig-elecs/20230510-tfs-sig-file'
# Plot all electrodes
SIG_FN :=
# glove sig list for four subjects
SIG_FN := --sig-elec-file tfs-sig-file-glove-625-comp.csv tfs-sig-file-glove-625-prod.csv tfs-sig-file-glove-676-comp.csv tfs-sig-file-glove-676-prod.csv tfs-sig-file-glove-7170-comp.csv tfs-sig-file-glove-7170-prod.csv tfs-sig-file-glove-798-comp.csv tfs-sig-file-glove-798-prod.csv
# generalized glove sig list for four subjects
SIG_FN := --sig-elec-file tfs-sig-file-glove-%s-comp.csv tfs-sig-file-glove-%s-prod.csv
Lags is specified in several arguments
-
LAGS_PLT: lags from encoding (should be the same as the number of lags for the encoding results informats)
# Common Values
LAGS_PLT := {-10000..10000..25} # lag10k-25
LAGS_PLT := {-2000..2000..25} # lag2k-25
LAGS_PLT := {-5000..5000..25} # lag5k-25
-
LAGS_SHOW: lags to show in plot (lags that we want to plot, could be all or part ofLAGS_PLT) -
X_VALS_SHOW: x-values for those lags we want to plot (should be the same length asLAGS_SHOW) \- for regular encoding,
X_VALS_SHOWshould be the same asLAGS_SHOW - for concatenated lags,
X_VALS_SHOWmight be different fromLAGS_SHOW, for instance if we want to plot lags [-30k, -10k, -5k~5k, 10k, 30k], a reasonableX_VALS_SHOWcould be [-7k,-6k, -5k~5k, 6k, 7k]
- for regular encoding,
-
LAG_TKS(optional): lag ticks (tick marks to show on the x-axis) -
LAT_TK_LABLS(optional): lag tick labels (tick mark lables to show on the x-axis) (should be the same length asLAG_TKS)
Some examples below
# Regular encoding
LAGS_SHOW := $(LAGS_PLT)
X_VALS_SHOW := $(LAGS_SHOW)
LAG_TKS :=
LAG_TK_LABLS :=
# Zoomed-in encoding (from -2s to 2s)
LAGS_SHOW := {-2000..2000..25}
X_VALS_SHOW := $(LAGS_SHOW)
LAG_TKS :=
LAG_TK_LABLS :=
# Plotting for type Quardra (four different concatenated lags for 247)
LAGS_PLT := {-300000..-150000..50000} -120000 -90000 {-60000..-20000..10000} {-10000..10000..25} {20000..60000..10000} 90000 120000 {150000..300000..50000}
LAGS_SHOW := $(LAGS_PLT)
X_VALS_SHOW := {-28000..-16000..2000} {-15000..-12000..1000} {-10000..10000..25} {12000..15000..1000} {16000..28000..2000}
LAG_TKS := --lag-ticks {-28..28..2}
LAG_TK_LABLS := --lag-tick-labels -300 -250 -200 -150 -120 -90 -60 -40 -20 {-10..10..2} 20 40 60 90 120 150 200 250 300
# Plotting for type Final (final plots for 247)
LAGS_PLT := {-300000..-150000..50000} -120000 -90000 {-60000..-20000..10000} {-10000..10000..25} {20000..60000..10000} 90000 120000 {150000..300000..50000}
LAGS_SHOW := -300000 -60000 -30000 {-10000..10000..25} 30000 60000 300000
X_VALS_SHOW := -16000 -14000 -12000 {-10000..10000..25} 12000 14000 16000
LAG_TKS := --lag-ticks {-16..16..2}
LAG_TK_LABLS := --lag-tick-labels -300 -60 -30 {-10..10..2} 30 60 300
-
PLT_PARAMS: Other plot parameters-
--lc-by: Line color by (Choose what lines colors are decided by)(labelsorkeys)
Note: if
--lc_by = labels, order formats by: glove (blue), gpt2 (orange), bbot decoder (green), fourth label (red)-
--ls-by: Line style by (Choose what line styles are decided by)(labelsorkeys) -
--split(optional): Split Direction, if any (Choose how plots are split)(horizontalorvertical) -
--split-by(optional): Split by, if any (Choose how lines are split into plots)(labelsorkeys)(Only effective when--splitis not empty)
-
# Podcast plots
PLT_PARAMS := --lc-by labels --ls-by keys # plot for just one key
# Usual 247 plots with prod/comp split
PLT_PARAMS := --lc-by labels --ls-by keys --split horizontal --split-by keys # plot for prod+comp
For individual electrode plots, we usually have to set the same y-limits.
-
Y_LIMIT: y-axis limits (ymin ymax)
Y_LIMIT := 0 0.3 # from -0.05 to 0.35
Y_LIMIT := 0 # automatically takes max and min from the encoding results
-
FIG_SZ: figure size (width and height for each plot)
FIG_SZ:= 15 6
FIG_SZ:= 18 6
-
outfile: the name of the pdf to store plotting results