TJ, Sheila, Patrick
TJ has written code in the ALS arm guardians that will attempt to move the alignment of the ETM to increase the height of the flashes. This morning when maintence started and TJ's owl shift ended he started to test the code, after he left Patrick, Jim and I contuinued to test it. The main message is that this seems promising, we may need to add some steps that optimize the TMS alignment as well.
The new code is in the ALS arm guardians, there is a new state called INCREASE_FLASHES. This scans the test offset over a set of offsets (-1 to +1 urad at the moment, based on data that Jim posted 53415), and checks which position gave the maximum flashes. If it is one of the extremes of the offset list, it will continue to move 1.5 urad more in that direction until it passes the maximum. Once it finds a maxiumum of the flashes for pitch, it will set the opticalign sliders to that offset. If the flashes are above some threhsold, (0.8 at the moment), then it will quit. If the maximum is below that threshold, it will repeat the procedure once for yaw. We have tested this much of the functionality for ETMX, which is all that is currently written.
We tried this several times while debugging, and it did do a good job of restoring the ETM after we misaligned it by a few micro radians. The main change that we made to the code after TJ left is that we edited the variable spot to be the test offset at which we get the maximum flashes, instead of an index, which simplified some things for the case where we need to search further because we didn't reach the maximum.
When Jim was struggling to get the x arm locking in green, we tried this code out. It worked, in that it moved the ETM to increase the flashes, but the maximum flash that we found after one round of pitch and one round of yaw was 0.65. Jim found better flashes manually by also moving TMS. Three next steps would be to add TMS steps to this code, to try testing this on the Y arm, and to test the integration of this with ISC_LOCK, which TJ has drafted but we didn't test today.