Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rotation series overlays eta period #1194

Merged
Merged
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
7 changes: 6 additions & 1 deletion hexrd/ui/overlays/rotation_series_overlay.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np

from hexrd.findorientations import _process_omegas
from hexrd.transforms.xfcapi import mapAngle

from hexrd.ui.constants import OverlayType, ViewType
from hexrd.ui.overlays.constants import (
Expand Down Expand Up @@ -41,7 +42,6 @@ def __init__(self, material_name, crystal_params=None, eta_ranges=None,
self.eta_ranges = eta_ranges
self.ome_ranges = ome_ranges
self.ome_period = ome_period
# FIXME: eta_period is currently not in use
self.eta_period = eta_period
self.aggregated = aggregated
self.ome_width = ome_width
Expand Down Expand Up @@ -196,6 +196,11 @@ def generate_overlay(self):
angles = valid_angs[0][:, :2]
omegas = valid_angs[0][:, 2]

# Fix eta period
angles[:, 1] = mapAngle(
angles[:, 1], np.radians(self.eta_period), units='radians'
)

if display_mode == ViewType.polar:
data = np.degrees(angles)
elif display_mode in [ViewType.raw, ViewType.cartesian]:
Expand Down