wolfhece.analyze_poly ===================== .. py:module:: wolfhece.analyze_poly Module Contents --------------- .. py:class:: Array_analysis_onepolygon(wa: wolfhece.wolf_array.WolfArray, polygon: wolfhece.PyVertexvectors.vector) Class for values analysis of an array based on a polygon. This class select values insides a polygon and plot statistics of the values. The class is designed to be used with the WolfArray class and the vector class from the PyVertexvectors module. Plots of the values distribution can be generated using seaborn or plotly. .. py:attribute:: _wa .. py:attribute:: _polygon .. py:attribute:: _selected_cells :value: None .. py:attribute:: _values :value: None .. py:method:: values(which: Literal['Mean', 'Std', 'Median', 'Sum', 'Volume', 'Values']) -> pandas.DataFrame | float Get the values as a pandas DataFrame :param which: Mean, Std, Median, Sum, Volume, Values .. py:method:: select_cells(mode: Literal['polygon', 'buffer'] = 'polygon', **kwargs) Select the cells inside the polygon .. py:method:: _select_cells_polygon(selection_poly: wolfhece.PyVertexvectors.vector) Select the cells inside the polygon .. py:method:: _select_cells_buffer(buffer_size: float = 0.0) Select the cells inside the buffer of the polygon .. py:method:: compute_values() Get the values of the array inside the polygon .. py:method:: plot_values(show: bool = True, bins: int = 100, engine: Literal['seaborn', 'plotly'] = 'seaborn') Plot a histogram of the values .. py:method:: plot_values_seaborn(bins: int = 100, show: bool = True) Plot a histogram of the values .. py:method:: plot_values_plotly(bins: int = 100, show: bool = True) Plot a histogram of the values .. py:class:: Array_analysis_polygons(wa: wolfhece.wolf_array.WolfArray, polygons: wolfhece.PyVertexvectors.zone) Class for values analysis of an array based on a polygon. This class select values insides a polygon and plot statistics of the values. The class is designed to be used with the WolfArray class and the vector class from the PyVertexvectors module. Plots of the values distribution can be generated using seaborn or plotly. .. py:attribute:: _wa .. py:attribute:: _polygons .. py:attribute:: _zone .. py:method:: plot_values(show: bool = True, bins: int = 100, engine: Literal['seaborn', 'plotly'] = 'seaborn') Plot a histogram of the values .. py:method:: plot_values_seaborn(bins: int = 100, show: bool = True) Plot a histogram of the values .. py:method:: plot_values_plotly(bins: int = 100, show: bool = True) Plot a histogram of the values .. py:class:: Slope_analysis(wa: wolfhece.wolf_array.WolfArray, trace: wolfhece.PyVertexvectors.vector) Class for slope analysis of in an array based on a trace vector. This class allows to select cells inside a polygon or a buffer around a trace vector and compute the slope of the dike. The slope is computed as the difference in elevation between the trace and the cell divided by the distance to the trace. The slope is computed for each cell inside the polygon or buffer and accessed in a Pandas Dataframe. Plots of the slope distribution can be generated using seaborn or plotly. The class is designed to be used with the WolfArray class and the vector class from the PyVertexvectors module. .. py:attribute:: _wa .. py:attribute:: _trace .. py:attribute:: _selection_poly :value: None .. py:attribute:: _buffer_size :value: 0.0 .. py:attribute:: _selected_cells :value: None .. py:attribute:: _slopes :value: None .. py:property:: slopes :type: pandas.DataFrame Get the slopes as a pandas DataFrame .. py:method:: select_cells(mode: Literal['polygon', 'buffer'] = 'polygon', **kwargs) Select the cells inside the trace .. py:method:: _select_cells_buffer(buffer_size: float = 0.0) Select the cells inside the buffer of the trace .. py:method:: _select_cells_polygon(selection_poly: wolfhece.PyVertexvectors.vector) Select the cells inside the polygon .. py:method:: compute_slopes() Get the slope of the dike .. py:method:: plot_slopes(show: bool = True, bins: int = 100, engine: Literal['seaborn', 'plotly'] = 'seaborn') Plot a histogram of the slopes .. py:method:: plot_slopes_seaborn(bins: int = 100, show: bool = True) Plot a histogram of the slopes .. py:method:: plot_slopes_plotly(bins: int = 100, show: bool = True) Plot a histogram of the slopes