Hi All, how can I read the Centroid-X/Centroid-Y value from the Detectorviewer in ZPL?
Thanks in advance
Jannis
Hi All, how can I read the Centroid-X/Centroid-Y value from the Detectorviewer in ZPL?
Thanks in advance
Jannis
Hi Jannis,
Since you want ZPL to give you a number, you are looking for a Numeric Function, and the numeric function that does this is NSDD(surf, object, pixel, data). Surf should be used for mixed-mode, otherwise it can be left to one. Object is the object number corresponding to the detector. Then, pixel and data should be chosen according to the table in the Help File under The Optimize Tab (non-sequential ui mode) > Automatic Optimization Group (optimize tab, non-sequential) > Merit Function Editor (optimize tab, non-sequential) > NSC Operands. There are multiple centroid definition. One of them, for example, is
Pix# | Data# | Output |
-6 | 0 | The x coordinate of the centroid of the flux data |
Therefore, if you use pixel = -6, and data = 0, the NSDD numeric function should return the centroid of the flux data. Here’s how it looks on a dummy example.
Let me know if this answers your question, and take care,
David
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.