Skip to content

Commit 8f66a09

Browse files
authored
Merge pull request #2448 from kif/2447_lambda_9M
Declare shape of the Lambda9M detector.
2 parents 0014ad8 + 5300b60 commit 8f66a09

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/pyFAI/detectors/_xspectrum.py

+21-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Project: Fast Azimuthal integration
55
# https://github.com/silx-kit/pyFAI
66
#
7-
# Copyright (C) 2022-2024 European Synchrotron Radiation Facility, Grenoble, France
7+
# Copyright (C) 2022-2025 European Synchrotron Radiation Facility, Grenoble, France
88
#
99
# Principal author: Jérôme Kieffer ([email protected])
1010
#
@@ -34,7 +34,7 @@
3434
__contact__ = "[email protected]"
3535
__license__ = "MIT"
3636
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
37-
__date__ = "25/06/2024"
37+
__date__ = "20/02/2025"
3838
__status__ = "production"
3939

4040
import numpy
@@ -51,6 +51,7 @@ class _Lambda(Detector):
5151
# This detector does not exist but those are place-holder
5252
MODULE_SIZE = (256, 256)
5353
MODULE_GAP = (4, 4)
54+
DUMMY = 0
5455
force_pixel = True
5556

5657
def __init__(self, pixel1=55e-6, pixel2=55e-6, max_shape=None, module_size=None, orientation=0):
@@ -128,3 +129,21 @@ class Lambda10M(_Lambda):
128129
"""
129130
MAX_SHAPE = (2596, 4676)
130131
aliases = ["Lambda 10M"]
132+
133+
class Lambda9M(_Lambda):
134+
"""
135+
LAMBDA 9M detector
136+
"""
137+
MAX_SHAPE = (3868, 3227)
138+
aliases = ["Lambda 9M"]
139+
140+
def calc_mask(self):
141+
"""
142+
Returns a generic mask for module based detectors...
143+
"""
144+
if self.max_shape is None:
145+
raise NotImplementedError("Generic Lambda detector does not know"
146+
"its max size ...")
147+
mask = numpy.zeros(self.max_shape, dtype=numpy.int8)
148+
logger.warning("Lambda9M mask is detector specific, no pixel are actually masked")
149+
return mask

0 commit comments

Comments
 (0)