import json ''' 'methods': imcoh, pli, coh, plv, etc. Any method available for mne.connectivity.spectral_connectivity() 'electrode_subset': A list of electrodes: ['A1', 'A2'] or a pre-defined set of '32el10-20' or '64el10-20' 'select_x_best_electrodes': int or 'All'. If int is given, it will select the most statistically significant set of the corresponding 'electrode_subset' (see above). 'frequency_band': A bandwidth (pair of [fmin, fmax]) in which connectivity will be computed 'tmin_tmax': time around the stimulus (pair of [tmin, tmax])in seconds. If None,, [tmin, tmax] = [-0.2, 0.5] 'CSD_parameters': None or a pair of [stiffnes, lambda^2]: stiffness: 2-5, lambda^2: 0-10e-5 'conditions': 'responder' and/or 'proposer' 'subjects': list of subjects 'add_label': additional label methods, electrode_subset, select_x_best_electrodes, CSD_parameters are mutli-loop. subjects and add_label are fixed for all loops (1 value) ''' filename = "npm_8-13Hz_0.7s_P.json" #filename = "npm_8-13Hz_0.7s_R.json" #filename = "npm_14-30Hz_0.7s_P.json" #filename = "npm_14-30Hz_0.7s_R.json" param_dict = { 'methods': ['imcoh'], 'conditions': ['proposer'], 'frequency_band': [[8, 13]], 'electrode_subset': ['32el10-20'], 'select_x_best_electrodes': ["All"], #int or 'All'. If int is given, it will select the most statistically # significant set of the corresponding 'electrode_subset' (see above). 'tmin_tmax': [[-2.25, -1.55], [-1.55, -0.85], [-0.7, 0.0], [-0.35, 0.35], [0.0, 0.7], [0.85, 1.55], [1.55, 2.25]], 'CSD_parameters': [[3, 0.001]], #stiffness 2-5, lambda^2 0-10e-5 'datapath': "/mnt/data/NoCSD/", 'subjects': ['000', '007', '008', '009', '010', '011', '012', '013', '014', '015', '016', '017', '018', '020', '021', '023', '025', '027', '028', '029', '030', '031', '032', '034', '101', '102', '106', '109', '110', '111', '112', '113', '114', '115', '116', '117', '121', '124', '125', '126', '127', '128', '199'], 'add_label': "", 'result_dir': "/mnt/data/conn_results/results/" } while len(param_dict['electrode_subset']) > len(param_dict['select_x_best_electrodes']): param_dict['select_x_best_electrodes'].append('All') if param_dict['datapath'][-1] is not "/": param_dict['datapath'] += "/" if param_dict['result_dir'][-1] is not "/": param_dict['result_dir'] += "/" json_dict = json.dumps(param_dict) f = open(filename, "w") f.write(json_dict) f.close() print(param_dict)