Reflectometry Config Training ‐ Exercise 3 - ISISComputingGroup/ibex_developers_manual GitHub Wiki

Wiki > The Backend System > Specific Device IOC > Miscellaneous motion control > Reflectometry IOC > Reflectometry Configuration > Reflectometry Config Training > Exercise 3


Jump To Section
  1. Overview & Setup
  2. The Basics
  3. Building Up The Beamline Model
  4. Modes
  5. Theta
  6. Parking Components
  7. Beamline Parameter Misc
  8. Engineering Corrections
  9. The Bench

Modes

Next, we will look at modes. Modes are a way to configure the beamline/tracking model for different types of experiment at runtime at the push of a button. Modes achieve this through a number of features:

  • You can choose which parameters should automatically track the beam, i.e. they move to stay aligned to the reflected beam when it changes
  • You can define a set of default parameter values to apply when you enter the mode (and optionally, to re-apply on every beamline move)
  • You can choose for engineering corrections to only apply to certain modes (more on that later)

In the following exercise we will categorize the parameters we have added so far by mode and give them some default values.

Exercise 3

Make the following changes to your config.py:

  • In addition to NR mode, add another mode called PNR to your config using the add_mode helper method.
  • Add each parameter to the appropriate modes using the modes argument e.g. add_parameter(AxisParameter(...), modes=[nr])
    • Slits should track the beam in every mode
    • The Super Mirror should track the beam in PNR mode only
    • The sample axes should never track the beam automatically. This is because the scientists don't want this component to move implicitly on beam changes, only when they explicitly tell it to

To Test

  1. Once you have made these changes, restart the REFL_01 IOC.
  2. You should now be able to switch between NR and PNR mode via the front panel OPI.
  3. When doing so, you should see a little green "M" appear/disappear next to parameters, indicating whether they are part of the currently selected mode.
  4. Try moving sm_angle. You should now see s2_offset automatically staying aligned to the reflected beam, while sa_offset and sa_phi are not (as they were prior to this exercise)
⚠️ **GitHub.com Fallback** ⚠️