Skip to content

Commit

Permalink
Solve time-lapse bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lgelman committed Feb 18, 2019
1 parent 1960591 commit a242c6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Yannick_W1Johnson_time-lapse4ch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
VV.Stage.XPosition = float(stagePos['X'])
VV.Stage.YPosition = float(stagePos['Y'])
VV.Stage.ZPosition = float(stagePos['Z'])
VV.Macro.Control.WaitFor('VV.Stage.IsMoving', "==", False)
# acquire setting1
VV.Acquire.WaveLength.Current = 1
VV.Acquire.WaveLength.Illumination ='Yannick-conf405withBF'
Expand All @@ -69,12 +70,16 @@
VV.Window.CloseAll(False)

# wait for next time-point
currenttime = datetime.datetime.now()
print (currenttime.strftime("series acquistion ended at %H:%M:%S"))
nexttime = timestart + datetime.timedelta(0, (timepoint+1)*TimeInterval)
if timepoint+1 == TimePoints:
print ("Done")
break
print (nexttime.strftime("Next time-point at %H:%M:%S"))
VV.Macro.Control.Delay(((nexttime-time0).total_seconds())*1000,'ms')
delay = nexttime-currenttime
print ("still so much to wait... "+str(delay.seconds))
VV.Macro.Control.Delay(delay.seconds,'sec')


VV.Acquire.Sequence.BaseName = basename

0 comments on commit a242c6e

Please sign in to comment.