remote_exec_processing: style

This commit is contained in:
Robert Jördens 2016-04-14 19:06:01 +08:00
parent 4a297f0c42
commit b36eded2e1
1 changed files with 4 additions and 2 deletions

View File

@ -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)