diff --git a/app/instruments/thorlabsStage/lts150m.py b/app/instruments/thorlabsStage/lts150m.py index e49141f..6698b79 100644 --- a/app/instruments/thorlabsStage/lts150m.py +++ b/app/instruments/thorlabsStage/lts150m.py @@ -115,7 +115,7 @@ def move(self, position_in_um): # Get Velocity Params vel_params = self.device.GetVelocityParams() - vel_params.MaxVelocity = Decimal(5.0) # This is a bad idea + vel_params.MaxVelocity = Decimal(5.0) self.device.SetVelocityParams(vel_params) # Move the device to a new position diff --git a/app/light.py b/app/light.py index 0b55862..f910605 100644 --- a/app/light.py +++ b/app/light.py @@ -202,6 +202,7 @@ def estimate_scan_time(self): nStart = self.nStart.value() nStop = self.nStop.value() nStepsize = self.nStepsize.value() + numberOfSteps = (nStop-nStart)/nStepsize nPostmove = self.nPostmove.value() nAvg = self.nAvg.value() @@ -217,9 +218,9 @@ def estimate_scan_time(self): self.post_move_wait_time = Tc * (1+nPostmove) if activeProfile == 'demo': - time = ((self.post_move_wait_time * nAvg)+ 0.025) * (nStop-nStart)/nStepsize + time = ((self.post_move_wait_time * nAvg)+ 0.025) * numberOfSteps #0.025 is a correction value. else: - time = (Tc * (1+nPostmove) * nAvg + nStepsize * 1/120.0) * (nStop-nStart)/nStepsize + time = ((self.post_move_wait_time * nAvg) + (nStepsize / 5000)) * numberOfSteps #5 is the velocity of stage. #TODO: 120.0 here is the velocity of stage. Just pull it from stage class. return time