Position Bliss objects in space
Requested by id11 @wright
We need a way to position Bliss objects (axis, detector, sample, ...) in the beamline coordinate system.
Nexus file
The Nexus standard has NXtransformations to position objects using a chain of rigid transformations in the standard Nexus frame
For example this is how you would position a sample and a detector:
instrument:NXinstrument
reference_frame:NXtransformations # <<< new addition
beam[...]
@transformation_type=general
@vector=0,0,1
@depend_on=gravity
gravity[...]
@transformation_type=general
@vector=0,1,0
positioners:NXpositioner
detz[...]
rot[...]
chi[...]
phi[...]
transformations:NXtransformations # <<< new addition
detz[...]
@transformation_type=translation
@vector=0,0,1
@depend_on=../../reference_frame/beam
phi[...]
@transformation_type=rotation
@vector=0,1,0
@depends_on=chi
chi[...]
@transformation_type=rotation
@vector=0,0,1
@depends_on=rotz
rotz[...]
@transformation_type=rotation
@vector=0,1,0
eiger1:NXdetector
depends_on=../positioners/detz # <<< new addition
sample:NXsample
depends_on=../instrument/positioners/phi # <<< new addition
Bliss YAML files
Create a new controller protocol TransformationObject
and a Transformations
class
- class: Transformations # <<< new addition
- name:reference_frame # define our reference frame with respect to the Nexus frame
- name: gravity
type: general
direction: [0,1,0]
value: -1
- name: beam
type: general
direction: [0,0,1]
value: 1
depend_on: gravity
- class: mockup
axes:
- name: rotz
...
unit: deg
transformations: # <<< new addition
- name: ...
type: rotation
offset: ...
direction: ...
value: ...
depend_on: $reference_frame
- name: lima_simulator
plugin: bliss
class: Lima
tango_url: id00/limaccds/simulator1
transformations: # <<< new addition
...
The $
syntax makes sure we can get information from objects that might not be in the session, similar to ICAT metadata.