Skip to content

Reflectometry Beamline Parameters

Thomas Lohnert edited this page Jun 1, 2020 · 18 revisions

Wiki > The Backend System > Specific Device IOC > Miscellaneous motion control > Reflectometry IOC > Beamline Parameters

Beamline parameters represent high-level values a user may wish to set. They can have blocks or the GUI controls pointed at them. These parameters are transformations of low-level motor values. The reflectometry server creates the following PVs for each parameter (where <BASE> is <PREFIX>:REFL:PARAM:<NAME>):

  • <BASE> - Readback: the value as calculated from the low-level motor positions.
  • <BASE>:SP - Setpoint: when set, the reflectometry server will move the parameter this value
  • <BASE>:SP:RBV - Setpoint read-back: the last value that this parameter was moved to.
  • <BASE>:SP_NO_ACTION - if this is set the setpoint is stored but not applied to the motor until the next time a move is triggered on this parameter.
  • <BASE>:ACTION - moves this parameter to the setpoint
  • <BASE>:RBV:AT_SP - True if readback value is within tolerance of the setpoint
  • <BASE>:CHANGED - True if this setpoint has changed since the last time this parameter was moved
  • <BASE>:IN_MODE - True if the parameter is in the currently active beamline mode
  • <BASE>:CHANGING - True if the parameter readback value is currently changing (i.e. an underlying motor is moving)
  • <BASE>:DEFINE_POSITION_AS - redefines the current parameter readback to the given value (does not move the motor)

For more information on implementation specifics see the Reflectometry Configuration page

Theta Readback Calculation

The theta beam line parameter is special because it depends on other items in the beamline. All other components are independent except for the incoming beam from a previous component.

Theta readback is: Half the sum of the incoming angle and outgoing angle at the point where the incoming beam hits the sample axis (this is the axis in the theta component setup). The incoming beam is calculated from the component before the theta component. The outgoing angle is calculated by using the list of components set on the theta component in the configuration. It find the first component in that list which is in the beam, it then reads its actual position and takes away any setpoint offset.

For example, on CRISP it is the angle to the detector which is in the beam. If both detectors are in the beam the point detector is used. The offset to that detector is then taken away from the current position and this is the angle used to calculate theta. From a coding point of view, this means when the readback or setpoint position of a component in this list is updated then the readback is updated.

Theta Setpoint Calculation

The setpoint for theta is special because all it does is change the beam path it does not affect any underlying PVs. However in disabled mode, the incoming beam is no longer altered and this means changing theta would have no effect on the component it is pointing at, e.g. changing Theta would not alter the position of the detector. To fix this there is a special route to force an incoming beam path to be set. This should allow the component defining theta to move when theta is changed.

Parameter Initialisation

When starting the IOC, the beamline parameter values are initialized. The intended behaviour is that if you restart the reflectometry IOC, it should come back exactly in the state you left it in.

  • Readback values are set to their real current values based on the physical motor positions, i.e. they behave the same as they do at any given moment in time the reflectometry IOC is up.
  • Setpoints are initialized in one of two ways, based on what the parameters have their autosave attribute set to.
    • If autosave=False, it will initialise the setpoint based on motor value, i.e. it will be the same as the readback value. This is the default behaviour.
    • If autosave=True, the setpoints will be initialized to a value read from a file in the Instrument\Var area. If this affects the beam path (e.g. the autosaved value is the supermirror angle), parameters of components further along the beam path will be computed to be correct given the real motor position and the altered beam path. A parameter's autosave value is updated in the file every time that parameter is moved.

In some cases, autosaved parameters are necessary. Example:

Init Theta

Theta is defined by the angle between the sample point and the next component it is angled to (e.g. the point detector). However, the detector itself can also have an offset parameter that moves it to a given position relative to the beam. On intialisation we only have one value for the height of the detector, however we cannot tell which portion of that height comes from theta and which portion comes from the detector offset parameter without saving one of the two values.

Clone this wiki locally