This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from nibabel import load | |
| from subprocess import check_output | |
| from numpy import unique | |
| AAL_ATLAS = '/usr/share/mricron/templates/aal.nii.gz' | |
| VASC_TERR_ATLAS = 'CortVascTerritoriesTatu.nii' | |
| vasc_terr_atlas_aal = 'CortVascTerritoriesTatu_aal.nii.gz' | |
| OUTPUT_CSV = 'n_voxels_in_vascterr.csv' | |
| out = check_output([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from argparse import ArgumentParser, RawDescriptionHelpFormatter | |
| from datetime import timedelta, datetime | |
| from json import dump | |
| from logging import getLogger, StreamHandler, Formatter, DEBUG | |
| from pathlib import Path | |
| from sys import version | |
| from numpy import ndarray, savetxt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % parameters | |
| F = 160; | |
| A = 1; | |
| n_trl = 100; | |
| fs = 1000; | |
| T = [-1, 1]; | |
| labels = {'chan0' | |
| 'chan1' | |
| 'chan2' | |
| 'chan3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function data = read_phypno(phy_file, begtime, endtime) | |
| %READ_PHYPNO read phypno .phy/.dat files | |
| % | |
| % phy_file : path to .phy file | |
| % begtime : start of time of interest in s | |
| % endtime : end of time of interest in s | |
| % | |
| % data : data in fieldtrip format, trials are memory-mapped | |
| % | |
| % It needs jsonlab to read the header file, so download and add to your |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from numpy import float32, load | |
| from vispy.geometry import MeshData | |
| from vispy.gloo import VertexBuffer | |
| from vispy.io.image import write_png | |
| from vispy.plot import Fig | |
| from vispy.scene.visuals import create_visual_node | |
| from vispy.visuals import Visual | |
| # download https://dl.dropboxusercontent.com/u/66601/fsaverage.npz | |
| surf = load('fsaverage.npz') |
NewerOlder