mirror of https://github.com/m-labs/artiq.git
remote_exec_processing: style
This commit is contained in:
parent
4a297f0c42
commit
b36eded2e1
|
@ -20,6 +20,7 @@ def compute_gaussian(r, img_w, img_h,
|
|||
|
||||
def fit(data, get_dataset):
|
||||
img_w, img_h = data.shape
|
||||
|
||||
def err(parameters):
|
||||
r = np.empty((img_w, img_h))
|
||||
compute_gaussian(r, img_w, img_h, *parameters)
|
||||
|
@ -38,6 +39,7 @@ def fit(data, get_dataset):
|
|||
def get_and_fit():
|
||||
if "dataset_db" in globals():
|
||||
logger.info("using dataset DB for Gaussian fit guess")
|
||||
|
||||
def get_dataset(name, default):
|
||||
try:
|
||||
return dataset_db.get(name)
|
||||
|
@ -45,7 +47,7 @@ def get_and_fit():
|
|||
return default
|
||||
else:
|
||||
logger.info("using defaults for Gaussian fit guess")
|
||||
|
||||
def get_dataset(name, default):
|
||||
return default
|
||||
get_dataset = lambda name, default: default
|
||||
return fit(controller_driver.get_picture(), get_dataset)
|
||||
|
|
Loading…
Reference in New Issue