Page History
...
NOTE: There are two conventions for mapping pixels to an image, called "Cartesian" (row/column array indices are x/y) and "matrix" (row/column array indices are y/x) which are transposes of each other, as discussed here: https://eli.thegreenplace.net/2014/meshgrids-and-disambiguating-rows-and-columns-from-cartesian-coordinates/. psana uses the Cartesian convention. This is shown by the following example:. If we used the matrix convention then the size of the x/y shapes would be flipped.
Code Block |
---|
(ana-4.0.43) psanagpu101:~$ cat junk.py from psana import * runnum = 610 ds = DataSource('exp=xpptut15:run='+str(runnum)) det = Detector('jungfrau4M') im_x = det.image_xaxis(runnum) im_y = det.image_yaxis(runnum) for evt in ds.events(): img = det.image(evt) break print('Image shape:',img.shape,'X shape:',im_x.shape,'Y shape:',im_y.shape) (ana-4.0.43) psanagpu101:~$ python junk.py ('Image shape:', (2203, 2299), 'X shape:', (2203,), 'Y shape:', (2299,)) (ana-4.0.43) psanagpu101:~$ |
...
Overview
Content Tools