The function performs the spectral angle mapper algorithm chunk by chunk for the mosaics files. It uses the parallel package, and by default all cores -1.
The function uses mosaic_chunk to cast a mosaic tile as a Tile object. Then performs a tile_base_corr, wavealing, and tile_sam to finaly write binary files that hold the Spectral Angle Mapper results in the destination folder (path slot of the SpectralInfo object). The files can be loaded back to R using link{mosaic_compose}.
The function is using the parallel package, as each tile_sam takes a while to complete.