-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Currently the derivation of ASL reactivity regions is a long list: ~300 lines of code and doesn't include all brain regions.
Line 72 in a620dbe
| asl.reac.grey.matter.hct <- 100 * (asl.chall.grey.matter.hct - asl.rest.grey.matter.hct) / asl.rest.grey.matter.hct / asl.3t.change.etco2 |
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"]]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels