Skip to content

Commit 71804ea

Browse files
authored
Merge pull request #1986 from HEXRD/skip-multiply-for-layer-type
Skip multiplication for layer type
2 parents 37eec4e + 22ba3f1 commit 71804ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hexrdgui/pinhole_correction_editor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ def correction_kwargs(self, v: dict[str, Any] | None) -> None:
192192
vp = v.copy()
193193
# These units are in mm, but we display in micrometers
194194
for key, value in v.items():
195-
if key in ('num_phi_elements', 'absorption_length', 'layer_type'):
195+
if key == 'layer_type':
196+
# This is a string, not numeric. Skip conversion.
197+
continue
198+
elif key in ('num_phi_elements', 'absorption_length'):
196199
multiplier = 1.0
197200
else:
198201
multiplier = 1e3

0 commit comments

Comments
 (0)