mirror of https://gitlab.com/pamhyr/pamhyr2
pep8
parent
400f6be9e3
commit
c702862bc4
|
|
@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||
lxml>=4.9.3
|
||||
platformdirs>=4.2.0
|
||||
pyshp>=2.3.1
|
||||
rasterio==1.3.11
|
||||
#fortranformat==2.0.3
|
||||
|
|
|
|||
|
|
@ -398,13 +398,13 @@ class InitialConditions(SQLSubModel):
|
|||
discharge = data_discharge[profile.rk]
|
||||
else:
|
||||
discharge = (
|
||||
#((width * 0.8)
|
||||
#* strickler
|
||||
#* (height ** (5/3))
|
||||
#* (abs(incline) ** (0.5)))
|
||||
# ((width * 0.8)
|
||||
# * strickler
|
||||
# * (height ** (5/3))
|
||||
# * (abs(incline) ** (0.5)))
|
||||
(area * strickler
|
||||
* (radius ** (2/3))
|
||||
* (abs(incline) ** (0.5)))
|
||||
* (radius ** (2/3))
|
||||
* (abs(incline) ** (0.5)))
|
||||
)
|
||||
|
||||
elevation = max(
|
||||
|
|
|
|||
|
|
@ -372,12 +372,12 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
|||
if strickler is None:
|
||||
strickler = 25.0
|
||||
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
||||
#q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
||||
#* (h ** (5/3)) * (abs(self.slope_value) ** (0.5)))
|
||||
#for h in height]
|
||||
# q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
||||
# * (h ** (5/3)) * (abs(self.slope_value) ** (0.5)))
|
||||
# for h in height]
|
||||
q = [profile.wet_area(z_min + h) * strickler
|
||||
* (profile.wet_radius(z_min + h) ** (2/3))
|
||||
* (abs(self.slope_value) ** (0.5))
|
||||
* (profile.wet_radius(z_min + h) ** (2/3))
|
||||
* (abs(self.slope_value) ** (0.5))
|
||||
for h in height]
|
||||
for i in range(len(height)):
|
||||
height[i] += z_min
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ class CoordinatesDialog(PamhyrDialog):
|
|||
def setup_connections(self):
|
||||
for t in self._values:
|
||||
self.find(QPushButton,
|
||||
f"pushButton_{t}").clicked.connect(lambda state, x=t: self.reset(x))
|
||||
f"pushButton_{t}").clicked.connect(
|
||||
lambda state, x=t: self.reset(x))
|
||||
|
||||
def reset(self, t):
|
||||
self.spinbox[t].setValue(self._values[t])
|
||||
|
|
|
|||
|
|
@ -148,10 +148,10 @@ class PlotAC(PamhyrPlot):
|
|||
gl = profile.geometry.names()
|
||||
|
||||
self.annotation = []
|
||||
self.complete_gl, self.incomplete_gl = reach.geometry.compute_guidelines()
|
||||
self.cgl, self.igl = reach.geometry.compute_guidelines()
|
||||
|
||||
lcomplete = list(self.complete_gl)
|
||||
lincomplete = list(self.incomplete_gl)
|
||||
lcomplete = list(self.cgl)
|
||||
lincomplete = list(self.igl)
|
||||
|
||||
self.color_complete_gl = self.colors
|
||||
self.color_incomplete_gl = 2 * ["grey"]
|
||||
|
|
@ -165,7 +165,7 @@ class PlotAC(PamhyrPlot):
|
|||
if txt == "":
|
||||
continue
|
||||
|
||||
if txt.strip() in self.complete_gl:
|
||||
if txt.strip() in self.cgl:
|
||||
color = self.color_complete_gl[
|
||||
lcomplete.index(txt) % len(self.color_complete_gl)
|
||||
]
|
||||
|
|
@ -185,7 +185,7 @@ class PlotAC(PamhyrPlot):
|
|||
annotation.set_position((station[i] + 0., elevation[i] + 0.))
|
||||
self.annotation.append(annotation)
|
||||
|
||||
if txt.strip() in self.complete_gl:
|
||||
if txt.strip() in self.cgl:
|
||||
x_gl_complete.append(station[i])
|
||||
y_gl_complete.append(elevation[i])
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1193,7 +1193,8 @@ class ResultsWindow(PamhyrWindow):
|
|||
# b[2] right
|
||||
# b[3] top
|
||||
if b[2] > b[0] and b[1] < b[3]:
|
||||
self.canvas.axes.imshow(img.transpose((1, 2, 0)), extent=[b[0], b[2], b[1], b[3]])
|
||||
self.canvas.axes.imshow(img.transpose((1, 2, 0)),
|
||||
extent=[b[0], b[2], b[1], b[3]])
|
||||
else:
|
||||
dlg = CoordinatesDialog(
|
||||
self.canvas.axes.get_xlim(),
|
||||
|
|
@ -1202,7 +1203,6 @@ class ResultsWindow(PamhyrWindow):
|
|||
parent=self
|
||||
)
|
||||
if dlg.exec():
|
||||
self.canvas.axes.imshow(img.transpose((1, 2, 0)), extent=dlg.values)
|
||||
self.canvas.axes.imshow(img.transpose((1, 2, 0)),
|
||||
extent=dlg.values)
|
||||
self.plot_xy.idle()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue