desc.grid.Grid.compress

Grid.compress(x, surface_label='rho')Source

Return elements of x at indices of unique surface label values.

Parameters:
  • x (ndarray) – The array to compress. Should usually represent a surface function (constant over a surface) in an array that matches the grid’s pattern.

  • surface_label (str) – The surface label of rho, theta, or zeta.

Returns:

compress_x (ndarray) – This array will be sorted such that the first element corresponds to the value associated with the smallest surface, and the last element corresponds to the value associated with the largest surface.