This file contains 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
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
This file contains 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
""" | |
=================================== | |
08. Record extracellular potentials | |
=================================== | |
The main output of HNN simulations is the 'dipole' waveform, i.e., the net | |
intracellular current flowing in pyramidal cell apical dendrites. At the large | |
distances between cells and M/EEG sensors, this 'primary' current is the main | |
contributor to the measured fields. Close to the cells, the local field | |
potential (LFP) is the result of intracellular current leaking into the |
This file contains 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
# %% | |
# %matplotlib widget | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import SymLogNorm | |
from mpl_toolkits.axes_grid1.inset_locator import inset_axes | |
import numpy as np | |
from neuron import h | |
from hnn_core.network_builder import load_custom_mechanisms | |
from hnn_core.lfp import _LFPElectrode |
This file contains 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
# %% | |
# %matplotlib widget | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import SymLogNorm | |
from mpl_toolkits.axes_grid1.inset_locator import inset_axes | |
import numpy as np | |
from neuron import h | |
from hnn_core.network_builder import load_custom_mechanisms | |
from hnn_core.lfp import _LFPElectrode |
This file contains 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 tempfile | |
import hnn_core | |
from hnn_core import simulate_dipole, read_params, Network | |
hnn_core_root = op.dirname(hnn_core.__file__) | |
params_fname = op.join(hnn_core_root, 'param', 'default.json') | |
params = read_params(params_fname) |
This file contains 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 hnn_core | |
from hnn_core import read_params, Network | |
import matplotlib.pyplot as plt | |
from hnn_core.network_builder import NetworkBuilder | |
from hnn_core.network_builder import _simulate_single_trial | |
from neuron import h | |
import numpy as np | |
from scipy.optimize import curve_fit |
This file contains 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 numpy as np | |
import matplotlib.pyplot as plt | |
TSTOP = 5000. | |
recalc = True | |
m = 3.4770508e-3 | |
b = -51.231085 | |
# these values were fit over the range [750., 5000] |
This file contains 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
# NB on OS X, see psychopy/psychopy PR #1325 and Issue #1315 | |
# To run psychopyApp.py, we need a framework python: | |
# python.app `which psychopyApp.py` | |
name: psychopy | |
channels: !!python/tuple | |
- defaults | |
- conda-forge | |
dependencies: | |
- CogSci::pygame=1.9.2a0=py27_0 | |
- alabaster=0.7.9=py27_0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 os import path as op | |
import numpy as np | |
# from scipy import linalg | |
import mne | |
data_path = mne.datasets.sample.data_path() | |
subjects_dir = op.join(data_path, 'subjects') | |
fname_ave = op.join(data_path, 'MEG', 'sample', 'sample_audvis-ave.fif') | |
fname_cov = op.join(data_path, 'MEG', 'sample', 'sample_audvis-cov.fif') |
NewerOlder