def dipole_fit(): mu.add_mmvt_code_root_to_path() from src.preproc import meg importlib.reload(meg) subject = mu.get_user() args = meg.read_cmd_args( dict(subject=subject, mri_subject=subject, atlas=mu.get_atlas())) meg.init(subject, args) dipoles_times = [(bpy.context.scene.meg_dipole_fit_tmin, bpy.context.scene.meg_dipole_fit_tmax)] dipoloes_title = mask_roi = MEGPanel.current_cluster['intersects'][0][ 'name'] meg.dipoles_fit(dipoles_times, dipoloes_title, None, mu.get_real_fname('meg_noise_cov_fname'), mu.get_real_fname('meg_evoked_fname'), mu.get_real_fname('head_to_mri_trans_mat_fname'), 5., bpy.context.scene.meg_dipole_fit_use_meg, bpy.context.scene.meg_dipole_fit_use_eeg, mask_roi=mask_roi, do_plot=False, n_jobs=4)
def init(addon_prefs): set_play_to(get_max_time_steps()) mmvt_utils.view_all_in_graph_editor(bpy.context) bpy.context.window.screen = bpy.data.screens['Neuro'] bpy.context.scene.atlas = mmvt_utils.get_atlas() bpy.context.scene.python_cmd = addon_prefs.python_cmd # set default values figures_fol = op.join(mmvt_utils.get_user_fol(), 'figures') mmvt_utils.make_dir(figures_fol) set_render_output_path(figures_fol) set_render_quality(60) mmvt_utils.set_show_textured_solid() code_fol = mmvt_utils.get_parent_fol(mmvt_utils.get_parent_fol()) os.chdir(code_fol)
def init(addon_prefs): set_play_to(get_max_time_steps()) mmvt_utils.view_all_in_graph_editor(bpy.context) bpy.context.window.screen = bpy.data.screens['Neuro'] bpy.context.scene.atlas = mmvt_utils.get_atlas() bpy.context.scene.python_cmd = addon_prefs.python_cmd # set default values figures_fol = op.join(mmvt_utils.get_user_fol(), 'figures') mmvt_utils.make_dir(figures_fol) set_render_output_path(figures_fol) set_render_quality(60) mmvt_utils.set_show_textured_solid() mmvt_utils.hide_relationship_lines() code_fol = mmvt_utils.get_parent_fol(mmvt_utils.get_parent_fol()) os.chdir(code_fol)
def main(addon_prefs=None): show_electrodes(False) show_connections(False) mmvt_utils.view_all_in_graph_editor(bpy.context) bpy.context.window.screen = bpy.data.screens['Neuro'] bpy.context.scene.atlas = mmvt_utils.get_atlas() bpy.context.scene.python_cmd = addon_prefs.python_cmd # set default values figures_fol = op.join(mmvt_utils.get_user_fol(), 'figures') mmvt_utils.make_dir(figures_fol) set_render_output_path(figures_fol) set_render_quality(60) code_fol = mmvt_utils.get_parent_fol(mmvt_utils.get_parent_fol()) os.chdir(code_fol) try: # _listener_in_queue, _listener__out_queue = start_listener() current_module = sys.modules[__name__] appearance_panel.init(current_module) show_hide_panel.init(current_module) selection_panel.init(current_module) coloring_panel.init(current_module) electrodes_panel.init(current_module) play_panel.init(current_module) filter_panel.init(current_module) freeview_panel.init(current_module, addon_prefs) render_panel.init(current_module) fMRI_panel.init(current_module) search_panel.init(current_module) transparency_panel.init(current_module) where_am_i_panel.init(current_module) data_panel.init(current_module) stim_panel.init(current_module) dti_panel.init(current_module) connections_panel.init(current_module) # listener_panel.init(current_module) vertex_data_panel.init(current_module) except: print('The classes are already registered!') print(traceback.format_exc()) show_activity()
def init(addon_prefs): global settings run_faulthandler() print('filepath: {}'.format(bpy.data.filepath)) set_play_to(get_max_time_steps()) mmvt_utils.view_all_in_graph_editor(bpy.context) bpy.context.window.screen = bpy.data.screens['Neuro'] bpy.context.scene.atlas = mmvt_utils.get_atlas() bpy.context.scene.python_cmd = addon_prefs.python_cmd # bpy.data.screens['Neuro'].areas[1].spaces[0].region_3d.view_rotation = [1, 0, 0, 0] make_all_fcurve_visible() # set default values figures_fol = op.join(mmvt_utils.get_user_fol(), 'figures') mmvt_utils.make_dir(figures_fol) set_render_output_path(figures_fol) set_render_quality(60) mmvt_utils.set_show_textured_solid() mmvt_utils.hide_relationship_lines() code_fol = mmvt_utils.get_parent_fol(mmvt_utils.get_parent_fol()) settings = mmvt_utils.read_config_ini() os.chdir(code_fol) bpy.context.scene.mmvt_initialized = True