Example #1
0
File: nodes.py Project: mgeplf/snap
def _get_population_name(h5_filepath):
    populations = libsonata.NodeStorage(h5_filepath).population_names
    if len(populations) != 1:
        raise BlueSnapError(
            "Only single-population node collections are supported (found: %d)" % len(populations)
        )
    return list(populations)[0]
Example #2
0
File: nodes.py Project: MFSY/snap
 def storage(self):
     """Access to the libsonata node storage."""
     return libsonata.NodeStorage(self._h5_filepath)