AllenInstitute / mouse_connectivity_models

Python package providing mesoscale connectivity models for mouse.
http://mouse-connectivity-models.readthedocs.io/en/latest/
Other
39 stars 14 forks source link

RegionalizedModel.from_voxel_array() method gives ValueError #29

Closed damingli09 closed 5 years ago

damingli09 commented 5 years ago

Below is the code that is used to construct a 43 by 43 isocortex connectivity matrix using the spatial model. However, it raises a ValueError as shown below.

cache = VoxelModelCache()

voxel_array, source_mask, target_mask = cache.get_voxel_connectivity_array()

region_ids = np.load('isocortex_id_list.npy') # the 43 isocortex ROIs id here

source_key = source_mask.get_key(region_ids, hemisphere_id=2)

target_key = source_mask.get_key(region_ids, hemisphere_id=2)

regional_model = RegionalizedModel.from_voxel_array(voxel_array, source_key, target_key) # ValueError here: columns of nodes and elements in target_key must be of equal size regional_model.normalized_connection_density

NCD = regional_model.normalized_connection_density

kamdh commented 5 years ago

Hi @damingli91 if this is still an issue, can you please upload a full script (all imports, etc) as well as any supporting files so we can run it. Thanks!