areaDetector / ADCore

The home of the core components of the EPICS areaDetector software. It includes base classes for drivers and code for all of the standard plugins.
https://areadetector.github.io/master/index.html
Other
20 stars 65 forks source link

NDPluginProcess scale and offset #500

Closed domitto closed 6 months ago

domitto commented 6 months ago

Hi Mark, I was trying to use the NDPluginProcess and had issues with the offset portion not working as expected. The documentation mentions that the processing step consists of: Array = Array * Scale + Offset

I looked at the code and this seems to be the culprit: https://github.com/areaDetector/ADCore/blob/89a5a2af8126d8476c1d0f6e806a9d62b6c25c7b/ADApp/pluginSrc/NDPluginProcess.cpp#L171C1-L171C63

MarkRivers commented 6 months ago

This is a problem with the documentation, not the code.

The description of how AutoOffsetScale works is consistent with the equation Array = (Array + Offset) Scale, not Array = Array Scale + Offset.

I will change the documentation in 2 places.

MarkRivers commented 6 months ago

The documentation is now fixed: https://areadetector.github.io/areaDetector/ADCore/NDPluginProcess.html