Skip to content

Brainmap Arguments

KenWWW edited this page Jul 13, 2023 · 3 revisions

Here is a full list of arguments used for encoding plots:


sid

The subject ids are specified as a list. For podcast, we use 777. For 247, we can use any combinations of subject ids.


keys

The keys are specified as a list. For podcast, we use comp. For 247, we use comp and/or prod.


effects

The effects are specified as a string. The options are as follows:

  • max: for each electrode, take the maximum correlation across lags
  • mean: for each electrode, take the average correlation across lags
  • max-diff: for each electrode, take the difference of maximum correlation across lags between two encoding results, used for whisper paper
  • area-diff: for each electrode, take the difference of area under the curve across certain lags between two encoding results, used for probable/improbable

formats

The encoding results folders are specified as a list. Usually, provide only one format. If effects is a type of difference, then provide two formats, then the effect will be a difference between the first and second format.

A typical format could look like this: 'data/encoding/tfs/kw-tfs-full-%s-glove50-lag10k-25/*/*_%s.csv'. Inside the brainmap 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 replace the first one by any sid and the second one by any keys.


Significant Electrodes

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_FN empty to plot all electrodes
  • When providing sig elec files, provide them in the keys order and use %s as a placeholder for sid. For instance, if keys = comp prod, then sig elec files should be two files in the order of comp format and prod format
  • Alternatively, provide one sig elec file by using two %s placeholders, the first one for sid and second one for keys
# Google's newest sig test
SIG_FN_DIR := 'data/plotting/sig-elecs/20230510-tfs-sig-file'

# Plot all electrodes
SIG_FN := 

# 2 sig elec lists
SIG_FN := --sig-elec-file tfs-sig-file-glove-%s-comp.csv tfs-sig-file-glove-%s-prod.csv

# 1 sig elec list
SIG_FN := --sig-elec-file tfs-sig-file-glove-%s-%s.csv

Lags

Lags is specified in several arguments

  • LAGS_PLT: lags from encoding (should be the same as the number of lags for the encoding results in formats)
  • LAGS_SHOW: lags used for effect (could be all or part of LAGS_PLT) (for instance, if effect is max, LAGS_PLT is -5k to 5k and LAGS_SHOW is -2k to 2k, then we are only calculating max on the -2k to 2k range, even though the encoding is done on -5k to 5k)
# Regular brainmap
LAGS_PLT := {-10000..10000..25} # lag10k-25
LAGS_PLT := {-5000..5000..25} # lag5k-25
LAGS_PLT := {-2000..2000..25} # lag2k-25
LAGS_SHOW := $(LAGS_PLT)

# Trimmed max (from -2s to 2s)
LAGS_PLT := {-5000..5000..25} # lag5k-25
LAGS_SHOW := {-2000..2000..25}  # lag2k-25

Clone this wiki locally