Formatting fixes

This commit is contained in:
Richard Bowman 2021-03-31 09:40:31 +01:00
parent 300d6878bb
commit 1cea75be70
4 changed files with 31 additions and 32 deletions

View file

@ -218,6 +218,7 @@ def cleanup():
atexit.register(cleanup)
def ofm_serve():
# Start a debug server
from labthings import Server
@ -226,6 +227,7 @@ def ofm_serve():
server: Server = Server(app)
server.run(host="0.0.0.0", port=5000, debug=debug_app, zeroconf=True)
# Start the app if the module is run directly
if __name__ == "__main__":
ofm_serve()

View file

@ -140,10 +140,7 @@ def sharpness_edge(image: np.ndarray) -> float:
n: int = 20
edge: np.ndarray = np.array([[-1] * n + [1] * n])
return float(
np.sum(
[np.sum(ndimage.filters.convolve(gray, W) ** 2)
for W in [edge, edge.T]]
)
np.sum([np.sum(ndimage.filters.convolve(gray, W) ** 2) for W in [edge, edge.T]])
)

View file

@ -281,9 +281,7 @@ class SangaDeltaStage(SangaStage):
np.divide(2, np.sqrt(3)), np.divide(self.flex_b, self.flex_h)
)
y_fac: float = -1 * np.divide(self.flex_b, self.flex_h)
z_fac: float = np.multiply(
np.divide(1, 3), np.divide(self.flex_b, self.flex_a)
)
z_fac: float = np.multiply(np.divide(1, 3), np.divide(self.flex_b, self.flex_a))
self.Tvd: np.ndarray = np.array(
[