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 computing of image quality, chunk/pattern modules, some FFT wrappers ++ #157

Merged
merged 24 commits into from
May 6, 2020

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented Apr 30, 2020

Description

Adds:

  • get_image_quality() (following Krieger Lassen, see docstring for reference), get_dynamic_background(), fft_filter(), and normalize_intensity() to the EBSD class.
  • some FFT computation, and filtering routines in kikuchipy.util.barnes, the latter taken from Connelly Barnes' fftfilter.py
  • chunk and pattern processing functions as kikuchipy.util.chunk and kikuchipy.util.pattern modules. These were previously private, but are now part of the public API.
  • improved kikuchipy.util.Window class, with three windows: modified Hann, lowpass FFT filter, and highpass FFT filter, all used by Wilkinson et al. (2006) "High resolution mapping..." (see reference in docstrings). These work nicely with fft_filter(). Note that this class was previously called Kernel. Also new is that it is subclassing numpy.ndarray.
  • remove_dynamic_background() can now create the dynamic background to remove either via a Gaussian filter in real or frequency space, via scipy.ndimage.gaussian_filter() as before, or via the kikuchipy.util.barnes.fft_filter(). The latter is faster.

Renames methods:

  • EBSD.static_background_correction -> EBSD.remove_static_background
  • EBSD.dynamic_background_correction -> EBSD.remove_dynamic_background
  • EBSD.rescale_intensities -> EBSD.rescale_intensity

A Numba dependency is introduced to speed up some computations, like pattern intensity rescaling used in kikuchipy.util.pattern.rescale_intensity, kikuchipy.util.chunk.rescale_intensity, or kikuchipy.signals.ebsd.EBSD.rescale_intensity. In addition, some speed is gained in other routines due to improved use of Dask and a reduction in necessary computations.

Some CSS modifications to the RTD theme has also been done.

The new and changed functionality has been updated in the documentation.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Progress

  • Docstrings updated
  • Code is commented, particularly in hard-to-understand areas
  • Documentation and/or user guide updated
  • All EBSD methods have been tested
  • All kikuchipy.util.chunk functions have been tested
  • Ready for review!

How has this been tested?

  • Many tests have been reworked and updated

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
…image-quality

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 added enhancement New feature or request status: WIP documentation This relates to the documentation maintenance This relates to package maintenance tests This relates to the tests labels Apr 30, 2020
@hakonanes hakonanes added this to the v0.2.0 milestone Apr 30, 2020
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@coveralls
Copy link

coveralls commented Apr 30, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling f822bf4 on hakonanes:image-quality into 3597353 on kikuchipy:master.

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>
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>
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>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
…ence

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes
Copy link
Member Author

Yes, this is a large PR... But the majority of lines reported are the SVG files for the new logo.

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
…eased

Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
@hakonanes hakonanes merged commit d0db783 into pyxem:master May 6, 2020
@hakonanes hakonanes deleted the image-quality branch May 6, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This relates to the documentation enhancement New feature or request maintenance This relates to package maintenance tests This relates to the tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants