From 0cde8b717da2c04f8b5ab694d82f3aeaf682627b Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 21 Jan 2019 10:49:59 +0000 Subject: [PATCH] Added fov into microscope RC --- openflexure_microscope/microscope.py | 5 ++++- openflexure_microscope/microscoperc.default.yaml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/microscope.py b/openflexure_microscope/microscope.py index 7c987161..eb36efd6 100644 --- a/openflexure_microscope/microscope.py +++ b/openflexure_microscope/microscope.py @@ -42,9 +42,12 @@ class Microscope(object): if attach_plugins: self.attach_plugins() - # Get name from config, or generate + # Set default parameters if not 'name' in self._config: self._config['name'] = uuid.uuid4().hex + + if not 'fov' in self._config: + self._config['fov'] = [0, 0] # Assumes pi camera 2, and 40x objective def __enter__(self): """Create microscope on context enter.""" diff --git a/openflexure_microscope/microscoperc.default.yaml b/openflexure_microscope/microscoperc.default.yaml index 3c10e6ce..8394b41a 100644 --- a/openflexure_microscope/microscoperc.default.yaml +++ b/openflexure_microscope/microscoperc.default.yaml @@ -7,6 +7,9 @@ video_resolution: [832, 624] image_resolution: [2592, 1944] numpy_resolution: [1312, 976] +# Field of view, in stage steps +fov: [4100, 3146] + # Capture quality jpeg_quality: 75