Skip to content

Commit 767250b

Browse files
committed
Provide omega period to fitGrain
This does change the results of fit-grains slightly. We are currently assessing the changes. The chi-squared remained nearly the same. For one grain, it increased very slightly, and for another grain, it decreased very slightly. Signed-off-by: Patrick Avery <[email protected]>
1 parent 2a3dc19 commit 767250b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

hexrd/fitgrains.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ def fit_grain_FF_reduced(grain_id):
216216
else:
217217
grain_params = fitGrain(
218218
grain_params, instrument, culled_results,
219-
plane_data.latVecOps['B'], plane_data.wavelength
219+
plane_data.latVecOps['B'], plane_data.wavelength,
220+
omePeriod=ome_period,
220221
)
221222
# get chisq
222223
# TODO: do this while evaluating fit???
@@ -289,7 +290,8 @@ def fit_grain_FF_reduced(grain_id):
289290
if num_refl_valid > 12:
290291
grain_params = fitGrain(
291292
grain_params, instrument, culled_results_r,
292-
plane_data.latVecOps['B'], plane_data.wavelength
293+
plane_data.latVecOps['B'], plane_data.wavelength,
294+
omePeriod=ome_period,
293295
)
294296
# get chisq
295297
# TODO: do this while evaluating fit???

hexrd/fitting/grains.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ def fitGrain(gFull, instrument, reflections_dict,
7474
DESCRIPTION.
7575
7676
"""
77-
# FIXME: will currently fail if omePeriod is specifed
78-
if omePeriod is not None:
79-
# xyo_det[:, 2] = rotations.mapAngle(xyo_det[:, 2], omePeriod)
80-
raise RuntimeError
81-
8277
gFit = gFull[gFlag]
8378

8479
# objFuncFitGrain can run *significantly* faster if we convert the

0 commit comments

Comments
 (0)