Scan Timelapse Functionality

Hi All. I’m wondering how easy it would be to modify the default scan extension to add a time lapse variable such that the scope scans across a specified grid indefinitely (or for a set amount of scans) with a wait time in between each scan. I’m not the best at coding so any help on this matter would be really useful.


You could do that with a little program on a client that calls the server to run the scan. Then deal with the images taken and wait before asking for another.

As William suggested, I think this is the sort of thing that our PyClient would be really good for:

By using the PyClient, you’d be able to use all the Python datetime libraries, and get much more freedom around how you manage the data being collected.

The libraries README has some simple tutorials.

What I will do though is add a built-in timelapse extension to the to-do list. In the meantime though, running a script is probably easiest.

This looks like the kind of thing that’s simple enough with my limited coding capabilities to play around with.

I’ll give it a go!

Just tried to download the python client but it looks like there’s a version conflict. Any suggestions?

/etc/poetry/lib/poetry/_vendor/py2.7/ RuntimeWarning: The _p                                                                                
osixsubprocess module is not being used. Child process reliability may suffer if                                                                                 
 your program uses threads.
  "program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.16 is not supported by the project (^3.6).
Trying to find and use a compatible version.
Using python3 (3.7.3)
Creating virtualenv openflexure-microscope-client-FiS6qrJl-py3.7 in 
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
NameError: name 'PosixPath' is not defined
Installing dependencies from lock file

The current project's Python requirement (2.7.16) is not compatible with some of the required 
packages Python requirement:
- pytest requires Python >=3.5

Because no versions of pytest match >=5.4,<5.4.3 || >5.4.3,<6.0
and pytest (5.4.3) requires Python >=3.5, pytest is forbidden.
So, because openflexure-microscope-client depends on pytest (^5.4), version solving failed.

I missed this earlier. Those complaints seem to stem from it trying to use Python 2, but wanting python 3.7. Is it possible to force Python 3 before trying to run this?