From f658b8cf61d0fd323176b50b205577bd33c7ad10 Mon Sep 17 00:00:00 2001 From: watts Date: Mon, 17 Oct 2022 15:50:56 +0200 Subject: [PATCH] Create Config_Instrument --- Config_Instrument.md | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Config_Instrument.md diff --git a/Config_Instrument.md b/Config_Instrument.md new file mode 100644 index 0000000..ffc699b --- /dev/null +++ b/Config_Instrument.md @@ -0,0 +1,57 @@ +# Instrument +This file defines the content of the NXinstrument group of the scan file (hdf5). +It is a json object with as many entries as needed. One group is made inside the NXinstrument group per entry of this settings file, with the key used as group name. + +See source:trunk/PixelatorController/config/instrument.json for an example. + +### NeXus class +Every top level entry may have a "class" member that is used as the NeXus class of the group. +Without the "class" member, the NeXus class of the group is built using the groups name: "NX" + lower(name) + +Values can be +* strings +* numbers +* [positioner values](#positioner-values) +* arrays of numbers or [positioner values](#positioner-values) +* [value with unit](#value-with-unit) +* objects: + * a nested NeXus group is created + * these nested objects must have a "class" member + +### Conditional Writing +A group may be written conditionally. When a settings object has a "condition" member, its value defines a condition +that must be met in order to write the entire group. The value of the condition has the form:
+`{"operator" : [values]}` + +values can be +* strings +* numbers +* [positioner values](#positioner-values) +* [epics channel values](#epics-channel-values ) + +Only one operator is implemented so far:
+`{"==" : [value1, value2]}` + +### Positioner Values +To write the (numeric) value of a positioner to the NXinstrument section or to use it in a [condition](#conditional-writing), +a value can be a json object with the following members: +* positioner: Name of a [Positioner](#positioner) +* factor (optional): float value. The positioners value is multiplied with this factor. +* offset (optional): float value. The positioners value is added to this offset. + +### Epics Channel Values +To use the (string) value of an epics channel in a [condition](#conditional-writing), +a value can be a json object with the following member: +* epicsChannel: Address of an EPICS channel + +### Value with Unit +As all numeric values should be written with a unit, +a value can be a json object with value and unit:
+`{"value" : value, "unit" : unit}` + +value can be +* numbers +* arrays of numbers + +unit must be a string +