Skip to main content
Solved

Reading Centroid-X / Centroid-Y for Detectorviewer in ZPL

  • October 25, 2021
  • 1 reply
  • 443 views

Hi All, how can I read the Centroid-X/Centroid-Y value from the Detectorviewer in ZPL?

Thanks in advance

Jannis

Best answer by David.Nguyen

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

View original
Did this topic help you find an answer to your question?

1 reply

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1112 replies
  • Answer
  • October 25, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings