fractopo.analysis.multi_network module
MultiNetwork implementation for handling multiple network analysis.
- class fractopo.analysis.multi_network.MultiNetwork(networks: Tuple[Network, ...])
Bases:
NamedTuple
Multiple Network analysis.
- basic_network_descriptions_df(columns)
Create DataFrame useful for basic Network characterization.
columns
should contain key value pairs where the key is the column name innumerical_network_description
dict. Value is a tuple where the first member is a new name for the column or alternatively None in which case the column name isn’t changed. The second member should be the type of the column, typically either str, int or float.
- collective_azimuth_sets()
Get collective azimuth set names.
Checks that all Networks have the same azimuth sets.
- Return type:
Tuple
[Tuple
[str
,...
],Tuple
[Tuple
[float
,float
],...
]]
- multi_length_distributions(using_branches)
Get MultiLengthDistribution of all networks.
- Return type:
- network_length_distributions(using_branches, using_azimuth_sets)
Get length distributions of Networks.
- Return type:
Dict
[str
,Dict
[str
,LengthDistribution
]]
- plot_branch(colors=None)
Plot multi-network ternary branch type plot.
- plot_branch_azimuth_set_lengths(automatic_cut_offs, plot_truncated_data)
Plot multi-network trace azimuths set lengths with fits.
- Return type:
Tuple
[Dict
[str
,MultiLengthDistribution
],List
[Polyfit
],List
[Figure
],List
[Axes
]]
- plot_multi_length_distribution(using_branches, automatic_cut_offs, plot_truncated_data, multi_distribution=None)
Plot multi-length distribution fit.
Use
multi_length_distributions()
to get most parameters used in fitting the multi-scale distribution.- Return type:
Tuple
[MultiLengthDistribution
,Polyfit
,Figure
,Axes
]
- plot_trace_azimuth_set_lengths(automatic_cut_offs, plot_truncated_data)
Plot multi-network trace azimuths set lengths with fits.
- Return type:
Tuple
[Dict
[str
,MultiLengthDistribution
],List
[Polyfit
],List
[Figure
],List
[Axes
]]
- plot_xyi(colors=None)
Plot multi-network ternary XYI plot.
- set_multi_length_distributions(using_branches)
Get set-wise multi-length distributions.
- Return type:
Dict
[str
,MultiLengthDistribution
]
- subsample(min_radii, random_choice=RandomChoice.radius, samples=1)
Subsample all
Networks
inMultiNetwork
.- Parameters:
min_radii (
Union
[float
,Dict
[str
,float
]]) – The minimum radius for subsamples can be either given as static or as a mapping that maps network names to specific radii.random_choice (
RandomChoice
) – Whether to use radius or area as the random choice parameter.samples (
int
) – How many subsamples to conduct per network.
- Return type:
List
[Optional
[Dict
[str
,Union
[float
,int
,str
]]]]- Returns:
Subsamples