Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is in the XtcExplorer, in its cspad utility class CsPad. The function that computes the coordinates is called once, at class creation time, but could equally well be loaded from a numpy array (perhaps we'll do this in the future). For now this serves as an example of how to compute this pixel coordinate maps.

Wiki Markup
There's currently no function that uses these coordinates for plotting. The pixel coordinate map is mostly useful if you want to find the location of individual spots, e.g. Bragg peaks, in your data. You can then get the x-coordinate from the x_coordinates array using the same indices that you use to get the data value. I.e. you find a peak of interest in quad#2, section#4, row 33, column 102, you'll find the x and y-coordinate from x_coordinates\[2,4,33,102\] and y_coordinates\[2,4,33,102\].

The coordinates

The coordinates of the optical measurements are defined by X, Y, Z, where (0,0,0) is at the nominal beam spot, and X points along the long side of section 1, Y points towards section 3 and Z points downstream. The unit of the measurements are micrometers, but the computed pixel coordinates here have been converted to pixel units (based on the average effective pixel size). Each quad coordinate system is rotated by 90 degrees w.r.t. the next one.

...