Went on a PEP-8 rampage
This commit is contained in:
parent
f99ad30fb6
commit
0948c9308a
36 changed files with 186 additions and 218 deletions
|
|
@ -3,21 +3,21 @@ import numpy as np
|
|||
from openflexure_microscope.api.v1.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.api.utilities import JsonPayload
|
||||
|
||||
from flask import request, Response, escape, jsonify
|
||||
from flask import request, jsonify
|
||||
|
||||
import logging
|
||||
|
||||
class MeasureSharpnessAPI(MicroscopeViewPlugin):
|
||||
def post(self):
|
||||
payload = JsonPayload(request)
|
||||
return jsonify({'sharpness': self.plugin.measure_sharpness()})
|
||||
|
||||
|
||||
class AutofocusAPI(MicroscopeViewPlugin):
|
||||
def post(self):
|
||||
payload = JsonPayload(request)
|
||||
|
||||
# Figure out the range of z values to use
|
||||
dz = payload.param("dz", default=np.linspace(-300,300,7), convert=np.array)
|
||||
dz = payload.param("dz", default=np.linspace(-300, 300, 7), convert=np.array)
|
||||
|
||||
print("Running autofocus...")
|
||||
task = self.microscope.task.start(self.plugin.autofocus, dz)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue