mirror of https://gitlab.com/pamhyr/pamhyr2
pep8
parent
400f6be9e3
commit
c702862bc4
|
|
@ -12,3 +12,5 @@ shapely>=2.0.1
|
||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
platformdirs>=4.2.0
|
platformdirs>=4.2.0
|
||||||
pyshp>=2.3.1
|
pyshp>=2.3.1
|
||||||
|
rasterio==1.3.11
|
||||||
|
#fortranformat==2.0.3
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ class CoordinatesDialog(PamhyrDialog):
|
||||||
def setup_connections(self):
|
def setup_connections(self):
|
||||||
for t in self._values:
|
for t in self._values:
|
||||||
self.find(QPushButton,
|
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):
|
def reset(self, t):
|
||||||
self.spinbox[t].setValue(self._values[t])
|
self.spinbox[t].setValue(self._values[t])
|
||||||
|
|
|
||||||
|
|
@ -148,10 +148,10 @@ class PlotAC(PamhyrPlot):
|
||||||
gl = profile.geometry.names()
|
gl = profile.geometry.names()
|
||||||
|
|
||||||
self.annotation = []
|
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)
|
lcomplete = list(self.cgl)
|
||||||
lincomplete = list(self.incomplete_gl)
|
lincomplete = list(self.igl)
|
||||||
|
|
||||||
self.color_complete_gl = self.colors
|
self.color_complete_gl = self.colors
|
||||||
self.color_incomplete_gl = 2 * ["grey"]
|
self.color_incomplete_gl = 2 * ["grey"]
|
||||||
|
|
@ -165,7 +165,7 @@ class PlotAC(PamhyrPlot):
|
||||||
if txt == "":
|
if txt == "":
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if txt.strip() in self.complete_gl:
|
if txt.strip() in self.cgl:
|
||||||
color = self.color_complete_gl[
|
color = self.color_complete_gl[
|
||||||
lcomplete.index(txt) % len(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.))
|
annotation.set_position((station[i] + 0., elevation[i] + 0.))
|
||||||
self.annotation.append(annotation)
|
self.annotation.append(annotation)
|
||||||
|
|
||||||
if txt.strip() in self.complete_gl:
|
if txt.strip() in self.cgl:
|
||||||
x_gl_complete.append(station[i])
|
x_gl_complete.append(station[i])
|
||||||
y_gl_complete.append(elevation[i])
|
y_gl_complete.append(elevation[i])
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -1193,7 +1193,8 @@ class ResultsWindow(PamhyrWindow):
|
||||||
# b[2] right
|
# b[2] right
|
||||||
# b[3] top
|
# b[3] top
|
||||||
if b[2] > b[0] and b[1] < b[3]:
|
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:
|
else:
|
||||||
dlg = CoordinatesDialog(
|
dlg = CoordinatesDialog(
|
||||||
self.canvas.axes.get_xlim(),
|
self.canvas.axes.get_xlim(),
|
||||||
|
|
@ -1202,7 +1203,6 @@ class ResultsWindow(PamhyrWindow):
|
||||||
parent=self
|
parent=self
|
||||||
)
|
)
|
||||||
if dlg.exec():
|
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()
|
self.plot_xy.idle()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue