Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/pyFAI/geometry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,7 @@ def center_array(self, shape=None, unit="2th_deg", scale=True):
"""

unit = to_unit(unit)
space = unit.name.split("_")[0]
key = space + "_center"
key = f"{unit.space}_center"
ary = self._cached_array.get(key)

shape = self.get_shape(shape)
Expand Down Expand Up @@ -966,7 +965,7 @@ def delta_array(self, shape=None, unit="2th_deg", scale=False):
"""

unit = to_unit(unit)
space = unit.name.split("_")[0] + "_delta"
space = f"{unit.space}_delta"
ary = self._cached_array.get(space)

shape = self.get_shape(shape)
Expand Down
2 changes: 1 addition & 1 deletion src/pyFAI/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self, name, scale=1, label=None, equation=None, formula=None,
:param period: None or the periodicity of the unit (angles are periodic)
"""
self.name = name
self.space = name.split("_")[0] # used to idenfify compatible spaces.
self.space = "_".join(self.name.split("_")[:-1]) # used to idenfify compatible spaces.
self.scale = scale
self.label = label if label is not None else name
self.corner = corner
Expand Down
Loading