コード例 #1
0
ファイル: classes.py プロジェクト: souravsingh/scona
    def anatomical_matches(self,
                           nodal_keys=anatomical_node_attributes(),
                           graph_keys=anatomical_graph_attributes()):
        '''
        Checks that all graphs in GraphBundle are pairwise anatomical matches
        as defined in :func:`is_anatomical_match`.

        Parameters
        ----------
        nodal_keys : list of str, optional
        graph_keys : list of str, optional

        Returns
        -------
        bool
            `True` if all graphs are anatomically matched, `False` otherwise.

        See Also
        --------
        :func:`is_anatomical_match`
        :func:`BrainNetwork.is_nodal_match`
        '''
        H = list(self.values())[0]
        return (False not in [
            is_anatomical_match(H,
                                G,
                                nodal_keys=nodal_keys,
                                graph_keys=graph_keys) for G in self.values()
        ])
コード例 #2
0
 def check_anat_matches_with_hats(self):
     assert mkg.is_anatomical_match(self.H, self.R)
コード例 #3
0
 def check_anatomical_matches(self):
     assert mkg.is_anatomical_match(self.L, self.H)
     assert not mkg.is_anatomical_match(self.G, self.H)