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
{"lastUpload":"2019-04-29T20:44:07.294Z","extensionVersion":"v3.2.9"} |
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
const SomeComponentDefaults = { | |
props: { | |
exampleProp: '' // start with '' and only allow strings. ts will prevent e.g. numbers being passed in as props | |
}, | |
state: { | |
exampleObjArray: [] as { source: ""; target: ""; id: "" }[], // use 'as' when your default is empty/undefined so ts knows what will be there | |
exampleNoDefault: undefined as number | string, // ideally we should have something as a default because undefined can cause errors | |
exampleNumber: 0 //is a number now, will be a number always. don't need 'as', | |
exampleUser: {name: '', email: '', age: 0} // each type will stay the same so don't need 'as' | |
} |
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
// @ts-check | |
interface nodeID { string } | |
interface tagID { string } | |
interface edgeID { string } | |
interface meta { | |
created?: string; //date time | |
description?: string; | |
label?: string; | |
} |
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
var webpack = require('webpack'); | |
var path = require('path'); | |
// variables | |
var isProduction = process.argv.indexOf('-p') >= 0; | |
var sourcePath = path.join(__dirname, './src'); | |
var outPath = path.join(__dirname, './dist'); | |
// plugins | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); |
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
license: mit |
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
license: mit |
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
license: mit |
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
import os.path as op | |
import numpy as np | |
import mne | |
from mne import spatial_tris_connectivity, grade_to_tris | |
from mne.datasets import sample | |
from sklearn import cluster | |
from collections import Counter | |
from surfer import Brain, TimeViewer |
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
#%% import #################################################################### | |
import mne | |
import numpy as np | |
import os | |
#%% load group avg data ####################################################### | |
os.environ["SUBJECTS_DIR"] = \ | |
"/freesurfer/RH4-x86_64-R530/subjects" | |
src_path = \ | |
'/MNE-sample-data/subjects/fsaverage/bem/fsaverage-ico-5-src.fif'; |
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
aparc_label_name = 'G_oc-temp_med-Lingual' | |
stc_mean = stc.copy().crop(tmin, tmax).mean() | |
# use the stc_mean to generate a functional label | |
# region growing is halted at 60% of the peak value within the | |
# anatomical label / ROI specified by aparc_label_name | |
label = mne.labels_from_parc('fsaverage', parc='aparc.a2009s', | |
regexp=aparc_label_name) | |
stc_mean_label = stc_mean.in_label(label[0][1]) | |
data = np.abs(stc_mean_label.data) |
NewerOlder