Skip to content

Commit

Permalink
Fixed est time method variables and calculations.
Browse files Browse the repository at this point in the history
  • Loading branch information
earik87 committed Jul 13, 2024
1 parent 71857fe commit 96d80e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/instruments/thorlabsStage/lts150m.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions app/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
Expand Down

0 comments on commit 96d80e0

Please sign in to comment.