Formatting fixes
This commit is contained in:
parent
300d6878bb
commit
1cea75be70
4 changed files with 31 additions and 32 deletions
|
|
@ -218,6 +218,7 @@ def cleanup():
|
||||||
|
|
||||||
atexit.register(cleanup)
|
atexit.register(cleanup)
|
||||||
|
|
||||||
|
|
||||||
def ofm_serve():
|
def ofm_serve():
|
||||||
# Start a debug server
|
# Start a debug server
|
||||||
from labthings import Server
|
from labthings import Server
|
||||||
|
|
@ -226,6 +227,7 @@ def ofm_serve():
|
||||||
server: Server = Server(app)
|
server: Server = Server(app)
|
||||||
server.run(host="0.0.0.0", port=5000, debug=debug_app, zeroconf=True)
|
server.run(host="0.0.0.0", port=5000, debug=debug_app, zeroconf=True)
|
||||||
|
|
||||||
|
|
||||||
# Start the app if the module is run directly
|
# Start the app if the module is run directly
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
ofm_serve()
|
ofm_serve()
|
||||||
|
|
|
||||||
|
|
@ -140,10 +140,7 @@ def sharpness_edge(image: np.ndarray) -> float:
|
||||||
n: int = 20
|
n: int = 20
|
||||||
edge: np.ndarray = np.array([[-1] * n + [1] * n])
|
edge: np.ndarray = np.array([[-1] * n + [1] * n])
|
||||||
return float(
|
return float(
|
||||||
np.sum(
|
np.sum([np.sum(ndimage.filters.convolve(gray, W) ** 2) for W in [edge, edge.T]])
|
||||||
[np.sum(ndimage.filters.convolve(gray, W) ** 2)
|
|
||||||
for W in [edge, edge.T]]
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -281,9 +281,7 @@ class SangaDeltaStage(SangaStage):
|
||||||
np.divide(2, np.sqrt(3)), np.divide(self.flex_b, self.flex_h)
|
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)
|
y_fac: float = -1 * np.divide(self.flex_b, self.flex_h)
|
||||||
z_fac: float = np.multiply(
|
z_fac: float = np.multiply(np.divide(1, 3), np.divide(self.flex_b, self.flex_a))
|
||||||
np.divide(1, 3), np.divide(self.flex_b, self.flex_a)
|
|
||||||
)
|
|
||||||
|
|
||||||
self.Tvd: np.ndarray = np.array(
|
self.Tvd: np.ndarray = np.array(
|
||||||
[
|
[
|
||||||
|
|
|
||||||
6
setup.py
6
setup.py
|
|
@ -64,7 +64,9 @@ setup(
|
||||||
#
|
#
|
||||||
# Note that this is a string of words separated by whitespace, not a list.
|
# Note that this is a string of words separated by whitespace, not a list.
|
||||||
keywords="raspberry pi arduino microscope", # Optional
|
keywords="raspberry pi arduino microscope", # Optional
|
||||||
packages=find_packages(exclude=["contrib", "docs", "tests", "*node_modules*"]), # Required
|
packages=find_packages(
|
||||||
|
exclude=["contrib", "docs", "tests", "*node_modules*"]
|
||||||
|
), # Required
|
||||||
# Specify which Python versions you support
|
# Specify which Python versions you support
|
||||||
python_requires="== 3.7.*",
|
python_requires="== 3.7.*",
|
||||||
# This field lists other packages that your project depends on to run.
|
# This field lists other packages that your project depends on to run.
|
||||||
|
|
@ -156,6 +158,6 @@ setup(
|
||||||
# maintainers, and where to support the project financially. The key is
|
# maintainers, and where to support the project financially. The key is
|
||||||
# what's used to render the link text on PyPI.
|
# what's used to render the link text on PyPI.
|
||||||
project_urls={ # Optional
|
project_urls={ # Optional
|
||||||
"Source": "https://gitlab.com/openflexure/openflexure-microscope-server",
|
"Source": "https://gitlab.com/openflexure/openflexure-microscope-server"
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue