brainstat.mesh.data.mesh_normalize

brainstat.mesh.data.mesh_normalize(Y, mask=None, subdiv='s')[source]

Normalizes by subtracting the global mean, or dividing it.

Parameters
  • Y (numpy array of shape (n x v) or (n x v x k)) – Data to be normalized.

  • mask (numpy boolean array of shape (1 x v), optional) – True is included, False is excluded. If None, no mask is applied, by default ‘None’.

  • subdiv (str, optional) – If ‘s’, demeans Y; if ‘d’ standardizes to mean 0, standard deviation 100.

Returns

  • Y (numpy array of shape (n x v) or (n x v x k)) – Normalized data.

  • Yav (numpy array of shape (n x 1) or (n x k)) – Mean of the input Y along the mask.