Fix message formatting and dosctring syntax
This commit is contained in:
parent
25d2f400b1
commit
75bdae5593
3 changed files with 3 additions and 8 deletions
|
|
@ -204,7 +204,7 @@ class ColourChannelDetectLUV(BackgroundDetectAlgorithm):
|
||||||
sample_coverage = self.get_sample_coverage(image)
|
sample_coverage = self.get_sample_coverage(image)
|
||||||
|
|
||||||
is_sample = sample_coverage > self.settings.min_sample_coverage
|
is_sample = sample_coverage > self.settings.min_sample_coverage
|
||||||
message = f"{sample_coverage}% sample"
|
message = f"{sample_coverage:0.1f}% sample"
|
||||||
if not is_sample:
|
if not is_sample:
|
||||||
message = "only " + message
|
message = "only " + message
|
||||||
return is_sample, message
|
return is_sample, message
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"""The core sample scanning functionality for the OpenFlexure Microscope.
|
"""The core sample scanning functionality for the OpenFlexure Microscope.
|
||||||
|
|
||||||
SmartScan provides sample scanning functionality including automatic background
|
SmartScan provides sample scanning functionality including automatic background
|
||||||
detection (via the `CameraThing`) and automatic path planning via
|
detection (via the ``CameraThing``) and automatic path planning via
|
||||||
`scan_planners`. It manages the directories of past scans via `scan_directories`.
|
`scan_planners`. It manages the directories of past scans via `scan_directories`.
|
||||||
It also controls external processes for live stitching composite images, and
|
It also controls external processes for live stitching composite images, and
|
||||||
the creation of the final stitched images.
|
the creation of the final stitched images.
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,12 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
alertBackgroundFraction(r) {
|
|
||||||
let fraction = r.output;
|
|
||||||
// let percentage = (fraction * 100).toFixed(0);
|
|
||||||
this.modalNotify(`Current image is ${fraction.toFixed(0)}% background.`);
|
|
||||||
},
|
|
||||||
alertBackgroundSet() {
|
alertBackgroundSet() {
|
||||||
this.modalNotify(`Background image has been updated`);
|
this.modalNotify(`Background image has been updated`);
|
||||||
},
|
},
|
||||||
alertImageLabel(r) {
|
alertImageLabel(r) {
|
||||||
let label = r.output[0] ? "sample" : "background";
|
let label = r.output[0] ? "sample" : "background";
|
||||||
this.modalNotify(`Current image is ${label}, as ${r.output[1]}`);
|
this.modalNotify(`Current image is ${label} (${r.output[1]})`);
|
||||||
},
|
},
|
||||||
backgroundDetectError() {
|
backgroundDetectError() {
|
||||||
this.modalError(
|
this.modalError(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue