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

Obtain X-ray lines from incoming arguments rather than metadata #2062

Conversation

dmlundeby
Copy link
Contributor

@dmlundeby dmlundeby commented Sep 23, 2018

Description of the change

Obtain X-ray lines from the intensity signals, rather than from metadata.

Progress of the PR

  • Change implemented
  • add tests
  • ready for review

Minimal example of the bug fix or the new feature

>>> import hyperspy.api as hs
>>> s = hs.load(some_eds_signal, signal_type='EDS_TEM')
>>> s.set_elements(['Al', 'Zn'])
>>> s.add_lines(only_one=False)
>>> s.quantification(s.get_lines_intensity(xray_lines=['Al_Ka', 'Zn_Ka'], method='CL', factors=[1, 1])

This does no longer raise an exception.

My first attempt on bugfix here, hope it works :-)

Should fix #2061

@k8macarthur
Copy link
Contributor

Good spot! This fix looks good to me. It needs a test added. A simple test in the quantification section of test_eds_tem.py should suffice. Check that the x-ray lines used for quantification are those in the intensities list.

Tests the order of elements, when X-ray lines are not in the internal list.
Both the name of the signals and their intensity is tested.
@ericpre ericpre merged commit 6e152fa into hyperspy:RELEASE_next_minor Nov 11, 2018
@ericpre
Copy link
Member

ericpre commented Nov 11, 2018

Thanks @dmlundeby.
Your name on github will be used to make the list of contributor for the next release, so you may want to also add your last name in order to have your full name on the list. This is also used by zenodo when making a DOI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TEM-EDS quantification fails when specifying X-ray lines
4 participants