landau.poly

Methods to turn unstructured sets of points into polygons for plotting.

class landau.poly.Concave(min_c_width=0.01, ratio=0.1, drop_interior=True)[source]

Bases: AbstractPolyMethod

Find polygons by constructing a concave hull around given points.

Fast, but prone to unclean boundaries.

drop_interior: bool = True

Find concave set only of phase boundary points; usually helps to get the shape right, but can create holes.

ratio: float = 0.1

Degree of “concave-ness”, see https://shapely.readthedocs.io/en/latest/reference/shapely.concave_hull.html

class landau.poly.Segments(min_c_width=0.01)[source]

Bases: AbstractPolyMethod

Construct polygons by identifying phase boundaries and stitching them together in a poor man’s TSP approach.

Requires that phase diagram data was generated with refine=True.

FIXME: sort_segment should just set up a distance matrix for the segments and use python_tsp on those.

prepare(df)[source]

Massage data set into format so that :method:`.make` can by applied over groups of columns phase and phase_unit.

landau.poly.handle_poly_method(poly_method, **kwargs)[source]

Uniform handling of poly_method between plot_phase_diagram and plot_mu_phase_diagram. Some **kwargs trickery required to handle now deprecated min_c_width and alpha arguments.