PYME.IO.DataSources.ArrayDataSource module¶
- class PYME.IO.DataSources.ArrayDataSource.ArrayDataSource(data, dimOrder='XYTC', dim_1_is_z=False)¶
Bases:
BaseDataSource
- property dtype¶
- getNumSlices()¶
Return the number of 2D slices. This is the product of the dimensions > 2
- getSlice(ind)¶
Return the nth 2D slice of the DataSource where the higher dimensions have been flattened.
equivalent to indexing contiguous 4D data with data[:,:,ind%data.shape[2], ind/data.shape[3]]
e.g. for a 100x100x50x2 DataSource, getSlice(20) would return data[:,:,20,0].squeeze() whereas getSlice(75) would return data[:,:,25, 1].squeeze()
- getSliceShape()¶
Return the 2D shape of a slice
- property ndim¶
- property shape¶
The 4D shape of the datasource
- class PYME.IO.DataSources.ArrayDataSource.XYZTCArrayDataSource(data, dimOrder='XYZTC')¶
Bases:
BaseDataSource
- property dtype¶
- getNumSlices()¶
Return the number of 2D slices. This is the product of the dimensions > 2
- getSlice(ind)¶
Return the nth 2D slice of the DataSource where the higher dimensions have been flattened.
equivalent to indexing contiguous 4D data with data[:,:,ind%data.shape[2], ind/data.shape[3]]
e.g. for a 100x100x50x2 DataSource, getSlice(20) would return data[:,:,20,0].squeeze() whereas getSlice(75) would return data[:,:,25, 1].squeeze()
- getSliceShape()¶
Return the 2D shape of a slice
- property ndim¶
- property shape¶
The 4D shape of the datasource
- PYME.IO.DataSources.ArrayDataSource.atleast_nd(a, n)¶