wright-group / yaqc-cmds

A qt-based graphical client for yaq with a focus on coherent multidimensional spectroscopy in the Wright Group.
MIT License
7 stars 4 forks source link

Zero delay offset less easy to determine than in the past #415

Closed DLafayetteII closed 1 year ago

DLafayetteII commented 2 years ago

In yaqc-cmds before yaqc-qtpy, and in pycmds, zero delay was generally updated for delay stages by 1) moving to zero delay, 2) reading off the absolute position of your stage in mm, and 3)setting the zero position of your stage to your current absolute position

In the current yaqc-cmds configuration, there seems to be no way to read your absolute position (step 2), in either the yaqc-cmds gui or in yaqc-qtpy. You can instead read your relative position out in terms of temporal delay or a unit called "mm_delay". The zero position argument does not allow you to input a zero position in units of time, so the most straightforward approach to updating the zero would be to read the current position in "mm_delay", and adding some factor of that value to the zero position (in mm). My problem with this approach is that I think most users would expect that the delay between zero and the current position in time, converted to millimeters, would be equivalent to mm_delay, and thus we should add mm_delay/2 to the zero position to get our new stage position. However, we define "mm_delay" be equal to half of the path length differences that the laser pulses see, not the literal delay length.

To circumvent trying to rationalize what the conversion should be between mm_delay and mm, a user can instead look up the absolute position of the stage, like we have done in the past. This absolute position is not found in the advanced menu of the delay (e.g. d1), and is instead only shown in the 'dependents' of the delay ('d1_stage').

It would be more convenient for the user if the absolute position was shown in the advanced menu of d1 where zero delay is set, as it was previously. Is there an important reason that absolute position is only represented in the dependents level? If we do make absolute mm a unit of d1, can we reflect that unit choice in yaqc-cmds as well? Tangentially, can someone explain the design reasoning of mm_delay = delay(in mm) / 2 ?

DLafayetteII commented 2 years ago

Seeing absolute position of the delay stages in yaqc-cmds would be additionally beneficial in the mean time given Issue #416, where the yaqc-cmds delays do not know where their rails are.