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

Create a remove_background_signal function #124

Open
4 tasks
jordiferrero opened this issue Apr 29, 2022 · 1 comment
Open
4 tasks

Create a remove_background_signal function #124

jordiferrero opened this issue Apr 29, 2022 · 1 comment
Labels
type: feature request Asking for additional functionality

Comments

@jordiferrero
Copy link
Contributor

Describe the functionality you would like to see.

A method called remove_background_signal where a Signal1D object is subtracted from another Signal1D object.
If the axes don't match (in size, offset and scale for UniformDataAxis), the background signal should be rebinned/interpolated to the main signal axis.

Describe the context

When trying to fix some warning bugs, discussion made us realise of the need to rewrite the depreciated remove_background_from_file for a more HyperSpy like method, as discussed here #114 .

Additional information

Ideally it should also support non-uniform data axes with interpolation.
Maybe add support a for fitting a ScalableFixedPattern as @ericpre proposed.

Things to do

  • Decide on where to add this method: Should it be done here in LumiSpy or in HyperSpy Signal1D class?
  • Decide on the approach to take: Should we use rebinning/interpolation or ScalableFixedPattern?
  • Write the method for UniformDataAxis
  • Expand the method to also work for non-uniform axes.
@jordiferrero jordiferrero added the type: feature request Asking for additional functionality label Apr 29, 2022
@jlaehne
Copy link
Contributor

jlaehne commented Apr 29, 2022

For the method to work with non-uniform axes, we will first have to implement rebinning for non-uniform axes, which would be helpful in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Asking for additional functionality
Projects
None yet
Development

No branches or pull requests

2 participants