Additional functions: the functions module
Additional functions for PyAstraToolbox.
- 
astra.functions.add_noise_to_sino(sinogram_in, I0)[source]
- Adds Poisson noise to a sinogram. - 
| Parameters: | 
sinogram_in (numpy.ndarray) – Sinogram to add noise to.I0 (float) – Background intensity. Lower values lead to higher noise. | 
|---|
 | Returns: | numpy.ndarray – the sinogram with added noise. | 
|---|
 
 
- 
astra.functions.clear()[source]
- Clears all used memory of the ASTRA Toolbox. - 
- Note - This is irreversible. 
 
- 
astra.functions.data_op(op, data, scalar, gpu_core, mask=None)[source]
- Perform data operation on data. - 
| Parameters: | 
op – Operation to perform.data – Data to perform operation on.scalar – Scalar argument to data operation.gpu_core – GPU core to perform operation on.mask – Optional mask. | 
|---|
 
 
- 
astra.functions.geom_2vec(proj_geom)
- Returns a vector-based projection geometry from a basic projection geometry. - 
| Parameters: | proj_geom (dict) – Projection geometry to convert | 
|---|
 
 
- 
astra.functions.geom_size(geom, dim=None)[source]
- Returns the size of a volume or sinogram, based on the projection or volume geometry. - 
| Parameters: | 
geom – Geometry to calculate size fromdim (int) – Optional axis index to return | 
|---|