Dual-pol H-alpha plot (halpha_plot_dp)#

polsartools.halpha_plot_dp(h, alpha, path=None, cmap='viridis', colorbar=True, norm='', grey_region=True, gridsize=300)[source]

Generates and saves a hexbin density plot of entropy (H) versus alpha (degrees) for dual-pol data.

Example:#

>>> halpha_plot_dp(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:#

harray-like

Array representing entropy values.

alphaarray-like

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_dp.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.

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.