Class SampleMovementServiceBase
- All Implemented Interfaces:
Findable,SampleMovementService,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
ScannableSampleMovementService
SampleMovementService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected double[]doRotation(double h, double v, double b, double omega) protected abstract doublegetOmega()protected abstract double[]Returns the current position of the sample.voidmoveSampleByMicrons(double h, double v, double b) Moves the sample in 'real-world' microns.voidmoveSampleByMicronsAlongBeamlineAxes(double x, double y, double z) Moves the sample along the beamline's goniometer axes.voidmoveSampleByMicronsAlongStandardAxes(double h, double v, double b) Moves the sample along the three standard goniometer axes.voidsetAxisOrientationMatrix(org.apache.commons.math.linear.RealMatrix axisOrientationMatrix) Sets the beamline-specific axis orientation matrix, which is a 3×3 matrix that defines how the 'standard' axes map onto the beamline's axes.voidsetOmegaDirection(Utilities.OmegaDirection omegaDirection) protected abstract voidsetPosition(double[] position) Sets the current position of the sample.Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
SampleMovementServiceBase
public SampleMovementServiceBase()
-
-
Method Details
-
setOmegaDirection
-
setAxisOrientationMatrix
public void setAxisOrientationMatrix(org.apache.commons.math.linear.RealMatrix axisOrientationMatrix) Sets the beamline-specific axis orientation matrix, which is a 3×3 matrix that defines how the 'standard' axes map onto the beamline's axes. -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
moveSampleByMicrons
Description copied from interface:SampleMovementServiceMoves the sample in 'real-world' microns. When standing behind the goniometer, with the beam travelling right, H +ve is away from you, V +ve is vertically up, and B +ve is along the beam:
In this coordinate system, the B and V axes are not affected by any rotation of the goniometer; they are always orthogonal with respect to the H axis.
To calculate the required physical movement, this method will take into account the rotation of the goniometer. A movement along 'standard' goniometer axes will be calculated using the current value of ω (along with the direction in which the goniometer rotates for a +ve rotation of ω).
- Specified by:
moveSampleByMicronsin interfaceSampleMovementService- Throws:
DeviceException
-
getOmega
- Throws:
DeviceException
-
doRotation
protected double[] doRotation(double h, double v, double b, double omega) -
moveSampleByMicronsAlongStandardAxes
public void moveSampleByMicronsAlongStandardAxes(double h, double v, double b) throws DeviceException Description copied from interface:SampleMovementServiceMoves the sample along the three standard goniometer axes. When standing behind the goniometer, with the beam travelling right, H +ve is away from you. The V and B axes are the axes that rotate as the goniometer rotates.When ω = 0°, V +ve will be vertically up, and B +ve will be along the beam, as with 'real-world' coordinates:
As the goniometer rotates, the V and B axes also rotate. If the goniometer rotates anticlockwise for a +ve rotation of ω, then when ω = 90°:
A beamline-dependent movement will be calculated using the beamline's axis orientation matrix. This simply involves reorienting the three axes.
- Specified by:
moveSampleByMicronsAlongStandardAxesin interfaceSampleMovementService- Throws:
DeviceException
-
moveSampleByMicronsAlongBeamlineAxes
public void moveSampleByMicronsAlongBeamlineAxes(double x, double y, double z) throws DeviceException Description copied from interface:SampleMovementServiceMoves the sample along the beamline's goniometer axes.- Specified by:
moveSampleByMicronsAlongBeamlineAxesin interfaceSampleMovementService- Throws:
DeviceException
-
getPosition
Returns the current position of the sample.- Returns:
- a 3-element double array
- Throws:
DeviceException
-
setPosition
Sets the current position of the sample.- Parameters:
position- a 3-element double array- Throws:
DeviceException
-