Git Product home page Git Product logo

Comments (3)

jlaehne avatar jlaehne commented on June 19, 2024

print_summary_statistics works on signals, so on the original data. That gives you already some idea of the homogeneity. If you have multiple peaks, you can do the statistics on an interval of the signal axis with e.g. isig. You need a fit when you want to see the homogeneity for a specific component of a multi-peak signal where either the peaks overlap or if a simple background subtraction is not sufficient. You can convert the parameters of a fit to a signal and then use the print_summary_statistics function (but one parameter at a time) if you want to use it for fit results.

In principle, we should have a models folder like in HyperSpy, in which we place some generic models for typical signal types similar to the EDS and EELS models. In some cases it may even be interesting to have some specific statistics functions for the models.

However, from my experience, one needs rather a variety of specific models for different use cases - though mostly a combination of Gaussians and Lorentzians.

I guess what you could be aiming at is a function that takes any model, identifies the components and for the components the parameters and then calculates statistics on each of those.

Additionally, it would be a possibility to have a function that takes a signal-axis interval as input and calculates statistics on the data for that interval - though in principle it is a one-liner with isig and print_summary_statistics, so maybe no extra function needed.

As in print_summary_statistics, the following would probably be a good starting point: mean, standard deviation (std), maximum (max), minimum (min), first quartile (Q1), median, and third quartile.

from lumispy.

jlaehne avatar jlaehne commented on June 19, 2024

I would propose the following way forward:

  • Create a function print_model_statistics for the BaseModel class in HyperSpy.
  • This function should iterate through the components of the model,
  • and for each component determine the relevant parameters (e.g. A, sigma, centre for Gaussian).
  • The statistics for each parameter should then be printed in a table per component similar as in print_summary_statistics.
  • As mentioned above, it would be good to have the possibility to define an intensity threshold.

It should go into HyperSpy and not LumisSpy as it could then be more general for any model and could be useful also for other types of signals.

@Divitini, do you still want to work on it,? Have you already implemented something that could be a starting point? We have a student who might be able to work on it at some point?

from lumispy.

Divitini avatar Divitini commented on June 19, 2024

Sorry for the delay on this - I'm trying to dig out the code, although it was very basic and can be rewritten easily. I might have a postdoc who could be interested in doing this. I agree on your suggestions on the best way forward, thanks a lot for that!

from lumispy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.