Load capture objects from files. Remove YAML database.
This commit is contained in:
parent
f8e647198a
commit
092181348b
9 changed files with 64 additions and 119 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import numpy as np
|
||||
import logging
|
||||
|
||||
from openflexure_microscope.api.v1.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.api.utilities import JsonPayload
|
||||
|
|
@ -19,7 +20,7 @@ class AutofocusAPI(MicroscopeViewPlugin):
|
|||
# Figure out the range of z values to use
|
||||
dz = payload.param("dz", default=np.linspace(-300, 300, 7), convert=np.array)
|
||||
|
||||
print("Running autofocus...")
|
||||
logging.info("Running autofocus...")
|
||||
task = self.microscope.task.start(self.plugin.autofocus, dz)
|
||||
|
||||
# return a handle on the autofocus task
|
||||
|
|
@ -35,7 +36,7 @@ class FastAutofocusAPI(MicroscopeViewPlugin):
|
|||
if backlash < 0:
|
||||
backlash = None
|
||||
|
||||
print("Running autofocus...")
|
||||
logging.info("Running autofocus...")
|
||||
task = self.microscope.task.start(self.plugin.fast_autofocus, dz, backlash=backlash)
|
||||
|
||||
# return a handle on the autofocus task
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class RecalibrateAPIView(MicroscopeViewPlugin):
|
|||
|
||||
# TODO: Figure out the range of z values to use
|
||||
|
||||
print("Starting microscope recalibration...")
|
||||
logging.info("Starting microscope recalibration...")
|
||||
task = self.microscope.task.start(self.plugin.recalibrate)
|
||||
|
||||
# Return a handle on the autofocus task
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from openflexure_microscope.api.v1.views import MicroscopeViewPlugin
|
|||
from openflexure_microscope.api.utilities import JsonPayload
|
||||
|
||||
from flask import request, jsonify, abort
|
||||
|
||||
import logging
|
||||
|
||||
class TileScanAPI(MicroscopeViewPlugin):
|
||||
def post(self):
|
||||
|
|
@ -34,7 +34,7 @@ class TileScanAPI(MicroscopeViewPlugin):
|
|||
metadata = payload.param('metadata', default={}, convert=dict)
|
||||
tags = payload.param('tags', default=[], convert=list)
|
||||
|
||||
print("Running tile scan...")
|
||||
logging.info("Running tile scan...")
|
||||
task = self.microscope.task.start(
|
||||
self.plugin.tile,
|
||||
basename=filename,
|
||||
|
|
|
|||
|
|
@ -67,8 +67,6 @@ def check_module(module_path):
|
|||
def name_from_module(plugin_path):
|
||||
path_array = plugin_path.split('.')
|
||||
|
||||
print(path_array)
|
||||
|
||||
# Truncate namespace of default plugins
|
||||
if path_array[0:2] == ['openflexure_microscope', 'plugins']:
|
||||
path_array = path_array[2:]
|
||||
|
|
@ -129,7 +127,7 @@ class PluginMount(object):
|
|||
def __init__(self, parent):
|
||||
self.parent = parent
|
||||
self.plugins = []
|
||||
print("Creating plugin mount")
|
||||
logging.info("Creating plugin mount")
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue