Open iandobbie opened 3 years ago
complex example could include
Z-stacks Multi-channel (filter wheel or multiple cameras) multi position time lapse with interleaved AO
Updated it a bit, added file writing
`#Python script to do a simple time lapse experiment with python-microsocpe
#
import microscope.testsuite.devices as testdevices import numpy as np import time import tifffile
cam=testdevices.TestCamera() cam.initialize() cam.enable()
filename="timelapse.tif" repeats=10 interval=1 data=np.zeros((cam.get_sensor_shape())) timestamp=np.zeros((repeats))
for i in range(repeats): data[:,:],timestamp[i]=cam.grab_next_data() tifffile.imwrite(filename, data, append=True) time.sleep(interval)
`
We should include the example scripts from the microscope paper as hints to help people utilise the package.
Initial suggestions ofr simple experiment:
`
Python script to do a simple time lapse experiment with microsocpe
copyright ian.dobbie@bioch..ox.ac.uk 2020
#
import microscope.testsuite.devices as testdevices import numpy as np import time
cam=testdevices.TestCamera() cam.initialize() cam.enable()
setup time laspe details
repeats=10 interval=30 data=np.zeros(tuple(list(cam.get_sensor_shape())+[repeats])) timestamp=np.zeros((repeats))
loop over time lapse
for i in range(repeats): data[:,:,i],timestamp[i]=cam.grab_next_data() time.sleep(interval)
`