European-XFEL / karabo_data

Python tools to read and analyse data from European XFEL
https://karabo-data.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
13 stars 7 forks source link

Support 2D array layouts for CrystFEL format geometry. #191

Closed takluyver closed 5 years ago

takluyver commented 5 years ago

Fixes #190. This was easier than I expected, thanks to @antarcticrainforest's work to describe the array dimensions for write_crystfel_geom. To use it for a 2D array, pass:

geom.write_crystfel_geom(..., dims=('frame', 'ss', 'fs')

The default dims has an extra entry 'modno'. The absence of this causes it to spread modules out along the slow-scan dimension instead.

I've also moved the CrystFEL writing code to a separate module so it's easier to see. To review the real functional changes here, ignore the first two commits.

takluyver commented 5 years ago

Here's a link to view only the changes after the reorganisation:

https://github.com/European-XFEL/karabo_data/pull/191/files/bffb25a3cdb270197e751127f70eb258bd106767..57c60d9a341dd3d507b11750bda57fd8ac5dd724

antarcticrainforest commented 5 years ago

LGTM

takluyver commented 5 years ago

Nice, double LGTM :-D