mirror of https://gitlab.com/pamhyr/pamhyr2
Pamhyr: Fix Pep8 and minor change.
parent
25dce4d386
commit
76745dc9d0
|
|
@ -478,20 +478,12 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||||
return abs(rg.dist(rd))
|
return abs(rg.dist(rd))
|
||||||
|
|
||||||
def get_water_limits(self, z):
|
def get_water_limits(self, z):
|
||||||
# ====================================================================
|
"""
|
||||||
# détermination des points limites RG et RD pour un niveau
|
Determine left and right limits of water elevation.
|
||||||
# d'eau donné
|
"""
|
||||||
#
|
|
||||||
# irg et ird sont les premiers indices en partant des rives
|
|
||||||
# gauche et droite qui correspondent à des points sous la
|
|
||||||
# surface de l'eau ptX et ptY sont les points interpolés où
|
|
||||||
# le plan d'eau intersecte le profil known_level est le
|
|
||||||
# niveau d'eau pour lequel on a obtenu irg, ird, ptX et ptY
|
|
||||||
# ====================================================================
|
|
||||||
|
|
||||||
|
# Get the index of first point with elevation lesser than water
|
||||||
# Get the index of last point with elevation lesser than water
|
# elevation (for the right and left river side)
|
||||||
# level (for the right and left river side)
|
|
||||||
i_left = -1
|
i_left = -1
|
||||||
i_right = -1
|
i_right = -1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ class Profile(object):
|
||||||
def has_sediment(self):
|
def has_sediment(self):
|
||||||
return any(map(lambda ts: "sl" in self._data[ts], self._data))
|
return any(map(lambda ts: "sl" in self._data[ts], self._data))
|
||||||
|
|
||||||
|
|
||||||
class Reach(object):
|
class Reach(object):
|
||||||
def __init__(self, reach, study):
|
def __init__(self, reach, study):
|
||||||
self._study = study
|
self._study = study
|
||||||
|
|
@ -97,6 +98,7 @@ class Reach(object):
|
||||||
def has_sediment(self):
|
def has_sediment(self):
|
||||||
return any(map(lambda profile: profile.has_sediment(), self._profiles))
|
return any(map(lambda profile: profile.has_sediment(), self._profiles))
|
||||||
|
|
||||||
|
|
||||||
class River(object):
|
class River(object):
|
||||||
def __init__(self, study):
|
def __init__(self, study):
|
||||||
self._study = study
|
self._study = study
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ class FrictionsTranslate(PamhyrTranslate):
|
||||||
"Frictions", "Stricklers"
|
"Frictions", "Stricklers"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
self._dict["Edit frictions"] = _translate(
|
self._dict["Edit frictions"] = _translate(
|
||||||
"Frictions", "Edit frictions"
|
"Frictions", "Edit frictions"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ class SedimentProfileTranslate(SedimentReachTranslate):
|
||||||
"SedimentLayers", "Height (m)"
|
"SedimentLayers", "Height (m)"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
self._dict["Profile sediment layers"] = _translate(
|
self._dict["Profile sediment layers"] = _translate(
|
||||||
"SedimentLayers", "Profile sediment layers"
|
"SedimentLayers", "Profile sediment layers"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue