CopickFeatures
copick.models.CopickFeatures
Encapsulates all data pertaining to a specific feature map, i.e. the Zarr-store for the feature map.
Attributes:
-
tomogram
(CopickTomogram
) –Reference to the tomogram this feature map belongs to.
-
meta
(CopickFeaturesMeta
) –Metadata for this feature map.
-
tomo_type
(str
) –Type of the tomogram that the features were computed on.
-
feature_type
(str
) –Type of the features contained.
__init__
Parameters:
-
tomogram
(CopickTomogram
) –Reference to the tomogram this feature map belongs to.
-
meta
(CopickFeaturesMeta
) –Metadata for this feature map.
zarr
Override to return the Zarr store for this feature set. Also needs to handle creating the store if it doesn't exist.
numpy
Returns the content of the Zarr-File for this feature map as a numpy array. Multiscale group and slices are supported.
Parameters:
-
zarr_group
(str
, default:'0'
) –Zarr group to access.
-
slices
(Tuple[slice, ...]
, default:None
) –Tuple of slices for the axes.
Returns:
-
ndarray
–np.ndarray: The object as a numpy array.
set_region
Set the content of the Zarr-File for this feature map from a numpy array. Multiscale group and slices are supported.
Parameters:
-
data
(ndarray
) –The data to set.
-
zarr_group
(str
, default:'0'
) –Zarr group to access.
-
slices
(Tuple[slice, ...]
, default:None
) –Tuple of slices for the axes.