dacapo.experiments.datasplits.datasets.arrays.dummy_array
Classes
This is just a dummy array for testing. It has a shape of (100, 50, 50) and is filled with zeros. |
Module Contents
- class dacapo.experiments.datasplits.datasets.arrays.dummy_array.DummyArray(array_config)
This is just a dummy array for testing. It has a shape of (100, 50, 50) and is filled with zeros.
- array_config
The config object for the array
- Type:
- __getitem__()
Returns the intensities normalized to the range (0, 1)
Notes
The array_config must be an ArrayConfig object. The min and max values are used to normalize the intensities. All intensities are converted to float32.
- property attrs
- Returns the attributes of the source array
- Returns:
The attributes of the source array
- Return type:
dict
- Raises:
ValueError – If the attributes is not a dictionary
Examples
>>> intensities_array.attrs {'resolution': (1.0, 1.0, 1.0), 'unit': 'micrometer'}
- property axes
- Returns the axes of the source array
- Returns:
The axes of the source array
- Return type:
str
- Raises:
ValueError – If the axes is not a string
Examples
>>> intensities_array.axes 'zyx'
Notes
The axes are the same as the source array
- property dims
- Returns the number of dimensions of the source array
- Returns:
The number of dimensions of the source array
- Return type:
int
- Raises:
ValueError – If the dims is not an integer
Examples
>>> intensities_array.dims 3
Notes
The dims are the same as the source array
- property voxel_size
- Returns the voxel size of the source array
- Returns:
The voxel size of the source array
- Return type:
Coordinate
- Raises:
ValueError – If the voxel size is not a Coordinate object
Examples
>>> intensities_array.voxel_size Coordinate(x=1.0, y=1.0, z=1.0)
Notes
The voxel size is the same as the source array
- property roi
- Returns the region of interest of the source array
- Returns:
The region of interest of the source array
- Return type:
Roi
- Raises:
ValueError – If the roi is not a Roi object
Examples
>>> intensities_array.roi Roi(offset=(0, 0, 0), shape=(100, 100, 100))
Notes
The roi is the same as the source array
- property writable: bool
Returns whether the array is writable
- Returns:
Whether the array is writable
- Return type:
bool
Examples
>>> intensities_array.writable True
Notes
The array is always writable
- property data
- Returns the data of the source array
- Returns:
The data of the source array
- Return type:
np.ndarray
- Raises:
ValueError – If the data is not a numpy array
Examples
>>> intensities_array.data array([[[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]],
Notes
The data is the same as the source array
- property dtype
- Returns the data type of the array
- Returns:
The data type of the array
- Return type:
type
- Raises:
ValueError – If the data type is not a type
Examples
>>> intensities_array.dtype numpy.float32
Notes
The data type is the same as the source array
- property num_channels
- Returns the number of channels in the source array
- Returns:
The number of channels in the source array
- Return type:
int
- Raises:
ValueError – If the number of channels is not an integer
Examples
>>> intensities_array.num_channels 1
Notes
The number of channels is the same as the source array