Skip to content

Manual Fitting

mineralcube_creation ยค

Create a 3D numpy array (X and Y are the dimensions of the sample and Z dimension is the number of minerals wanted for the classification). Minerals are defined by the columns in the mask table. The 2D array created per mineral depends on the threshold specified in the mask table. If one value is given, it corresponds to the minimum threshold to be in the mineral. If two values separated by a dash, it corresponds to the range of values for this element to be in the mineral (threshold are exclusive).

Each mineral array is binary with 1 where the pixel is in the mineral and NaN (not assigned value) where the pixel is not in the mineral.

The function also creates a dictionnary containing the Z position of the minerals in the 3D array created.

Parameters:

Name Type Description Default
cube MultiCube

Marcia DataCube Object to be classify.

required
mask Mask

Marcia Mask Object containing thresholds for manual classification.

required

Returns:

Type Description
MineralCube

Marcia Mineralube Object containing binary values.