Full-pol H-alpha plot (halpha_plot_fp) — PolSARtools 0.8 documentation

Skip to main content
`Ctrl`+`K`

# Full-pol H-alpha plot (`halpha_plot_fp`)

polsartools.halpha_plot_fp(h, alpha, path=None, cmap='viridis', colorbar=True, norm='', grey_region=True, zone_lines=True, zone_line_color='k', zone_ids=True, gridsize=300)

  Generates and saves a hexbin density plot of entropy (H) versus alpha (degrees) for full-pol data, including optional zone lines, zone IDs, and grey regions.

  ## Example:

      >>> halpha_plot_fp(h, alpha, path="HA_plot.png", cmap='jet', colorbar=True, norm='log')
      This will generates a H/Alpha plot  from the input arrays and save it as HA_plot.png, using the 'jet' colormap and logarithmic normalization

  ## Parameters:

  hpath or array-like

    path to the Entropy file or Array representing entropy values.

  alphaarray-like

    path to the Alpha file or Array representing alpha values in degrees.

  pathstr, optional

    Path to save the generated plot. If a folder is given, the plot is saved as ‘halpha_plot_fp.png’ inside that folder. If the file already exists, it will be overwritten.

  cmapstr, optional

    Colormap used for the hexbin plot. Defaults to ‘viridis’.

  colorbarbool, optional

    If True, displays a colorbar representing sample count. Defaults to True.

  normstr, optional

    If set to ‘log’, applies logarithmic normalization to the hexbin plot.

  grey_regionbool, optional

    If True, fills non-feasible regions of the plot with a grey color to indicate feasible boundaries. Defaults to True.

  zone_linesbool, optional

    If True, adds dashed lines to mark different entropy-alpha zones. Defaults to True.

  zone_line_colorstr, optional

    Color used for zone boundary lines. Defaults to ‘k’ (black).

  zone_idsbool, optional

    If True, labels predefined zones with numerical identifiers. Defaults to True.

  gridsizeint, optional

    Number of hexagonal bins used in the plot. Higher values result in finer binning. Defaults to 300.

  ## Returns:

  None

    Displays the plot and optionally saves it to the specified location.

  ## Notes:

  - Uses get_feas_bounds() to obtain feasible boundary curves for plotting.

  - If norm is ‘log’, a LogNorm() normalization is applied.