fractopo.analysis.line_data module
Trace and branch data analysis with LineData class abstraction.
- class fractopo.analysis.line_data.LineData(_line_gdf: ~geopandas.geodataframe.GeoDataFrame, using_branches: bool, azimuth_set_ranges: ~collections.abc.Sequence[tuple[float | int | ~numbers.Real, float | int | ~numbers.Real]], azimuth_set_names: ~collections.abc.Sequence[str], length_set_ranges: ~collections.abc.Sequence[tuple[float | int | ~numbers.Real, float | int | ~numbers.Real]] = (), length_set_names: ~collections.abc.Sequence[str] = (), area_boundary_intersects: ~numpy.ndarray = <factory>, _automatic_fit: ~powerlaw.Fit | None = None)
Bases:
objectWrapper 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: Sequence[str]
- azimuth_set_ranges: Sequence[tuple[float | int | Real, float | int | Real]]
- property boundary_intersect_count: dict[str, int]
Get counts of line intersects with boundary.
- boundary_intersect_count_desc(label: str) dict[str, int]
Get counts of line intersects with boundary.
- describe_fit(label: str | None = None, cut_off: float | None = None)
Return short description of automatic powerlaw fit.
- determine_manual_fit(cut_off: float) Fit | None
Get manually determined Fit with set cut off.
- 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: Sequence[str] = ()
- length_set_ranges: Sequence[tuple[float | int | Real, float | int | Real]] = ()
- plot_azimuth(label: str, append_azimuth_set_text: bool = False, add_abundance_order: bool = False, visualize_sets: bool = False, bar_color: str = 'darkgrey', plain: bool = False) tuple[AzimuthBins, Figure, PolarAxes]
Plot azimuth data in rose plot.
- plot_azimuth_set_count(label: str) tuple[Figure, Axes]
Plot azimuth set counts.
- plot_azimuth_set_lengths(use_probability_density_function: bool = False) tuple[list[Fit | None], list[Figure], list[Axes]]
Plot azimuth set length distributions with fits.
- plot_length_set_count(label: str) tuple[Figure, Axes]
Plot length set counts.
- plot_lengths(label: str, use_probability_density_function: bool, fit: Fit | None = None, plain: bool = False, fits_to_plot: tuple[Dist, ...] = (Dist.POWERLAW, Dist.LOGNORMAL, Dist.EXPONENTIAL)) tuple[Fit | None, Figure, Axes]
Plot length data with powerlaw fit.
- using_branches: bool