wolfhece.GraphProfile
Author: HECE - University of Liege, Pierre Archambeau Date: 2024
Copyright (c) 2024 University of Liege. All rights reserved.
This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.
Module Contents
- class wolfhece.GraphProfile.ProfilePanel(parent, id=-1, dpi=None, toolbar=True, **kwargs)[source]
Bases:
wx.Panel
A wx.panel on which the matplolib figure is displayed.
- class wolfhece.GraphProfile.PlotCSAll(parent: wx.lib.agw.aui.AuiNotebook, id=-1, dpi=None, my_cross_sections: wolfhece.PyCrosssections.crosssections = None, my_profile: wolfhece.PyCrosssections.profile = None, **kwargs)[source]
Bases:
ProfilePanel
A class containing the necessary tools to draw the different graphs of a profile (Cross section).
- set_cs(my_profile: wolfhece.PyCrosssections.profile = None, vec: list[wolfhece.PyVertexvectors.vector] = [], Manning=0.04, plot=True) None [source]
This function sets the cross section (profile of interest in the list of cross sections provided as vectors) and initialise the slider positions as well as the values displayed on the wx panel.
- mapviewer_activector()[source]
This methods activates and colors the active profile in wolfhece.pydraw ,and therefore, in the wolfpy GUI too.
- compute_relations(event: wx.Event)[source]
This method computes the discharges based on a choosen friction coefficient (Manning or Strickler) and a slope. The computations are trigged by wx.Events (user’s inputs in txt ctrl).
- cs_setter(mycross: wolfhece.PyCrosssections.crosssections = None, active_profile: wolfhece.PyCrosssections.profile = None, compare: wolfhece.PyCrosssections.profile = None, mapviewer=None, plot=True)[source]
This method sets simultaneously the cross section (mycross : parent) and the profile (active vector : child) active in wolf GUI or defined by the user. If no profile is given, the method returns the profile corresponding to the first key(string) in the cross section dictionary. Moreover, if a comparison profile (compare) is given, the methods sets that profile as the reference against which modifications on the active profile are compared.
- jump_to_cs(event: wx.Event)[source]
Based on the user’s input, the method jumps to the selected profile in the cross section.
- movegenslider(event: wx.Event)[source]
Using wx.Event, this methods moves (up or down, left or right) the whole river bed (banks and bed) displayed on the figure.
- movebanksslider(event: wx.Event)[source]
This function updates a position of the river bank(left, bed, or right) based on the user’s entry(sliding a slider or input of a float value).
- movewaterdepth(event: wx.Event)[source]
This method increases or decreases the water depth plotted on graphs.
- movewaterlevel(event: wx.Event)[source]
This method increases or decreases the water level plotted on graphs.
- movewaterdis(event: wx.Event)[source]
This method selects and plots a specific discharges in the GUI based on the user’s input.
- plot_profile(figax: tuple[matplotlib.figure.Figure, matplotlib.axis.Axis] = None)[source]
This method plots the geometric profiles on the first and third graph. The third graph is anamorphosed to allow comparisons with other graphs using the same scale.
- plot_discharge(figax: tuple[matplotlib.figure.Figure, matplotlib.axis.Axis] = None)[source]
This method plots the discharge relationships of the active profile on the 5th axis of the matplotlib figure.
- plot_hspw(figax: tuple[matplotlib.figure.Figure, matplotlib.axis.Axis] = None)[source]
The methods plots the hydraulic radius - H, the wetted area - S, the wetted perimeter - P and top width - W on sixth axis and last graph of the figure.
- plot_cs()[source]
This method plots 6 matplotlib graphs of the active profile. In order to do so, it uses the stored self graphs defined by other plotting methods. Storing the graphs avoid unnecessary repetitions of plots each time the method is called.
- plot_up(event: wx.Event)[source]
This function plots the upstream’s cross section by upgrading the current cross section with the next upstream.
- plot_down(event: wx.Event)[source]
This function plots the downstream’s cross section by upgrading the current cross section with the next downsrtream.
- simulations(event: wx.Event)[source]
This method displays on the profile and on the discharge graphs, the hydraulic characteristics in the numerical simulations. Also, it triggers a new window containing a table (grid) of the displayed values. FIXME add a plot method for 2D and 1D results.
- modify_vertex()[source]
This method displays a new window containing the vertices of the active cross sections for modifications.
- update_profile(event: wx.Event)[source]
This method allows the update of the profile plot - if the profile vertices are modified or - or if a structure is drawn (projected) on the profile.
- project_zones_on_trace(new_zones: wolfhece.PyVertexvectors.Zones = None, reset_vec=True)[source]
- add_vec(vec: wolfhece.PyVertexvectors.vector, reset_first=False)[source]
This method projects a vector on the profile traces and appends the projection to the list utilised to plot the structures.
- add_zones(event: wx.Event)[source]
This method creates a new zones and displays its structure on the screen.
- _draw_on_profile(event: wx.Event)[source]
This method display a grid where vertor can be encoded and drawn on the figure.
- class wolfhece.GraphProfile.windowsgrid(*args, callback=None, **kwargs)[source]
Bases:
wx.Frame
A class containing the different grids used for plotting the graphs.
- update_grid_vert(my_profile: wolfhece.PyCrosssections.profile, ref: wolfhece.PyCrosssections.profile = None, title: str = None, callback=None)[source]
- set_grid_sz(my_profile: wolfhece.PyCrosssections.profile, ref: wolfhece.PyCrosssections.profile = None, title: str = None, callback=None)[source]
- set_grid_vert(my_profile: wolfhece.PyCrosssections.profile, ref: wolfhece.PyCrosssections.profile = None, title: str = None, callback=None, call1=None, call2=None)[source]
This method displays a grid containing the active profile vertices. Also,the method contains a grid with the profile of reference for simultaneous insertion of vertices.
- class wolfhece.GraphProfile.ProfileNotebook(mapviewer=None, show=True, framesize=(1024, 768))[source]
Bases:
wx.Frame
Fenêtre contenant potentiellement plusieurs graphiques Matplotlib.