From 5adca041b5c6fdd4c1dd780a134cfb3f01d55aa8 Mon Sep 17 00:00:00 2001 From: ext-ndoye_m Date: Thu, 25 Jul 2024 11:12:49 +0200 Subject: [PATCH] Update Config_Detector, some parameters in EpicsDetector have to be defined. --- Config_Detector.md | 239 ++++++++++++++++++++++++++------------------- 1 file changed, 136 insertions(+), 103 deletions(-) diff --git a/Config_Detector.md b/Config_Detector.md index 89a0e6d..519ddef 100644 --- a/Config_Detector.md +++ b/Config_Detector.md @@ -1,97 +1,101 @@ # Detector + Definitions of the set of detector hardware available. The file contains a JSON structure listing a set of fields that correspond to detector instances. The field name defines the detector name and the field value is another JSON structure declaring the configuration parameters. Note that _Pixelator_ expects detectors that measure multiple values for each scan point (e.g. area detector) to also return a single value summarizing the measurement at each scan point. - **active**::
- Integer value that defines if the detector should be used (value of 1) or ignored (value of 0).
- **Default**: 0 +**active**::\ + Integer value that defines if the detector should be used (value of 1) or ignored (value of 0). \ + **Default**: 0 - - **type**::
- String value that identifies which hardware interface will handle the detector behaviour. The set of allowed values is listed near the beginning of [`Detector.h`](https://gitlab.psi.ch/microspectro/pixelator/-/blob/master/PixelatorController/src/Detector.h#L23), for example: +**type**::\ + String value that identifies which hardware interface will handle the detector behaviour. The set of allowed values is listed near the beginning of [`Detector.h`](https://gitlab.psi.ch/microspectro/pixelator/-/blob/master/PixelatorController/src/Detector.h#L23), for example: `enum Type { Base, Counter, Analog, Interferometer, Orchestra, OrocosPosition, OrocosSampler, Epics, Tcp, Zmq, PandAPos };` - **subType**::
- String value that defines how the detector. Only current usage is "time" for a "Base"-type detector that reports the linux epoch (clock value in terms of seconds since 1970).
- **Default**: empty string +**subType**::\ + String value that defines how the detector. Only current usage is "time" for a "Base"-type detector that reports the linux epoch (clock value in terms of seconds since 1970).\ + **Default**: empty string - **nexus_name**::
- String value defines the label string to be used in NeXus files, since these must conform to a specific naming scheme.
- **Default**: detector name string +**nexus_name**::\ + String value defines the label string to be used in NeXus files, since these must conform to a specific naming scheme. \ + **Default**: detector name string - **unit**::
- String value that defines the unit of the physical quantity being measured by the detector.
- **Default**: empty string +**unit**::\ + String value that defines the unit of the physical quantity being measured by the detector. \ + **Default**: empty string - **hardwareUnitFactor**::
- Double value that defines conversion factor between values used by the controller and by _Pixelator_.
- **Default**: 1.0 +**hardwareUnitFactor**::\ + Double value that defines conversion factor between values used by the controller and by _Pixelator_. \ + **Default**: 1.0 - **hardwareUnitOffset**::
- Double value that defines offset between values used by the controller and by _Pixelator_.
- **Default**: 0.0 +**hardwareUnitOffset**::\ + Double value that defines offset between values used by the controller and by _Pixelator_. \ + **Default**: 0.0 - **autoRecord**::
- Boolean value that defines if the detector is to be silently (no selection option present to the user) recorded in the _/entry*/instrument/_ section of the nexus file.
- **Default**: 0 +**autoRecord**::\ + Boolean value that defines if the detector is to be silently (no selection option present to the user) recorded in the _/entry\*/instrument/_ section of the nexus file. \ + **Default**: false - **monitor**::
- Boolean value that defines if the detector is to be treated as a [monitor](https://manual.nexusformat.org/datarules.html?highlight=monitor#monitors-are-special) and recorded in the NeXus file as an [NXmonitor](https://manual.nexusformat.org/classes/base_classes/NXmonitor.html).
- **Default**: 0 +**monitor**::\ + Boolean value that defines if the detector is to be treated as a [monitor](https://manual.nexusformat.org/datarules.html?highlight=monitor#monitors-are-special) and recorded in the NeXus file as an [NXmonitor](https://manual.nexusformat.org/classes/base_classes/NXmonitor.html). \ + **Default**: false - **asynchronous**::
- Boolean value that indicates that a detector communicates the measured values asynchronously.
- **Default**: 0 +**asynchronous**::\ + Boolean value that indicates that a detector communicates the measured values asynchronously. \ + **Default**: false - **detailedDataDimensions**::
- Array that defines the size of the size and shape (per scan point) of the extra _data_detail_ values to be recorded in _/entry*/instrument/detector/data_detail_, alongside the standard detector data. When this optional property is not defined, no _data_detail_ dataset is recorded. For example, a declaration of `"detailedDataDimensions" : [2],` would result in a _data_detail_ dataset array of size [N,2], where N is the number of scan points. +**detailedDataDimensions**::\ + Array that defines the size of the size and shape (per scan point) of the extra _data_detail_ values to be recorded in _/entry\*/instrument/detector/data_detail_, alongside the standard detector data. When this optional property is not defined, no _data_detail_ dataset is recorded. For example, a declaration of `"detailedDataDimensions" : [2],` would result in a _data_detail_ dataset array of size \[N,2\], where N is the number of scan points. Further configuration parameters are type-dependent. ## Counter - **devicePath**::
- String value that defines the filesystem address of the device. May be used together with **subdevice** and **channel**
+**devicePath**::\ + String value that defines the filesystem address of the device. May be used together with **subdevice** and **channel. Default:** empty string - **subdevice**::
- Integer value that defines part of a device address. May be used together with **devicePath** and **channel**.
- **Default**: 0 +**subdevice**::\ + Integer value that defines part of a device address. May be used together with **devicePath** and **channel**. \ + **Default**: 0 - **clockSource**::
- Integer value that defines the address of the clock used to define the counting time intervals.
- **Default**: 0 +**clockSource**::\ + Integer value that defines the address of the clock used to define the counting time intervals. \ + **Default**: 0 ## Analog - **devicePath**::
- String value that defines the filesystem address of the device. May be used together with **subdevice** and **channel**
+**devicePath**::\ + String value that defines the filesystem address of the device. May be used together with **subdevice** and **channel. Default:** empty string - **subdevice**::
- Integer value that defines part of a device address. May be used together with **devicePath** and **channel**.
- **Default**: 0 +**subdevice**::\ + Integer value that defines part of a device address. May be used together with **devicePath** and **channel**. \ + **Default**: 0 - **channel**::
- Integer value that defines part of a device address. Used together with **devicePath** and **subdevice**.
- **Default**: 0 +**channel**::\ + Integer value that defines part of a device address. Used together with **devicePath** and **subdevice**. \ + **Default**: 0 -## Orchestra and Interferometer +## OrchestraDetector - **controller**::
- String value that defines the controller that handles the detector.
+**controller**::\ + String value that defines the controller that handles the detector. - **axis**::
- Integer value that defines which axis the "Interferometer" type detector measures along.
- **Default**: 0 +## OrocosPositionDetector -## OrocosPosition +**controller**::\ + String value that defines the controller that handles the detector. + +**axis**::\ + Integer value that defines which axis the "Interferometer" type detector measures along. \ + **Default**: 0 ## OrocosSampler No further configuration options. -## Epics +## EpicsDetector Simple, single-valued EPICS detectors only need to provide a channel name, for example: + ```json "voltage" : { "active" : 1, @@ -99,70 +103,99 @@ Simple, single-valued EPICS detectors only need to provide a channel name, for e "channel": "X07DA-ES1-USER:AI0", }, ``` + An Epics type detector will cause _Pixelator_ to wait for a response from EPICS at each scan point. An alternative is to configure a **readOnly** positioner with the [**orchestraDetector** parameter](Config_Positioner#orchestra-detector), which will sample the most recent value of the EPICS channel without waiting for anything. However, detectors that provide multiple values, e.g. area detectors, tend to also have significant read-out times and so require a bit more work to coordinate. Communication of the dwell time, pixel/scan-point index, triggering and file path/names can all be communicated via EPICS channels. - **channel**::
- String value that defines the EPICS channel that the detector will source data from.
- **Default**: empty string +**channel**::\ + String value that defines the EPICS channel that the detector will source data from.\ + **Default**: empty string - **channeldetails**::
- String value that defines the EPICS channel where _Pixelator_ should expect to read the _data_detail_ values.
- **Default**: empty string +**channelDetails**::\ + String value that defines the EPICS channel where _Pixelator_ should expect to read the _data_detail_ values. \ + **Default**: empty string - **setTimeChannel**::
- String value that defines (for an "Epics" detector) the EPICS channel where _Pixelator_ provides the dwell time of the current scan point. This is commonly used for the exposure setting of an area detector. The value pushed to the EPICS channel is calculated by T×**hardwareTimeFactor** - **hardwareTimeOffset**, where T is the dwell time in ms used by Pixelator.
- **Default**: empty string +**channelSetTime**::\ + String value that defines (for an "Epics" detector) the EPICS channel where _Pixelator_ provides the dwell time of the current scan point. This is commonly used for the exposure setting of an area detector. The value pushed to the EPICS channel is calculated by T×**hardwareTimeFactor** - **hardwareTimeOffset**, where T is the dwell time in ms used by Pixelator.\ + **Default**: empty string - **channelStart**::
- String value that defines the EPICS channel that _Pixelator_ should use to communicate a trigger for the detector to begin a measurement. _Pixelator_ will set this channel to `1` when it wants to trigger the detector and then will monitor the channel for a change in value, upon which _Pixelator_ will move the instrument to the next scan point. (i.e. the detector should change the channel value to indicate it has finished the measurement.)
- **Default**: empty string +**channelStart**::\ + String value that defines the EPICS channel that _Pixelator_ should use to communicate a trigger for the detector to begin a measurement. _Pixelator_ will set this channel to `1` when it wants to trigger the detector and then will monitor the channel for a change in value, upon which _Pixelator_ will move the instrument to the next scan point. (i.e. the detector should change the channel value to indicate it has finished the measurement.) \ + **Default**: empty string - **channelCtr**::
- String value that defines the EPICS channel where _Pixelator_ provides the index of the current scan point (i.e. an integer value that starts at 0 and increases with each scan point).
- **Default**: empty string +**channelStatus**::\ + **Default**: empty string - **channelFilename**::
- String value that defines the EPICS channel where _Pixelator_ provides the file name where the detector should record data during the scan. This is for cases where the detector sends the full data directly to the file and only the summary data is sent to _Pixelator_.
- **Default**: empty string +**writeStatus**::\ + **Default**: empty string - **channelFilepath**::
- String value that defines the EPICS channel where _Pixelator_ provides the file path where the detector should record data during the scan. To be used together with **channelFilename**.
- **Default**: empty string +**channelTrigger**::\ + **Default**: empty string - **hardwareTimeFactor**::
- Double value that defines the factor to convert the dwell time (ms) used by _Pixelator_ to the dwell time value to be provided to the **setTimeChannel** EPICS channel.
- **Default**: 1.0 +**channelCtr**::\ + String value that defines the EPICS channel where _Pixelator_ provides the index of the current scan point (i.e. an integer value that starts at 0 and increases with each scan point). \ + **Default**: empty string - **hardwareTimeOffset**::
- Double value that defines the offset to convert the dwell time (ms) used by _Pixelator_ to the dwell time value to be provided to the **setTimeChannel** EPICS channel.
- **Default**: 0.0 +**channelFilename**::\ + String value that defines the EPICS channel where _Pixelator_ provides the file name where the detector should record data during the scan. This is for cases where the detector sends the full data directly to the file and only the summary data is sent to _Pixelator_.\ + **Default**: empty string - **getDataTimeout**::
- Double value that defines the number of seconds to wait for data to be received before moving on to the next scan point. Data that is not received is written as `NaN` in data file.
- **Default**: 0.15 +**channelFilepath**::\ + String value that defines the EPICS channel where _Pixelator_ provides the file path where the detector should record data during the scan. To be used together with **channelFilename**.\ + **Default**: empty string - **details**::
- Integer value that defines the length of the data array (always 1D) that will be returned by an "Epics" detector. Note that Pixelator requires detectors to additionally return a summary of the data array as a single value per scan point.
- **Default**: 0 +**filepathBase**::\ + **Default**: empty string -## Zmq +**beginOfScanScript**::\ + **Default**: empty string - **zmqPublisher**::
- String value that defines the ZMQ network address and port that _Pixelator_ should subscribe to in order to receive the detector data. For example `"tcp://x07da-qutag-1.psi.ch:5563"`.
- **Default**: empty string +**hardwareTimeFactor**::\ + Double value that defines the factor to convert the dwell time (ms) used by _Pixelator_ to the dwell time value to be provided to the **setTimeChannel** EPICS channel. \ + **Default**: 1.0 - **zmqRequester**::
- String value that defines the ZMQ network address and port that _Pixelator_ should use to communicate measurement parameters and scheduling details with the detector. For example `"tcp://x07da-qutag-1.psi.ch:5564"`. The current implementation (11.11.2022) does not actually use the requester port for anything, but a feature set similar to that of the Epics type detector is planned where communication will be performed over this ZMQ requester port.
- **Default**: empty string +**hardwareTimeOffset**::\ + Double value that defines the offset to convert the dwell time (ms) used by _Pixelator_ to the dwell time value to be provided to the **setTimeChannel** EPICS channel. \ + **Default**: 0.0 - **getDataTimeout**::
- Double value that defines the number of seconds to wait for data to be received before moving on to the next scan point. Data that is not received is written as `NaN` in data file.
- **Default**: 0.15 +**multiTigger**::\ + **Default**: 0 - **details**::
- Integer value that defines the length of the data array (always 1D) that will be returned by the detector. Note that _Pixelator_ requires detectors to additionally return a summary of the data array as a single value per scan point.
- **Default**: 0 +**multiTiggerDelay**::\ + **Default**: 0.0 -## PandAPos +**getDataTimeout**::\ + Double value that defines the number of seconds to wait for data to be received before moving on to the next scan point. Data that is not received is written as `NaN` in data file.\ + **Default**: 0.15 + +**details**::\ + Integer value that defines the length of the data array (always 1D) that will be returned by an "Epics" detector. Note that Pixelator requires detectors to additionally return a summary of the data array as a single value per scan point.\ + **Default**: 0 + +## ZmqDetector + +**zmqPublisher**::\ + String value that defines the ZMQ network address and port that _Pixelator_ should subscribe to in order to receive the detector data. For example `"tcp://x07da-qutag-1.psi.ch:5563"`.\ + **Default**: empty string + +**zmqRequester**::\ + String value that defines the ZMQ network address and port that _Pixelator_ should use to communicate measurement parameters and scheduling details with the detector. For example `"tcp://x07da-qutag-1.psi.ch:5564"`. The current implementation (11.11.2022) does not actually use the requester port for anything, but a feature set similar to that of the Epics type detector is planned where communication will be performed over this ZMQ requester port.\ + **Default**: empty string + +**getDataTimeout**::\ + Double value that defines the number of seconds to wait for data to be received before moving on to the next scan point. Data that is not received is written as `NaN` in data file.\ + **Default**: 0.15 + +**details**::\ + Integer value that defines the length of the data array (always 1D) that will be returned by the detector. Note that _Pixelator_ requires detectors to additionally return a summary of the data array as a single value per scan point.\ + **Default**: 0 + +## PandAPositionDetector + +**controller**::\ + String value that defines the controller that handles the detector. + +**axis**::\ + Integer value that defines which axis the "Interferometer" type detector measures along. \ + **Default**: 0 \ No newline at end of file