Commit 76745dc9 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Pamhyr: Fix Pep8 and minor change.

Showing with 9 additions and 17 deletions
+9 -17
...@@ -478,20 +478,12 @@ class ProfileXYZ(Profile, SQLSubModel): ...@@ -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 # Get the index of first point with elevation lesser than water
# gauche et droite qui correspondent à des points sous la # elevation (for the right and left river side)
# 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 last point with elevation lesser than water
# 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): ...@@ -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): ...@@ -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): ...@@ -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"
) )
......
...@@ -213,7 +213,7 @@ class PlotKPC(PamhyrPlot): ...@@ -213,7 +213,7 @@ class PlotKPC(PamhyrPlot):
z, d 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): ...@@ -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"
) )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment