Module ImportFrom alias Import alias Import alias identifier ImportFrom alias alias ImportFrom alias Import alias identifier ImportFrom alias alias alias Import alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias ImportFrom alias alias alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list AttributeLoad NameLoad attr Call NameLoad keyword NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad TryExcept body Expr Call NameLoad NameLoad keyword Num handlers ExceptHandler type NameLoad body Pass orelse Expr Call NameLoad Call NameLoad GeneratorExp CompareIs SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Call NameLoad Call NameLoad GeneratorExp CompareIs SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Call NameLoad Call NameLoad GeneratorExp CompareIs SubscriptLoad NameLoad Index Str NameLoad comprehension NameStore NameLoad Expr Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str keyword Num Expr Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str For TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Expr Call NameLoad NameLoad NameLoad decorator_list Call NameLoad Str Str FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Delete SubscriptDel SubscriptLoad NameLoad Index Num Index Str Delete SubscriptDel SubscriptLoad NameLoad Index Num Index Str Assign NameStore Num Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Slice NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Slice NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str TryExcept body Expr Call NameLoad NameLoad keyword Num handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr ListLoad Num AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr ListLoad Num AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign SubscriptStore AttributeLoad NameLoad attr Index CompareGt AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Expr Call NameLoad CompareGt Call AttributeLoad NameLoad attr CompareLt AttributeLoad NameLoad attr Num Num Assign NameStore SubscriptLoad SubscriptLoad BinOpSub NameLoad NameLoad Slice SubscriptLoad SubscriptLoad NameLoad Index Str Index BinOpSub NameLoad Num ExtSlice Slice Slice SubscriptLoad SubscriptLoad NameLoad Index Str Index BinOpSub NameLoad Num Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num keyword Num decorator_list AttributeLoad NameLoad attr Call NameLoad Str Str FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Delete SubscriptDel SubscriptLoad NameLoad Index Num Index Str Delete SubscriptDel SubscriptLoad NameLoad Index Num Index Str Assign NameStore Num Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Slice NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Slice NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Num Expr Call NameLoad CompareNotEq BinOpMod NameLoad NameLoad Num Expr Call NameLoad NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Slice NameLoad Expr Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr ListLoad Num AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad For NameStore ListLoad NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index CompareGt AttributeLoad NameLoad attr Num Num Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad ExtSlice Slice Index NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad CompareGt Call AttributeLoad NameLoad attr CompareLt AttributeLoad SubscriptLoad NameLoad Index Num attr Num Num Assign NameStore BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Expr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num keyword Num decorator_list NameLoad AttributeLoad NameLoad attr Call NameLoad Str Str FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str TryFinally body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index NameLoad Expr Call NameLoad ListLoad Str Str Str NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index NameLoad Assign NameStore Call NameLoad Str NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str Expr Call NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str keyword Num keyword Num Expr Call NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str keyword Num keyword Num Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword NameLoad keyword NameLoad finalbody If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr AugAssignMult SubscriptStore NameLoad Index Str Num For TupleStore NameStore NameStore Call NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore Call NameLoad Str NameLoad keyword Num keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str Delete NameDel Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str Expr Call NameLoad NameLoad NameLoad Str NameLoad keyword Num keyword NameLoad keyword Str keyword NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad ListLoad Str Str Str Str NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Str NameLoad keyword Num keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str Delete NameDel Delete NameDel Expr Call NameLoad NameLoad NameLoad Str NameLoad keyword Num keyword ListLoad Num Num keyword NameLoad keyword NameLoad Expr Call NameLoad ListLoad Str Str Str Str NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore SubscriptLoad Call NameLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Str ListComp Call NameLoad comprehension NameStore Call NameLoad SubscriptLoad NameLoad Index Str For NameStore Call NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index SubscriptLoad NameLoad Index Num attr NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index SubscriptLoad NameLoad Index Num attr NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index SubscriptLoad NameLoad Index Num attr NameLoad Assign SubscriptStore NameLoad Index Str ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call AttributeLoad BinOpMult Call AttributeLoad NameLoad attr NameLoad Num BinOpSub NameLoad Num attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad BinOpAdd NameLoad Num BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr TupleLoad SubscriptLoad NameLoad Index Str Num For NameStore Call NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad AugAssignAdd SubscriptStore SubscriptLoad NameLoad Index Str ExtSlice Index NameLoad Slice SubscriptLoad SubscriptLoad NameLoad Index Str ExtSlice Index NameLoad Slice Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call NameLoad NameLoad SubscriptLoad NameLoad Index Str keyword Num keyword Num decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Str Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str Expr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad NameLoad attr Num Expr Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str keyword NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str keyword NameLoad Assign NameStore Call NameLoad Str NameLoad keyword Str keyword NameLoad keyword NameLoad Expr Call NameLoad CompareEq SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Expr Call NameLoad CompareEq SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Expr Call NameLoad NameLoad NameLoad Str NameLoad keyword Str keyword NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Expr Call NameLoad CompareEq Call AttributeLoad NameLoad attr Num Expr Call NameLoad CompareEq Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num Expr Call NameLoad CompareGtE Call AttributeLoad NameLoad attr Num Expr Call NameLoad CompareLtE Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num Expr Call NameLoad CompareEq Call AttributeLoad NameLoad attr Num Expr Call NameLoad CompareEq Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num Expr Call NameLoad CompareGtE Call AttributeLoad NameLoad attr Num Expr Call NameLoad CompareLtE Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad Str Num decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore ListLoad Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num Assign NameStore ListLoad Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Str NameLoad Expr Call NameLoad NameLoad NameLoad keyword Num decorator_list AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Str Expr Call NameLoad NameLoad NameLoad keyword Num decorator_list AttributeLoad NameLoad attr NameLoad Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Str Num decorator_list AttributeLoad NameLoad attr NameLoad Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Call NameLoad BinOpMult Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Assign NameStore Call NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad Str keyword Str keyword NameLoad Assign NameStore Call NameLoad Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str decorator_list AttributeLoad NameLoad attr NameLoad Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Call NameLoad BinOpMult Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad comprehension NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad Str keyword NameLoad keyword SubscriptLoad NameLoad Index Num keyword NameLoad keyword NameLoad Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num Num TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice Index Num Num Assign NameStore Dict Str Str NameLoad NameLoad Assign NameStore Call NameLoad Str keyword NameLoad keyword NameLoad keyword Str Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Expr Call NameLoad Call AttributeLoad CompareEq NameLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Str Assign NameStore BinOpAdd NameLoad NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str With Call AttributeLoad NameLoad attr keyword NameLoad body Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Num Assign NameStore BinOpAdd NameLoad NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Str decorator_list AttributeLoad NameLoad attr NameLoad Call NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad keyword Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad keyword Num keyword NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Slice BinOpSub Call NameLoad NameLoad Num comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num ListComp SubscriptLoad NameLoad Index NameLoad comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword Num keyword NameLoad Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad Num body Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Num Index TupleLoad Num Num Expr Call NameLoad CompareGt NameLoad Num NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad Assign AttributeStore NameLoad attr Str Delete SubscriptDel SubscriptLoad NameLoad Index Num Index Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Str Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Str Str Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Expr Str
N/A __future__ print_function N/A os N/A os.path op nose.tools assert_true assert_raises nose.plugins.skip SkipTest N/A numpy np numpy.testing assert_array_equal assert_allclose assert_equal N/A warnings mne.datasets testing mne read_source_spaces vertex_to_mni write_source_spaces setup_source_space setup_volume_source_space add_source_space_distances read_bem_surfaces morph_source_spaces SourceEstimate mne.utils _TempDir requires_fs_or_nibabel requires_nibabel requires_freesurfer run_subprocess slow_test requires_mne requires_version run_tests_if_main mne.surface _accumulate_normals _triangle_neighbors mne.source_space _get_mri_header _get_mgz_header mne.externals.six.moves zip mne.source_space get_volume_labels_from_aseg SourceSpaces _compare_source_spaces mne.tests.common assert_naming mne.io.constants FIFF N/A N/A N/A warnings simplefilter always N/A data_path N/A N/A testing data_path download False N/A subjects_dir N/A N/A op join data_path subjects N/A fname_mri N/A N/A op join data_path subjects sample mri T1.mgz N/A fname N/A N/A op join subjects_dir sample bem sample-oct-6-src.fif N/A fname_vol N/A N/A op join subjects_dir sample bem sample-volume-7mm-src.fif N/A fname_bem N/A N/A op join data_path subjects sample bem sample-1280-bem.fif N/A fname_fs N/A N/A op join subjects_dir fsaverage bem fsaverage-ico-5-src.fif N/A fname_morph N/A N/A op join subjects_dir sample bem sample-fsaverage-ico-5-src.fif N/A base_dir N/A N/A op join N/A N/A op dirname __file__ .. io tests data N/A fname_small N/A N/A op join base_dir small-src.fif.gz N/A rng N/A N/A N/A np random RandomState 0 test_mgz_header N/A N/A N/A N/A N/A Test MGZ header reading N/A header N/A _get_mgz_header fname_mri N/A mri_hdr N/A _get_mri_header fname_mri N/A N/A assert_allclose N/A N/A mri_hdr get_data_shape N/A header N/A dims N/A N/A assert_allclose N/A N/A mri_hdr get_vox2ras_tkr N/A header N/A vox2ras_tkr N/A N/A assert_allclose N/A N/A mri_hdr get_ras2vox N/A header N/A ras2vox N/A N/A testing requires_testing_data N/A requires_nibabel vox2ras_tkr True test_add_patch_info N/A N/A N/A N/A N/A Test adding patch info to source space N/A src N/A read_source_spaces fname_small N/A src_new N/A read_source_spaces fname_small N/A s src_new N/A N/A N/A s N/A nearest None N/A N/A s N/A nearest_dist None N/A N/A s N/A pinfo None N/A N/A N/A N/A add_source_space_distances src_new dist_limit 1e-05 N/A N/A N/A RuntimeError N/A N/A N/A N/A N/A assert_true N/A all N/A N/A N/A s N/A nearest None N/A s src_new N/A N/A assert_true N/A all N/A N/A N/A s N/A nearest_dist None N/A s src_new N/A N/A assert_true N/A all N/A N/A N/A s N/A pinfo None N/A s src_new N/A N/A add_source_space_distances src_new N/A N/A s1 s2 N/A zip src src_new N/A N/A N/A assert_array_equal N/A s1 N/A nearest N/A s2 N/A nearest N/A N/A assert_allclose N/A s1 N/A nearest_dist N/A s2 N/A nearest_dist atol 1e-07 N/A N/A assert_equal N/A len N/A s1 N/A pinfo N/A len N/A s2 N/A pinfo N/A N/A p1 p2 N/A zip N/A s1 N/A pinfo N/A s2 N/A pinfo N/A N/A N/A assert_array_equal p1 p2 N/A N/A requires_version scipy 0.11 test_add_source_space_distances_limited N/A N/A N/A N/A N/A Test adding distances to source space with a dist_limit N/A tempdir N/A _TempDir N/A src N/A read_source_spaces fname N/A src_new N/A read_source_spaces fname N/A N/A N/A src_new N/A 0 N/A dist N/A N/A N/A src_new N/A 1 N/A dist N/A n_do 200 N/A N/A N/A src_new N/A 0 N/A vertno N/A N/A N/A N/A N/A src_new N/A 0 N/A vertno N/A n_do copy N/A N/A N/A src_new N/A 1 N/A vertno N/A N/A N/A N/A N/A src_new N/A 1 N/A vertno N/A n_do copy N/A out_name N/A N/A op join tempdir temp-src.fif N/A N/A N/A N/A add_source_space_distances src_new dist_limit 0.007 N/A N/A N/A RuntimeError N/A N/A N/A SkipTest dist_limit requires scipy > 0.13 N/A N/A write_source_spaces out_name src_new N/A src_new N/A read_source_spaces out_name N/A N/A so sn N/A zip src src_new N/A N/A N/A assert_array_equal N/A so N/A dist_limit N/A N/A np array N/A -0.007 N/A np float32 N/A N/A assert_array_equal N/A sn N/A dist_limit N/A N/A np array N/A 0.007 N/A np float32 N/A do N/A so N/A dist N/A dn N/A sn N/A dist N/A N/A N/A do data N/A N/A N/A do data 0.007 0 N/A N/A N/A do eliminate_zeros N/A N/A assert_true N/A N/A N/A np sum N/A N/A do data 0.007 400 N/A d N/A N/A N/A do dn N/A N/A N/A sn N/A vertno N/A N/A n_do 1 N/A N/A N/A N/A N/A sn N/A vertno N/A N/A n_do 1 N/A N/A assert_allclose N/A N/A np zeros_like N/A d data N/A d data rtol 0 atol 1e-06 N/A N/A testing requires_testing_data N/A requires_version scipy 0.11 test_add_source_space_distances N/A N/A N/A N/A N/A Test adding distances to source space N/A tempdir N/A _TempDir N/A src N/A read_source_spaces fname N/A src_new N/A read_source_spaces fname N/A N/A N/A src_new N/A 0 N/A dist N/A N/A N/A src_new N/A 1 N/A dist N/A n_do 19 N/A N/A N/A src_new N/A 0 N/A vertno N/A N/A N/A N/A N/A src_new N/A 0 N/A vertno N/A n_do copy N/A N/A N/A src_new N/A 1 N/A vertno N/A N/A N/A N/A N/A src_new N/A 1 N/A vertno N/A n_do copy N/A out_name N/A N/A op join tempdir temp-src.fif N/A n_jobs 2 N/A N/A assert_true N/A N/A n_do n_jobs 0 N/A N/A add_source_space_distances src_new n_jobs n_jobs N/A N/A write_source_spaces out_name src_new N/A src_new N/A read_source_spaces out_name N/A N/A so sn N/A zip src src_new N/A N/A v N/A N/A so N/A vertno N/A n_do N/A N/A assert_array_equal N/A so N/A dist_limit N/A N/A np array N/A -0.007 N/A np float32 N/A N/A assert_array_equal N/A sn N/A dist_limit N/A N/A np array N/A N/A np inf N/A np float32 N/A do N/A so N/A dist N/A dn N/A sn N/A dist N/A ds N/A list N/A d N/A do dn N/A N/A N/A N/A d data N/A N/A N/A d data 0.007 0 N/A d N/A N/A d N/A v N/A N/A N/A v N/A N/A N/A d eliminate_zeros N/A N/A N/A ds append d N/A N/A assert_true N/A N/A N/A np sum N/A N/A N/A ds N/A 0 data 0.007 10 N/A d N/A N/A ds N/A 0 N/A ds N/A 1 N/A N/A assert_allclose N/A N/A np zeros_like N/A d data N/A d data rtol 0 atol 1e-09 N/A slow_test N/A testing requires_testing_data N/A requires_version scipy 0.11 test_discrete_source_space N/A N/A N/A N/A N/A Test setting up (and reading/writing) discrete source spaces
     N/A tempdir N/A _TempDir N/A src N/A read_source_spaces fname N/A v N/A N/A src N/A 0 N/A vertno N/A temp_name N/A N/A op join tempdir temp-src.fif N/A N/A N/A temp_pos N/A N/A op join tempdir temp-pos.txt N/A N/A N/A np savetxt temp_pos N/A N/A np c_ N/A N/A N/A N/A N/A src N/A 0 N/A rr N/A v N/A N/A N/A src N/A 0 N/A nn N/A v N/A N/A run_subprocess N/A mne_volume_source_space --meters --pos temp_pos --src temp_name N/A src_c N/A read_source_spaces temp_name N/A pos_dict N/A dict rr N/A N/A N/A src N/A 0 N/A rr N/A v nn N/A N/A N/A src N/A 0 N/A nn N/A v N/A src_new N/A setup_volume_source_space sample None pos pos_dict subjects_dir subjects_dir N/A N/A _compare_source_spaces src_c src_new mode approx N/A N/A assert_allclose N/A N/A N/A src N/A 0 N/A rr N/A v N/A N/A src_new N/A 0 N/A rr rtol 0.001 atol 1e-06 N/A N/A assert_allclose N/A N/A N/A src N/A 0 N/A nn N/A v N/A N/A src_new N/A 0 N/A nn rtol 0.001 atol 1e-06 N/A N/A write_source_spaces temp_name src_c N/A src_c2 N/A read_source_spaces temp_name N/A N/A _compare_source_spaces src_c src_c2 N/A N/A assert_raises ValueError setup_volume_source_space sample pos pos_dict mri fname_mri N/A N/A N/A N/A op isfile temp_name N/A N/A N/A N/A os remove temp_name N/A N/A testing requires_testing_data requires_mne test_volume_source_space N/A N/A N/A N/A N/A Test setting up volume source spaces
     N/A tempdir N/A _TempDir N/A src N/A read_source_spaces fname_vol N/A temp_name N/A N/A op join tempdir temp-src.fif N/A surf N/A read_bem_surfaces fname_bem s_id N/A FIFF FIFFV_BEM_SURF_ID_BRAIN N/A N/A surf N/A rr 1000.0 N/A N/A bem surf N/A zip N/A fname_bem None N/A None surf N/A N/A src_new N/A setup_volume_source_space sample temp_name pos 7.0 bem bem surface surf mri fname_mri subjects_dir subjects_dir N/A N/A _compare_source_spaces src src_new mode approx N/A src_new N/A src_new N/A read_source_spaces temp_name N/A N/A _compare_source_spaces src src_new mode approx N/A N/A assert_raises IOError setup_volume_source_space sample temp_name pos 7.0 bem None surface foo mri fname_mri subjects_dir subjects_dir N/A slow_test N/A testing requires_testing_data test_other_volume_source_spaces N/A N/A N/A N/A N/A Test setting up other volume source spaces N/A tempdir N/A _TempDir N/A temp_name N/A N/A op join tempdir temp-src.fif N/A N/A run_subprocess N/A mne_volume_source_space --grid 7.0 --src temp_name --mri fname_mri N/A src N/A read_source_spaces temp_name N/A src_new N/A setup_volume_source_space sample temp_name pos 7.0 mri fname_mri subjects_dir subjects_dir N/A N/A _compare_source_spaces src src_new mode approx N/A src N/A src_new N/A N/A assert_raises ValueError setup_volume_source_space sample temp_name pos 7.0 sphere N/A 1.0 1.0 mri fname_mri subjects_dir subjects_dir N/A N/A run_subprocess N/A mne_volume_source_space --grid 7.0 --src temp_name N/A N/A assert_raises ValueError read_source_spaces temp_name N/A N/A testing requires_testing_data requires_mne test_triangle_neighbors N/A N/A N/A N/A N/A Test efficient vertex neighboring triangles for surfaces N/A this N/A N/A read_source_spaces fname N/A 0 N/A N/A this N/A neighbor_tri N/A N/A list N/A _ N/A range N/A this N/A np N/A p N/A range N/A this N/A ntri N/A N/A verts N/A N/A this N/A tris N/A p N/A N/A N/A N/A N/A this N/A neighbor_tri N/A N/A verts N/A 0 append p N/A N/A N/A N/A N/A this N/A neighbor_tri N/A N/A verts N/A 1 append p N/A N/A N/A N/A N/A this N/A neighbor_tri N/A N/A verts N/A 2 append p N/A N/A this N/A neighbor_tri N/A N/A N/A np array nb int N/A nb N/A this N/A neighbor_tri N/A neighbor_tri N/A _triangle_neighbors N/A this N/A tris N/A this N/A np N/A N/A assert_true N/A N/A N/A np array_equal nt1 nt2 N/A N/A nt1 nt2 N/A zip neighbor_tri N/A this N/A neighbor_tri N/A N/A testing requires_testing_data test_accumulate_normals N/A N/A N/A N/A N/A Test efficient normal accumulation for surfaces N/A n_pts N/A int 160000.0 N/A n_tris N/A int 320000.0 N/A tris N/A N/A N/A N/A N/A rng rand n_tris 1 N/A n_pts 2 astype int N/A tris N/A N/A np c_ N/A N/A tris N/A tris 1 N/A tris 2 N/A tri_nn N/A N/A rng rand n_tris 3 N/A this N/A dict tris tris np n_pts ntri n_tris tri_nn tri_nn N/A N/A this N/A nn N/A N/A np zeros N/A N/A this N/A np 3 N/A p N/A range N/A this N/A ntri N/A N/A verts N/A N/A this N/A tris N/A p N/A N/A N/A this N/A nn N/A N/A verts N/A N/A N/A this N/A tri_nn N/A N/A p N/A N/A nn N/A _accumulate_normals N/A this N/A tris N/A this N/A tri_nn N/A this N/A np N/A N/A assert_allclose nn N/A this N/A nn rtol 1e-07 atol 1e-07 N/A test_setup_source_space N/A N/A N/A N/A N/A Test setting up ico, oct, and all source spaces
     N/A tempdir N/A _TempDir N/A fname_ico N/A N/A op join data_path subjects fsaverage bem fsaverage-ico-5-src.fif N/A N/A assert_raises ValueError setup_source_space sample spacing oct add_dist False N/A N/A assert_raises ValueError setup_source_space sample spacing octo add_dist False N/A N/A assert_raises ValueError setup_source_space sample spacing oct6e add_dist False N/A N/A assert_raises ValueError setup_source_space sample spacing 7emm add_dist False N/A N/A assert_raises ValueError setup_source_space sample spacing alls add_dist False N/A N/A assert_raises IOError setup_source_space sample spacing oct6 subjects_dir subjects_dir add_dist False N/A src N/A read_source_spaces fname_ico N/A temp_name N/A N/A op join tempdir temp-src.fif N/A N/A N/A warnings catch_warnings record True N/A N/A N/A N/A warnings simplefilter always N/A src_new N/A setup_source_space fsaverage temp_name spacing ico5 subjects_dir subjects_dir add_dist False overwrite True N/A N/A _compare_source_spaces src src_new mode approx N/A N/A assert_array_equal N/A N/A src N/A 0 N/A vertno N/A N/A np arange 10242 N/A N/A assert_array_equal N/A N/A src N/A 1 N/A vertno N/A N/A np arange 10242 N/A src N/A read_source_spaces fname N/A temp_name N/A N/A op join tempdir temp-src.fif N/A N/A N/A warnings catch_warnings record True N/A N/A N/A N/A warnings simplefilter always N/A src_new N/A setup_source_space sample temp_name spacing oct6 subjects_dir subjects_dir overwrite True add_dist False N/A N/A _compare_source_spaces src src_new mode approx nearest False N/A src_new N/A read_source_spaces temp_name N/A N/A _compare_source_spaces src src_new mode approx nearest False N/A src_new N/A setup_source_space sample None spacing all subjects_dir subjects_dir add_dist False N/A N/A assert_true N/A N/A N/A src_new N/A 0 N/A nuse N/A len N/A N/A src_new N/A 0 N/A rr N/A N/A assert_true N/A N/A N/A src_new N/A 1 N/A nuse N/A len N/A N/A src_new N/A 1 N/A rr N/A N/A assert_raises RuntimeError setup_source_space sample None spacing ico6 subjects_dir subjects_dir add_dist False N/A slow_test N/A testing requires_testing_data test_read_source_spaces N/A N/A N/A N/A N/A Test reading of source space meshes
     N/A src N/A read_source_spaces fname patch_stats True N/A lh_points N/A N/A src N/A 0 N/A rr N/A lh_faces N/A N/A src N/A 0 N/A tris N/A lh_use_faces N/A N/A src N/A 0 N/A use_tris N/A rh_points N/A N/A src N/A 1 N/A rr N/A rh_faces N/A N/A src N/A 1 N/A tris N/A rh_use_faces N/A N/A src N/A 1 N/A use_tris N/A N/A assert_true N/A N/A N/A lh_faces min 0 N/A N/A assert_true N/A N/A N/A lh_faces max N/A N/A N/A lh_points shape N/A 0 1 N/A N/A assert_true N/A N/A N/A lh_use_faces min 0 N/A N/A assert_true N/A N/A N/A lh_use_faces max N/A N/A N/A lh_points shape N/A 0 1 N/A N/A assert_true N/A N/A N/A rh_faces min 0 N/A N/A assert_true N/A N/A N/A rh_faces max N/A N/A N/A rh_points shape N/A 0 1 N/A N/A assert_true N/A N/A N/A rh_use_faces min 0 N/A N/A assert_true N/A N/A N/A rh_use_faces max N/A N/A N/A rh_points shape N/A 0 1 N/A N/A testing requires_testing_data test_write_source_space N/A N/A N/A N/A N/A Test reading and writing of source spaces
     N/A tempdir N/A _TempDir N/A src0 N/A read_source_spaces fname patch_stats False N/A N/A write_source_spaces N/A N/A op join tempdir tmp-src.fif src0 N/A src1 N/A read_source_spaces N/A N/A op join tempdir tmp-src.fif patch_stats False N/A N/A _compare_source_spaces src0 src1 N/A N/A N/A warnings catch_warnings record True w N/A N/A N/A N/A warnings simplefilter always N/A src_badname N/A N/A op join tempdir test-bad-name.fif.gz N/A N/A write_source_spaces src_badname src0 N/A N/A read_source_spaces src_badname N/A N/A assert_naming w test_source_space.py 2 N/A slow_test N/A testing requires_testing_data test_vertex_to_mni N/A N/A N/A N/A N/A Test conversion of vertices to MNI coordinates
     N/A vertices N/A 100960 7620 150549 96761 N/A coords N/A N/A np array N/A N/A -60.86 -11.18 -3.19 N/A -36.46 -93.18 -2.36 N/A -38.0 50.08 -10.61 N/A 47.14 8.01 46.93 N/A hemis N/A 0 0 0 1 N/A coords_2 N/A vertex_to_mni vertices hemis sample subjects_dir N/A N/A assert_allclose coords coords_2 atol 1.0 N/A N/A testing requires_testing_data requires_fs_or_nibabel test_vertex_to_mni_fs_nibabel N/A N/A N/A N/A N/A Test equivalence of vert_to_mni for nibabel and freesurfer
     N/A n_check 1000 N/A subject sample N/A vertices N/A N/A rng randint 0 100000 n_check N/A hemis N/A N/A rng randint 0 1 n_check N/A coords N/A vertex_to_mni vertices hemis subject subjects_dir nibabel N/A coords_2 N/A vertex_to_mni vertices hemis subject subjects_dir freesurfer N/A N/A assert_allclose coords coords_2 atol 0.1 N/A N/A testing requires_testing_data requires_freesurfer N/A requires_nibabel test_get_volume_label_names N/A N/A N/A N/A N/A Test reading volume label names
     N/A aseg_fname N/A N/A op join subjects_dir sample mri aseg.mgz N/A label_names N/A get_volume_labels_from_aseg aseg_fname N/A N/A assert_equal N/A N/A label_names count Brain-Stem 1 N/A N/A testing requires_testing_data requires_freesurfer N/A requires_nibabel test_source_space_from_label N/A N/A N/A N/A N/A Test generating a source space from volume label
     N/A tempdir N/A _TempDir N/A aseg_fname N/A N/A op join subjects_dir sample mri aseg.mgz N/A label_names N/A get_volume_labels_from_aseg aseg_fname N/A volume_label N/A label_names N/A N/A int N/A N/A N/A N/A np random rand N/A len label_names N/A pos N/A dict N/A N/A assert_raises ValueError setup_volume_source_space sample pos pos volume_label volume_label mri aseg_fname N/A N/A assert_raises RuntimeError setup_volume_source_space sample mri None volume_label volume_label N/A N/A assert_raises ValueError setup_volume_source_space sample volume_label Hello World! mri aseg_fname N/A src N/A setup_volume_source_space sample subjects_dir subjects_dir volume_label volume_label mri aseg_fname add_interpolator False N/A N/A assert_equal volume_label N/A N/A src N/A 0 N/A seg_name N/A out_name N/A N/A op join tempdir temp-src.fif N/A N/A write_source_spaces out_name src N/A src_from_file N/A read_source_spaces out_name N/A N/A _compare_source_spaces src src_from_file mode approx N/A N/A testing requires_testing_data requires_freesurfer N/A requires_nibabel test_combine_source_spaces N/A N/A N/A N/A N/A Test combining source spaces
     N/A tempdir N/A _TempDir N/A aseg_fname N/A N/A op join subjects_dir sample mri aseg.mgz N/A label_names N/A get_volume_labels_from_aseg aseg_fname N/A volume_labels N/A N/A label_names N/A N/A int N/A N/A N/A N/A np random rand N/A len label_names N/A ii N/A range 2 N/A srf N/A read_source_spaces fname patch_stats False N/A vol N/A setup_volume_source_space sample subjects_dir subjects_dir volume_label N/A volume_labels N/A 0 mri aseg_fname add_interpolator False N/A rr N/A N/A N/A rng randint 0 20 N/A 100 3 0.001 N/A nn N/A N/A np zeros N/A rr shape N/A N/A nn N/A N/A N/A -1 1 N/A pos N/A rr nn rr nn N/A disc N/A setup_volume_source_space sample subjects_dir subjects_dir pos pos verbose error N/A src N/A N/A srf vol disc N/A N/A assert_equal N/A type src SourceSpaces N/A N/A assert_equal N/A len src 4 N/A src_out_name N/A N/A op join tempdir temp-src.fif N/A N/A N/A src save src_out_name N/A src_from_file N/A read_source_spaces src_out_name N/A N/A _compare_source_spaces src src_from_file mode approx N/A coord_frames N/A N/A np array N/A N/A s N/A coord_frame N/A s src N/A N/A assert_true N/A N/A N/A coord_frames N/A FIFF FIFFV_COORD_MRI all N/A image_fname N/A N/A op join tempdir temp-image.mgz N/A N/A assert_raises ValueError N/A srf export_volume image_fname verbose error N/A disc2 N/A N/A disc copy N/A N/A N/A disc2 N/A 0 N/A type kitty N/A src_unrecognized N/A src disc2 N/A N/A assert_raises ValueError N/A src_unrecognized export_volume image_fname verbose error N/A bad_image_fname N/A N/A op join tempdir temp-image.png N/A N/A N/A warnings catch_warnings record True N/A N/A N/A assert_raises ValueError N/A src export_volume bad_image_fname verbose error N/A disc3 N/A N/A disc copy N/A N/A N/A disc3 N/A 0 N/A coord_frame 10 N/A src_mixed_coord N/A src disc3 N/A N/A assert_raises ValueError N/A src_mixed_coord export_volume image_fname verbose error N/A N/A testing requires_testing_data requires_freesurfer N/A requires_nibabel test_morph_source_spaces N/A N/A N/A N/A N/A Test morphing of source spaces
     N/A src N/A read_source_spaces fname_fs N/A src_morph N/A read_source_spaces fname_morph N/A src_morph_py N/A morph_source_spaces src sample subjects_dir subjects_dir N/A N/A _compare_source_spaces src_morph src_morph_py mode approx N/A N/A testing requires_testing_data test_morphed_source_space_return N/A N/A N/A N/A N/A Test returning a morphed source space to the original subject N/A data N/A N/A rng randn 20484 1 N/A N/A tmin tstep N/A 0 1.0 N/A src_fs N/A read_source_spaces fname_fs N/A stc_fs N/A SourceEstimate data N/A N/A s N/A vertno N/A s src_fs tmin tstep fsaverage N/A src_morph N/A morph_source_spaces src_fs sample subjects_dir subjects_dir N/A stc_morph N/A N/A stc_fs morph sample N/A N/A s N/A vertno N/A s src_morph smooth 1 subjects_dir subjects_dir N/A keeps N/A N/A N/A np sort N/A N/A N/A rng permutation N/A N/A np arange N/A len v N/A N/A N/A len v 10 N/A v N/A stc_morph vertices N/A stc_morph N/A SourceEstimate N/A N/A np concatenate N/A N/A N/A stc_morph lh_data N/A N/A keeps N/A 0 N/A N/A stc_morph rh_data N/A N/A keeps N/A 1 N/A N/A v N/A k N/A N/A v k N/A zip N/A stc_morph vertices keeps tmin tstep sample N/A stc_morph_return N/A N/A stc_morph to_original_src src_fs subjects_dir subjects_dir N/A stc_morph_morph N/A N/A stc_morph morph fsaverage N/A stc_morph_return vertices smooth 1 subjects_dir subjects_dir N/A N/A assert_equal N/A stc_morph_return subject N/A stc_morph_morph subject N/A ii N/A range 2 N/A N/A N/A assert_array_equal N/A N/A stc_morph_return vertices N/A ii N/A N/A stc_morph_morph vertices N/A ii N/A corr N/A N/A N/A np corrcoef N/A N/A stc_morph_return data N/A N/A N/A 0 N/A N/A stc_morph_morph data N/A N/A N/A 0 N/A N/A 0 1 N/A N/A assert_true N/A corr 0.99 corr N/A N/A stc_morph subject None N/A N/A assert_raises ValueError N/A stc_morph to_original_src src_fs subject_orig fsaverage subjects_dir subjects_dir N/A N/A stc_morph subject sample N/A N/A N/A src_fs N/A 0 N/A subject_his_id N/A N/A assert_raises ValueError N/A stc_morph to_original_src src_fs subjects_dir subjects_dir N/A N/A N/A src_fs N/A 0 N/A subject_his_id fsaverage N/A N/A assert_raises ValueError N/A stc_morph to_original_src src_fs subject_orig foo subjects_dir subjects_dir N/A N/A N/A src_fs N/A 0 N/A subject_his_id sample N/A src N/A read_source_spaces fname N/A N/A assert_raises RuntimeError N/A stc_morph to_original_src src subjects_dir subjects_dir N/A slow_test N/A testing requires_testing_data N/A N/A run_tests_if_main N/A 
# -*- coding: utf-8 -*-

import os
import numpy as np
import mne

data_path = mne.datasets.sample.data_path()
src = mne.setup_source_space('sample', fname=None, spacing='oct5')
hemis = ['lh', 'rh']
fnames = [data_path + '/subjects/sample/surf/%s.decimated' % h for h in hemis]

vs = list()
for s, fname in zip(src, fnames):
    coords = s['rr'][s['vertno']]
    vs.append(s['vertno'])
    idx = -1 * np.ones(len(s['rr']))
    idx[s['vertno']] = np.arange(s['nuse'])
    faces = s['use_tris']
    faces = idx[faces]
    mne.write_surface(fname, coords, faces)

# we need to move sphere surfaces
spheres = [data_path + '/subjects/sample/surf/%s.sphere' % h for h in hemis]
for s in spheres:
    os.rename(s, s + '.bak')
try:
    for s, v in zip(spheres, vs):
        coords, faces = mne.read_surface(s + '.bak')
        coords = coords[v]
        mne.write_surface(s, coords, faces)
    src = mne.setup_source_space('sample', fname=None, spacing='oct4',
                                 surface='decimated')
finally:
    for s in spheres:
        os.rename(s + '.bak', s)

fname = 'small-src.fif'
fname_gz = fname + '.gz'
mne.write_source_spaces(fname, src)
mne.utils.run_subprocess(['mne_add_patch_info', '--src', fname,
                          '--srcp', fname])
mne.write_source_spaces(fname_gz, mne.read_source_spaces(fname))
