Documentation
Bases: FM2ProfBase
Visualise output class.
Instantiate a VisualiseOutput object.
Source code in fm2prof\utils.py
branches: tuple[np.ndarray, np.ndarray]
property
Get branches.
cross_sections: Generator[dict, None, None]
property
Generator to loop through all cross-sections in definition file.
Example use:
for css in visualiser.cross_sections: visualiser.make_figure(css)
number_of_cross_sections: int
property
Get number of cross sections.
figure_cross_section(css, reference_geometry=(), reference_roughness=(), *, save_to_file=True, overwrite=False)
Get a figure of the cross section.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css
|
dict
|
cross section dict |
required |
reference_geometry
|
tuple
|
tuple of reference . Defaults to (). |
()
|
reference_roughness
|
tuple
|
description. Defaults to (). |
()
|
save_to_file
|
bool
|
Save the figure to file. Defaults to True. |
True
|
overwrite
|
bool
|
Overwrite the figure. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Figure |
Figure
|
description |
Source code in fm2prof\utils.py
figure_roughness_longitudinal(branch)
Get figure of longitudinal roughness.
Assumes the following naming convention: [branch][optional:branch_order][chainage]
Source code in fm2prof\utils.py
get_cross_section_by_id(css_id)
Get cross-section information given an id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css_id
|
str
|
cross-section name |
required |
Source code in fm2prof\utils.py
get_cross_sections_for_branch(branch)
Get cross sections for branch name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
branch
|
str
|
branch name. |
required |
Returns:
| Type | Description |
|---|---|
tuple[str, float, str]
|
tuple[str, float, str]: |
Source code in fm2prof\utils.py
get_css_for_branch(css_list, branchname)
staticmethod
Get cross section for given branch name.
get_roughness_info_for_css(cssname, rtype='roughnessMain')
Open roughness file and reads information for a given cross-section name.
Source code in fm2prof\utils.py
get_volume_info_for_css(cssname)
Get volume info for cross section.
Source code in fm2prof\utils.py
parse_cross_section_definition_file(css_def)
staticmethod
Parse cross-section definition file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
css_def
|
Path
|
path to cross-section definition file |
required |
Returns: list[CrossSectionDefinition]: list of cross-section definitions
Source code in fm2prof\utils.py
plot_cross_sections()
Plot figures for all cross-sections in project.
Outputs to output directory of project.