Comments (3)
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.
I would propose the following way forward:
- Create a function
print_model_statistics
for theBaseModel
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
forGaussian
). - 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.
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)
- Added Read the Docs support HOT 26
- Docstring formatting in RTD HOT 11
- Transient signal classes HOT 3
- LumiSpy v0.2 HOT 2
- Create a `remove_background_signal` function HOT 1
- Extend functionality of crop_edges HOT 3
- Implementation of Spectroscopy File Readers HOT 18
- Increase coverage HOT 2
- Webhook failing HOT 3
- Adding an interactive way to slice HS over a wavelength range, and view the result spatially! HOT 12
- Consolidate axis conversion codes
- Failure with numpy 1.24.dev
- Slicing of energy/wavenumber signal with isig fails
- Failure with numpy dev HOT 1
- Documentation is broken HOT 3
- Azure tests failing HOT 2
- Find maximum and width of a peak HOT 1
- Reminder: Change doc-links to sphinx
- Fix test for `remove_spikes` HOT 4
- Setting a variance model in the lumispy object after Jacobian transform HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lumispy.