surface_som_mapping

nighres.surface.surface_som_mapping(surface_mesh, mask_zeros=False, som_size=100, learning_time=100000, total_time=500000, save_data=False, overwrite=False, output_dir=None, file_name=None)[source]

Surface SOM mapping

Maps surface coordinates onto a self-organizing map.

Parameters:
  • surface_mesh (mesh) – Mesh model of the surface
  • mask_zeros (bool) – Whether to mask out zero values (default is False)
  • som_size (int) – Size of the 2D SOM to generate
  • learning_time (int) – Time for the learning stage iterations
  • total_time (int) – Total number of iterations
  • save_data (bool) – Save output data to file (default is False)
  • overwrite (bool) – Overwrite existing results (default is False)
  • output_dir (str, optional) – Path to desired output directory, will be created if it doesn’t exist
  • file_name (str, optional) – Desired base name for output files with file extension (suffixes will be added)
Returns:

Dictionary collecting outputs under the following keys (suffix of output files in brackets)

  • original (mesh): Surface mesh dictionary of “points”, “faces” and “data” showing the SOM coordinates on the mesh
  • som (mesh): SOM mesh dictionary of “points”, “faces” and “data” generated from the SOM grid itself

Return type:

dict

Notes

Original Java module by Pierre-Louis Bazin