Microcircuit. PLOS Computational Biology 12, 1-34 (2016). """ import plot_helpers import meanfield.circuit as circuit import numpy as np import h5py_wrapper.wrapper as h5 fix_path = 'integration/data/' if __name__ == '__main__': filename = fix_path + 'Bos2016_data.h5' # Original parameters extracted from the data + modification circ_params_with_modifications = plot_helpers.get_parameter_microcircuit() circ = circuit.Circuit('microcircuit', circ_params_with_modifications, analysis_type='dynamical', fmax=500.0, from_file=False) power_spectra_freqs, power_spectra = circ.create_power_spectra() exemplary_frequency_idx = 20 omega = circ.omegas[exemplary_frequency_idx] print(omega) H = circ.ana.create_H(omega) MH = circ.ana.create_MH(omega) delay_dist = circ.ana.create_delay_dist_matrix(omega)
import numpy as np import matplotlib.pyplot as plt import read_sim as rs import plot_helpers as ph import h5py_wrapper.wrapper as h5 import meanfield.circuit as circuit ph.set_fig_defaults() circuit_params = ph.get_parameter_microcircuit() def get_sensitivity_measure(calcAna, calcAnaAll, mode='gamma', eig_index=None): print 'Calculate sensitivity measure.' if calcAna or calcAnaAll: if mode == 'gamma' or mode == 'low': fmax = 100.0 elif mode == 'high_gamma': fmax = 400.0 circ = circuit.Circuit('microcircuit', circuit_params, fmax=fmax, from_file=not calcAnaAll) freqs, eigs = circ.create_eigenvalue_spectra('MH') if mode == 'gamma': fmax = freqs[np.argmin(abs(eigs[eig_index] - 1))] Z = circ.get_sensitivity_measure(fmax) eigc = eigs[eig_index][np.argmin(abs(eigs[eig_index] - 1))] elif mode == 'high_gamma': eigs = eigs[eig_index][np.where(freqs > 150.)] freqs = freqs[np.where(freqs > 150.)] fmax = freqs[np.argmin(abs(eigs - 1.0))]
Options: -h --help Show this screen. --version Show version. """ import plot_helpers import meanfield.circuit as circuit from docopt import docopt import sys if __name__ == '__main__': arguments = docopt(__doc__, version='0.1') filename = arguments['<filename>'] # New parameters used for Fig. 1 circ_params_new = plot_helpers.get_parameter_microcircuit() # Original parameters extracted from the data circ = circuit.Circuit('microcircuit', analysis_type=None) circ_params_old = circ.params file = open(filename, 'w') sys.stdout = file for attribute in circ_params_new.keys(): print(attribute) print('old/original:') print(circ_params_old[attribute]) print('new:') print(circ_params_new[attribute]) print('\n')