add scripts for baseline data, reading baseline eod
This commit is contained in:
parent
64bc20b8fe
commit
08402fcf13
25
code/read_baseline_data.py
Normal file
25
code/read_baseline_data.py
Normal file
@ -0,0 +1,25 @@
|
||||
import nixio as nix
|
||||
import os
|
||||
from IPython import embed
|
||||
|
||||
def read_baseline_eod(dataset):
|
||||
base = dataset.split(os.path.sep)[-1] + ".nix"
|
||||
nix_file = nix.File.open(os.path.join(dataset, base))
|
||||
embed()
|
||||
nix_file.close()
|
||||
b = nix_file.blocks[0]
|
||||
for t in b.tags():
|
||||
if "baseline" in t.name:
|
||||
break;
|
||||
eod_da = b.data_arrays["LocalEOD-1"]
|
||||
eod = t.retrieve_data("LocalEOD-1")
|
||||
time = eod_da.dimensions[0].axis(len(eod))
|
||||
nix_file.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
data_dir = "../data"
|
||||
dataset = "2018-11-09-ad-invivo-1"
|
||||
eod = read_baseline_eod(os.path.join(data_dir, dataset))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user