Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
phyy-nx committed Sep 19, 2024
1 parent d4f9996 commit d952a1f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/nexus/test_mpccd_nexus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from __future__ import annotations

import dxtbx


def test_mpccd_nexus_gain(dials_data):
"""
Tests SACLA MPCCD image from CXI.DB 221
Includs parameter data_scale_factor, which accounts for a gain of 10
"""

try:
h5path = (
dials_data("image_examples", pathlib=True)
/ "SACLA-MPCCD-run197287-0-nexus.h5"
)
except Exception as e:
print(type(e), str(e))
raise
img = dxtbx.load(h5path)

d = img.get_detector()

assert d[0].get_gain() == 10

0 comments on commit d952a1f

Please sign in to comment.