Open robbwh opened 8 months ago
Currently the derivation of ASL reactivity regions is a long list: ~300 lines of code and doesn't include all brain regions.
https://github.com/liud4/rVMAP/blob/a620dbe01c9ddeb6ef812c7144e980b1231642f1/R/derive_automated_3T.R#L72
These 300 lines could be simplified into this code block:
for (rest_var in asl_rest_variables) { # Construct the corresponding chall and reac variable names chall_var <- gsub("asl.rest", "asl.chall", rest_var) reac_var <- gsub("asl.rest", "asl.reac", rest_var) # Calculate the reac variable data[[reac_var]] <- 100 * (data[[chall_var]] - data[[rest_var]]) / data[[rest_var]] / data[["asl.3t.change.etco2"]] }
Panpan will edit this function after the data freeze (June 2024).
Currently the derivation of ASL reactivity regions is a long list: ~300 lines of code and doesn't include all brain regions.
https://github.com/liud4/rVMAP/blob/a620dbe01c9ddeb6ef812c7144e980b1231642f1/R/derive_automated_3T.R#L72
These 300 lines could be simplified into this code block: