Skip to content
Snippets Groups Projects
Commit f1379a95 authored by Maximilian Schmidt's avatar Maximilian Schmidt
Browse files

Fix call os Rscript in compute_bold_signal.py

parent 0307d4c1
No related branches found
No related tags found
1 merge request!1Add all necessary files for the multi-area model
......@@ -33,6 +33,7 @@ fn = os.path.join(load_path,
'synaptic_input_{}.npy'.format(area))
synaptic_input = np.load(fn)
def bold_R_parser(fn):
f = open(fn, 'r')
# skip first line
......@@ -52,7 +53,7 @@ out_fn = os.path.join(save_path,
np.savetxt(fn, synaptic_input / np.max(synaptic_input))
try:
subprocess.run(['Rscript', '--vanilla', 'compute_bold_signal.R {} {}'.format(fn, out_fn)])
subprocess.run(['Rscript', '--vanilla', 'compute_bold_signal.R', fn, out_fn])
except FileNotFoundError:
raise FileNotFoundError("Executing R failed. Did you install R?")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment