:py:mod:`wolfhece.RatingCurve` ============================== .. py:module:: wolfhece.RatingCurve .. autoapi-nested-parse:: 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 --------------- .. py:data:: msg .. py:data:: POLYNOMIAL_LAW :value: 0 .. py:data:: POWER_LAW :value: 1 .. py:data:: FMTDATEMI :value: '%d-%m-%y' .. py:data:: FMTDATE :value: '%d/%m/%Y %H:%M:%S' .. py:data:: FMTDATEG :value: '%d-%m-%y%H:%M' .. py:data:: FMTDATEG2 :value: '%d-%m-%Y %H:%M' .. py:data:: FMTDATE2 :value: '%d/%m/%Y' .. py:class:: href_gaugingstation(id: int, name: str, basin: str, hDNG) .. py:attribute:: id :type: int .. py:attribute:: name :type: str .. py:attribute:: basin :type: str .. py:attribute:: hDNG :type: float .. py:class:: href_gaugingstations(fromxls: str = '') .. py:attribute:: myhrefs :type: list .. py:class:: gauging(id: int, name: str, basin: str, Q: float, H: float, date: datetime.datetime) .. py:attribute:: id :type: int .. py:attribute:: name :type: str .. py:attribute:: basin :type: str .. py:attribute:: Q :type: float .. py:attribute:: H :type: float .. py:attribute:: date :type: datetime.datetime .. py:class:: gaugings(fromxls: str = '') .. py:attribute:: mygaugings :type: list .. py:class:: coeffratingcurve(hmin, hmax, law, coeffs: numpy.ndarray) .. py:attribute:: hmin :type: float .. py:attribute:: hmax :type: float .. py:attribute:: coeffs :type: numpy.array .. py:attribute:: law :type: int .. py:attribute:: myfunc :type: scipy.interpolate.PPoly .. py:class:: ratingcurve(start: datetime.datetime = None, end: datetime.datetime = None, law: int = POLYNOMIAL_LAW, hmin: numpy.ndarray = None, hmax: numpy.ndarray = None, coeffs: numpy.ndarray = None, fromxls: str = '', *args, **kw) .. py:attribute:: startdate :type: datetime.datetime .. py:attribute:: enddate :type: datetime.datetime .. py:attribute:: nb :type: int .. py:attribute:: mycoeffs :type: list[coeffratingcurve] .. py:attribute:: myfunc :type: scipy.interpolate.PPoly .. py:method:: plot(factextra=1.0, ax=None, lw=1) .. py:method:: _compute_q(h) .. py:method:: compute_q(h: pandas.Series) .. py:class:: gaugingstation(name: str, id: int, river: str, ratingcurves: list = None, *args, **kw) .. py:attribute:: id :type: int .. py:attribute:: name :type: str .. py:attribute:: name2 :type: str .. py:attribute:: river :type: str .. py:attribute:: river2 :type: str .. py:attribute:: mycurves :type: list[ratingcurve] .. py:attribute:: mygaugings :type: list .. py:attribute:: myhref :type: list .. py:attribute:: maintainer :type: str .. py:attribute:: startdate :type: datetime.datetime .. py:attribute:: x :type: float .. py:attribute:: y :type: float .. py:attribute:: weblink :type: str .. py:method:: gettype() -> int .. py:method:: plot(size: float = 10.0) .. py:method:: plotRT(ax=None, lw=1) .. py:class:: SPWhrefs(fromxls: str = '') Bases: :py:obj:`href_gaugingstations` .. autoapi-inheritance-diagram:: wolfhece.RatingCurve.SPWhrefs :parts: 1 :private-bases: .. py:class:: SPWGaugings(fromxls: str = '') Bases: :py:obj:`gaugings` .. autoapi-inheritance-diagram:: wolfhece.RatingCurve.SPWGaugings :parts: 1 :private-bases: .. py:class:: SPWMIGaugingStations(fromxls: str = '', idx: str = '', plotted: bool = True, mapviewer=None, need_for_wx: bool = False) Bases: :py:obj:`wolfhece.drawing_obj.Element_To_Draw` .. autoapi-inheritance-diagram:: wolfhece.RatingCurve.SPWMIGaugingStations :parts: 1 :private-bases: Base class of element to add into WolfMapViewer or another GUI .. py:attribute:: mystations :type: dict[int:gaugingstation] .. py:attribute:: myrivers :type: dict .. py:attribute:: gaugings :type: SPWGaugings .. py:attribute:: hrefs :type: SPWhrefs .. py:method:: plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size: float = 10.0) Plot data in OpenGL context .. py:method:: find_minmax(update=False) Generic function to find min and max spatial extent in data example : a WolfMapViewer instance needs spatial extent to zoom or test if element must be plotted .. py:method:: _plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size: float = 10.0) .. py:class:: SPWDCENNGaugingStations(fromxls: str = '', idx: str = '', plotted: bool = True, mapviewer=None, need_for_wx: bool = False) Bases: :py:obj:`wolfhece.drawing_obj.Element_To_Draw` .. autoapi-inheritance-diagram:: wolfhece.RatingCurve.SPWDCENNGaugingStations :parts: 1 :private-bases: Base class of element to add into WolfMapViewer or another GUI .. py:attribute:: mystations :type: dict[int:gaugingstation] .. py:attribute:: myrivers :type: dict .. py:attribute:: gaugings :type: SPWGaugings .. py:attribute:: hrefs :type: SPWhrefs .. py:method:: plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size: float = 10.0) Plot data in OpenGL context .. py:method:: find_minmax(update=False) Generic function to find min and max spatial extent in data example : a WolfMapViewer instance needs spatial extent to zoom or test if element must be plotted .. py:method:: _plot(size: float = 10.0)