pyrfu.pyrf.brazil module#

pyrfu.pyrf.brazil.brazil(beta_para: ndarray, p_aniso: ndarray, bins: list | None = None, threshold: int = 9, **kwargs)[source]#

Computes 2D histogram and PDF (Brazil plot style) for plasma data.

Parameters:
  • beta_para (np.ndarray) – Parallel beta values (must be positive and finite).

  • p_aniso (np.ndarray) – Temperature anisotropy values (must be positive and finite).

  • bins (list, optional) – Bin edges or number of bins for the histogram. If None, optimized bin count is used.

  • threshold (int, optional) – Minimum count threshold for masking low-counts (default is 9).

Returns:

  • n (xarray.DataArray) – 2D histogram counts with low-counts masked (NaN for <9).

  • h (xarray.DataArray) – 2D probability density function with low-counts masked.