The first step towards α\alpha and β\beta diversity mapping corresponds to the computation of a SpectralSpecies map, which identifies the cluster (‘spectral species’) assigned to each pixel in the image, after k-means clustering is performed. Most of the input parameters are obtained when running perform_PCA.

Info about K-means clustering and the path for the spectral species file can be obtained as outputs.

print("MAP SPECTRAL SPECIES")
Kmeans_info <- map_spectral_species(Input_Image_File = Input_Image_File, 
                                    Input_Mask_File = PCA_Output$MaskPath,
                                    Output_Dir = Output_Dir,
                                    SpectralSpace_Output = PCA_Output, 
                                    nbclusters = nbclusters, 
                                    nbCPU = nbCPU, MaxRAM = MaxRAM)

SpectralSpecies is then stored in a raster file located here:

Kmeans_info$SpectralSpecies
'RESULTS/S2A_T33NUD_20180104_Subset/SPCA/SpectralSpecies'

α\alpha and β\beta diversity maps can then be computed based on this SpectralSpecies raster.

The computation of α\alpha and β\beta diversity maps is performed in the next step.