Potential Bug During Stack and Scan

I think I’ve found a bug recently when running a scan. The scan seems to randomly be cut short and the process halts without exiting. This only seems to happen when I change the resolution of the images taken during the scan, if the image resolution is left to default I don’t get this issue.

If you would like to try and replicate, my scan settings were as follows:

Resolution = 960 x 720

X step = 1100
Y step = 800
Z step = 50

X step number = 35
Y step number = 26
Z step number = 1

Medium Autofocus
Coordinate Naming
Snake

Log file is as follows but doesn’t show any errors. The scan process just freezes before updating the progress bar.

[2021-06-30 00:30:25,502] [Thread-3077] [INFO] Running tile scan...
[2021-06-30 00:30:27,541] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa62de660>
[2021-06-30 00:30:28,860] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa601f090>
[2021-06-30 00:30:30,158] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6cd0c90>
[2021-06-30 00:30:31,464] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa62e0390>
[2021-06-30 00:30:32,767] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6047bd0>
[2021-06-30 00:30:34,041] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6047180>
[2021-06-30 00:30:34,560] [Thread-3080] [INFO] Opening from file /var/openflexure/data/micrographs/SCAN_2021-06-29_14-06-47/2021-06-29_14-06-47_0_0_0.jpeg
[2021-06-30 00:30:34,564] [Thread-3082] [INFO] Opening from file /var/openflexure/data/micrographs/SCAN_2021-06-29_19-43-48/2021-06-29_19-43-48_0_0_30.jpeg
[2021-06-30 00:30:35,335] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa5e532d0>
[2021-06-30 00:30:38,100] [Thread-3077] [INFO] Loading /var/openflexure/settings/microscope_settings.json...
[2021-06-30 00:30:38,102] [Thread-3077] [INFO] Loading /var/openflexure/settings/microscope_configuration.json...
[2021-06-30 00:30:38,133] [Thread-3077] [INFO] Starting microscope capture /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,134] [Thread-3077] [INFO] Capturing to <openflexure_microscope.captures.capture.CaptureObject object at 0xa604be50>
[2021-06-30 00:30:38,211] [Thread-3077] [INFO] Writing image data to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,215] [Thread-3077] [INFO] Writing metadata to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,217] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,228] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,230] [Thread-3077] [INFO] Finished writing to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,237] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,248] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_0_0.jpeg
[2021-06-30 00:30:38,250] [Thread-3077] [INFO] 0.10989010989010989
[2021-06-30 00:30:41,329] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6c7b390>
[2021-06-30 00:30:42,597] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6c7b2a0>
[2021-06-30 00:30:43,908] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa58b74b0>
[2021-06-30 00:30:45,210] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa5840180>
[2021-06-30 00:30:46,529] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa58404b0>
[2021-06-30 00:30:47,811] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa58402a0>
[2021-06-30 00:30:49,115] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa4c79450>
[2021-06-30 00:30:51,898] [Thread-3077] [INFO] Starting microscope capture /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:51,902] [Thread-3077] [INFO] Capturing to <openflexure_microscope.captures.capture.CaptureObject object at 0xa6c32470>
[2021-06-30 00:30:52,006] [Thread-3077] [INFO] Writing image data to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,010] [Thread-3077] [INFO] Writing metadata to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,012] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,021] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,022] [Thread-3077] [INFO] Finished writing to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,042] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,053] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_800_0.jpeg
[2021-06-30 00:30:52,056] [Thread-3077] [INFO] 0.21978021978021978
[2021-06-30 00:30:55,135] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa4c79c60>
[2021-06-30 00:30:56,449] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6092a20>
[2021-06-30 00:30:57,768] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa60acdb0>
[2021-06-30 00:30:59,107] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa5cdfab0>
[2021-06-30 00:31:00,393] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa5840030>
[2021-06-30 00:31:01,720] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa605ac60>
[2021-06-30 00:31:03,022] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa604d990>
[2021-06-30 00:31:05,815] [Thread-3077] [INFO] Starting microscope capture /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,820] [Thread-3077] [INFO] Capturing to <openflexure_microscope.captures.capture.CaptureObject object at 0xa62932d0>
[2021-06-30 00:31:05,930] [Thread-3077] [INFO] Writing image data to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,933] [Thread-3077] [INFO] Writing metadata to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,935] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,961] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,962] [Thread-3077] [INFO] Finished writing to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,967] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,979] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_1600_0.jpeg
[2021-06-30 00:31:05,980] [Thread-3077] [INFO] 0.32967032967032966
[2021-06-30 00:31:09,060] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6041ab0>
[2021-06-30 00:31:10,399] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa58b0180>
[2021-06-30 00:31:11,714] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa62f3030>
[2021-06-30 00:31:13,053] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa58b04b0>
[2021-06-30 00:31:14,339] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa5840060>
[2021-06-30 00:31:15,638] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6047060>
[2021-06-30 00:31:16,952] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa62aba50>
[2021-06-30 00:31:19,758] [Thread-3077] [INFO] Starting microscope capture /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,759] [Thread-3077] [INFO] Capturing to <openflexure_microscope.captures.capture.CaptureObject object at 0xa62f6930>
[2021-06-30 00:31:19,848] [Thread-3077] [INFO] Writing image data to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,852] [Thread-3077] [INFO] Writing metadata to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,854] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,865] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,867] [Thread-3077] [INFO] Finished writing to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,888] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,898] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_2400_-30.jpeg
[2021-06-30 00:31:19,900] [Thread-3077] [INFO] 0.43956043956043955
[2021-06-30 00:31:22,977] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa605a660>
[2021-06-30 00:31:24,263] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa4ee9a50>
[2021-06-30 00:31:25,578] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa75f8900>
[2021-06-30 00:31:26,840] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6c675a0>
[2021-06-30 00:31:28,138] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6c673c0>
[2021-06-30 00:31:29,444] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa60bc990>
[2021-06-30 00:31:30,743] [Thread-3077] [INFO] Capturing to <picamerax.array.PiRGBArray object at 0xa6cc4480>
[2021-06-30 00:31:33,548] [Thread-3077] [INFO] Starting microscope capture /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_3200_-30.jpeg
[2021-06-30 00:31:33,551] [Thread-3077] [INFO] Capturing to <openflexure_microscope.captures.capture.CaptureObject object at 0xa5898650>
[2021-06-30 00:31:33,660] [Thread-3077] [INFO] Writing image data to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_3200_-30.jpeg
[2021-06-30 00:31:33,663] [Thread-3077] [INFO] Writing metadata to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_3200_-30.jpeg
[2021-06-30 00:31:33,664] [Thread-3077] [INFO] Writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_3200_-30.jpeg
[2021-06-30 00:31:33,674] [Thread-3077] [INFO] Finished writing Exif data to /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_3200_-30.jpeg
[2021-06-30 00:31:33,675] [Thread-3077] [INFO] Finished writing to disk /var/openflexure/data/micrographs/SCAN_2021-06-30_00-30-25/2021-06-30_00-30-25_0_3200_-30.jpeg

Are you on the Beta release of server (2.10.0b1)? Your issue sounds similar to this post from @Muralig1984 Software Beta release - Announcements - OpenFlexure Forum? But that scan I think completed without terminating, whereas yours does not complete.

I don’t think I’m on the beta release. I had been tinkering with the autofocus extension and thought maybe I had played around so much that I had broken something. However, this also occurred when I made a fresh install of the latest image of the software. I guess another thing I should mention is that I’ve changed the autofocus extension to use the sharpness_edge function instead of the sharpness_sum_lap2 function as I’ve found that to yield better results for the type of samples I’m focussing on (highly reflective).

Edit: I would also like to add that I’m currently writing a paper in which I have used the openflexure server software to achieve results and my optical system is derived from your amazing work. How do I go about properly accrediting your work?

1 Like

That is very strange, particularly the lack of any errors in the log.

As for citing the microscope, the overview paper in biomedical optics express is probably the obvious one, and there is a software preprint that I’m currently trying to find a journal for… Citing it on arXiv is currently the best that can be done :frowning:

Also, do let us know when you have a preprint/publication, it really helps us to keep track of everyone that’s using our work.