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

Add moving screen projection center calibration to kikuchipy.detectors module #322

Merged
merged 4 commits into from
Feb 10, 2021

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Feb 10, 2021

Description of the change

  • Add kikuchipy.detectors.PCCalibrationMovingScreen class to perform and plot the moving screen projection/pattern center calibration method first presented in this paper
  • Expand reference frame user guide notebook with a walk through of how to get a PC estimate using this class
  • Other minor improvements to the reference API documentation

Progress of the PR

Minimal example of the bug fix or new feature

>>> import kikuchipy as kp
>>> s_in = kp.data.silicon_ebsd_moving_screen_in()
>>> s_out5mm = kp.data.silicon_ebsd_moving_screen_out5mm()
>>> cal = kp.detectors.PCCalibrationMovingScreen(
...    pattern_in=s_in.data,
...    pattern_out=s_out5mm.data,
...    points_in=[(109, 131), (390, 139), (246, 232)],
...    points_out=[(77, 146), (424, 156), (246, 269)],
...    delta_z=5,
...    px_size=46 / 508,
... )
>>> cal.pc
PCCalibrationMovingScreen: (PCx, PCy, PCz) = (0.5123, 0.8606, 0.4981)
3 points:
[[[109 131]
  [390 139]
  [246 232]]

 [[ 77 146]
  [424 156]
  [246 269]]]
>>> cal.plot()

cal.plot() produces this plot

image

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the
    unreleased section in doc/changelog.rst.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes self-assigned this Feb 10, 2021
@hakonanes hakonanes added the enhancement New feature or request label Feb 10, 2021
@hakonanes hakonanes added this to the v0.4.0 milestone Feb 10, 2021
@hakonanes
Copy link
Member Author

Will merge after checks pass.

@hakonanes hakonanes merged commit bad8891 into pyxem:master Feb 10, 2021
@hakonanes hakonanes deleted the pc-calibration branch February 10, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant