fractopo.analysis.line_data module

Trace and branch data analysis with LineData class abstraction.

class fractopo.analysis.line_data.LineData(_line_gdf, using_branches, azimuth_set_ranges, azimuth_set_names, length_set_ranges=(), length_set_names=(), area_boundary_intersects=<factory>, _automatic_fit=None)

Bases: object

Wrapper around the given GeoDataFrame with trace or branch data.

The line_gdf reference is passed and LineData will modify the input line_gdf instead of copying the input frame. This means line_gdf columns are accessible in the passed input reference upstream.

area_boundary_intersects: ndarray
property automatic_fit: Fit | None

Get automatic powerlaw Fit.

property azimuth_array: ndarray

Array of trace or branch azimuths.

property azimuth_set_array: ndarray

Array of trace or branch azimuth set ids.

property azimuth_set_counts: Dict[str, int]

Get dictionary of azimuth set counts.

property azimuth_set_length_arrays: Dict[str, ndarray]

Get length arrays of each azimuth set.

azimuth_set_names: Tuple[str, ...]
azimuth_set_ranges: Tuple[Tuple[float, float], ...]
property boundary_intersect_count: Dict[str, int]

Get counts of line intersects with boundary.

boundary_intersect_count_desc(label)

Get counts of line intersects with boundary.

Return type:

Dict[str, int]

describe_fit(label=None, cut_off=None)

Return short description of automatic powerlaw fit.

determine_manual_fit(cut_off)

Get manually determined Fit with set cut off.

Return type:

Optional[Fit]

property geometry: GeoSeries

Get line geometries.

property length_array: ndarray

Array of trace or branch lengths.

Note: lengths can be 0.0 due to boundary weighting.

property length_array_non_weighted: ndarray

Array of trace or branch lengths not weighted by boundary conditions.

property length_boundary_weights

Array of weights for lines based on intersection count with boundary.

property length_set_array: ndarray

Array of trace or branch length set ids.

property length_set_counts: Dict[str, int]

Get dictionary of length set counts.

length_set_names: Tuple[str, ...] = ()
length_set_ranges: Tuple[Tuple[float, float], ...] = ()
plot_azimuth(label, append_azimuth_set_text=False, add_abundance_order=False, visualize_sets=False, bar_color='darkgrey', plain=False)

Plot azimuth data in rose plot.

Return type:

Tuple[AzimuthBins, Figure, PolarAxes]

plot_azimuth_set_count(label)

Plot azimuth set counts.

Return type:

Tuple[Figure, Axes]

plot_azimuth_set_lengths(use_probability_density_function=False)

Plot azimuth set length distributions with fits.

Return type:

Tuple[List[Optional[Fit]], List[Figure], List[Axes]]

plot_length_set_count(label)

Plot length set counts.

Return type:

Tuple[Figure, Axes]

plot_lengths(label, use_probability_density_function, fit=None, plain=False)

Plot length data with powerlaw fit.

Return type:

Tuple[Optional[Fit], Figure, Axes]

using_branches: bool