This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Beamline Energy Implementation
rtuck99 edited this page Nov 21, 2023
·
7 revisions
(Work In Progress)
Currently beamline energy is controlled in GDA from within beamlineSpecificEnergy.py
There is a class beamLineSpecificEnergy
which inherits from beamLineEnergy
To do the alignment there are two implementations AutomatedAlign
and QuickAlign
in beamLineEnergy it basically does the equivalent of
def align_beam(self, quick_align): # Re-align button
if quick_align:
self.QuickAlign()
else:
self.energyController.moveTo(self.getPosition())
self.align_beam_worker()
- The entry point for setting the energy is in
beamLineEnergy.asynchronousMoveTo
which overrides theasynchronousMoveTo
inScannable
.ScannableMotionBase
delegatesmoveTo
to the async version. -
asynchronousMoveTo
ultimately callsasynchronousMoveTo_worker
inbeamLineSpecificEnergy
-
asynchronousMoveTo_worker
performs a number of operations all on separate threads and then waits for them to finish-
asynchronousMoveTo_worker
creates a MoveVfmThread instance, which initialises VFM_X and VFM_Y stripe according to both the current and requested energy. -
asynchronouseMoveTo_worker
sets the focus mode Not sure if we need to implement this -
asynchronouseMoveTo_worker
sets detector energy Don't think we need to do this -
asynchronouseMoveTo_worker
sets energy inChangeEnergyThread
, this is where it setsBeamLineEnergy_Bragg_eV
and then callsenergyController.moveTo()
-
asynchronouseMoveTo_worker
callsmirrorFocus.check_voltages()
(when and if depends on factors) -
asynchronouseMoveTo_worker
callsalign_beam_worker()
in the superclass which delegates toalign_beam_specific_worker()
-
asynchronouseMoveTo_worker
keeps all its async threads tracked inenergy_threads
array and waits for them to complete at the end of the func
-
- Open the experiment shutter
- Read initial state (Think this is what
setParameters
does) - close camera shutter
- set attenuator transmission
- disable feedback loop
- set roll converter to target value
- If full XBPM feedback
- find peak gaussian strategy #1
- else
- find peak gaussian strategy #2
- set slit size
- reset attenuation
- reenable feedback loop
AutomatedAlign
- is referenced by
HandleCollectRequests
indo_automated_align()
but the latter appears to be unused
QuickAlign
- not referenced by anything but is probably a manual entry point