Skip to content

Commit 7c2d269

Browse files
committed
fix unfettered growth of sample dimensions
1 parent c31c408 commit 7c2d269

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hexrdgui/pinhole_correction_editor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,15 @@ def correction_kwargs(self, v):
154154
if v is None:
155155
return
156156

157+
vp = v.copy()
157158
# These units are in mm, but we display in micrometers
158159
for key, value in v.items():
159-
if key in ('num_phi_elements', 'absorption_length'):
160+
if key in ('num_phi_elements'):
160161
multiplier = 1
161162
else:
162163
multiplier = 1e3
163164

164-
v[key] = value * multiplier
165+
vp[key] = value * multiplier
165166

166167
physics = HexrdConfig().physics_package
167168
if physics is None:
@@ -201,7 +202,7 @@ def correction_kwargs(self, v):
201202
for w_name, (key, value) in values.items():
202203
if w_name.startswith(widget_prefix):
203204
# Extract the value from the dict
204-
value = v.get(key, value)
205+
value = vp.get(key, value)
205206

206207
w = getattr(self.ui, w_name)
207208
w.setValue(value)

0 commit comments

Comments
 (0)