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

Simplify axes conversion code #164

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Conversation

jlaehne
Copy link
Contributor

@jlaehne jlaehne commented Dec 1, 2022

Description of the change

Addresses point 1 in #152.
The axis conversion code was hard to read as routines were repeated for different situations, therefore

  • reduced the differences between inplace=True/False cases
  • and created a generalized utility function to combine code that is universal to the conversions and then call the correct subfunctions

Paves the way for more generalized unit conversion handling (i.e. any conversion between nm, eV and cm^-1).

Progress of the PR

  • Change implemented (can be split into several points),
  • docstring updated (if appropriate),
  • [n/a] update user guide (if appropriate),
  • added tests,
  • added line to CHANGELOG.md,
  • ready for review.

@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (6aa40f2) compared to base (8367838).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #164   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          548       503   -45     
=========================================
- Hits           548       503   -45     
Impacted Files Coverage Δ
lumispy/signals/luminescence_spectrum.py 100.00% <100.00%> (ø)
lumispy/utils/axes.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jlaehne jlaehne merged commit 59ec862 into LumiSpy:main Dec 6, 2022
@jlaehne jlaehne deleted the simplify-transf branch December 6, 2022 20:57
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.

3 participants