mapflpy.utils.get_fieldline_npoints

mapflpy.utils.get_fieldline_npoints#

get_fieldline_npoints(traces)[source]#

Count the number of valid (non-NaN) points in each fieldline.

Parameters:

traces (Traces or ndarray) – A Traces object or a 3D array of shape (M, 3, N), where NaNs indicate unused portions of the buffer.

Returns:

npoints – An array of shape (N,) indicating the number of valid points in each of the N fieldlines.

Return type:

ndarray of int