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))
|
||||
|
||||
def get_water_limits(self, z):
|
||||
# ====================================================================
|
||||
# détermination des points limites RG et RD pour un niveau
|
||||
# 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
|
||||
# ====================================================================
|
||||
"""
|
||||
Determine left and right limits of water elevation.
|
||||
"""
|
||||
|
||||
|
||||
# Get the index of last point with elevation lesser than water
|
||||
# level (for the right and left river side)
|
||||
# Get the index of first point with elevation lesser than water
|
||||
# elevation (for the right and left river side)
|
||||
i_left = -1
|
||||
i_right = -1
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ class Profile(object):
|
|||
def has_sediment(self):
|
||||
return any(map(lambda ts: "sl" in self._data[ts], self._data))
|
||||
|
||||
|
||||
class Reach(object):
|
||||
def __init__(self, reach, study):
|
||||
self._study = study
|
||||
|
|
@ -97,6 +98,7 @@ class Reach(object):
|
|||
def has_sediment(self):
|
||||
return any(map(lambda profile: profile.has_sediment(), self._profiles))
|
||||
|
||||
|
||||
class River(object):
|
||||
def __init__(self, study):
|
||||
self._study = study
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class FrictionsTranslate(PamhyrTranslate):
|
|||
"Frictions", "Stricklers"
|
||||
)
|
||||
|
||||
|
||||
self._dict["Edit frictions"] = _translate(
|
||||
"Frictions", "Edit frictions"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ class PlotKPC(PamhyrPlot):
|
|||
z, d
|
||||
)
|
||||
),
|
||||
z_sl, d_sl + [f] # HACK: Add dummy data for last layer
|
||||
z_sl, d_sl + [f] # HACK: Add dummy data for last layer
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class SedimentProfileTranslate(SedimentReachTranslate):
|
|||
"SedimentLayers", "Height (m)"
|
||||
)
|
||||
|
||||
|
||||
self._dict["Profile sediment layers"] = _translate(
|
||||
"SedimentLayers", "Profile sediment layers"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue