Comments (4)
Dear @jordiferrero,
thank for putting a comment on this. Indeed, it would be great to implement this! I think it is much of a problem, the noise properties of hyperspy admit a signal object of the same dimensions as the data object in the sig.metadata.Signal.Noise_properties.variance
properties of the object. There's even a method dedicated to setting it up: data_ev.estimate_poissonian_noise_variance(sev_varmap)
Based on my workflow, I would do something like this:
variance_map_nm = data_nm.get_variance_map() #Assuming that a variance map already exists
data_eV = data_nm.to_eV() #Considering that the jacobian conversion is performed
EnergyAxis = data_eV.axes_manager.signal_axes[0] #To get axis points of the energy axis
variance_map_eV = sev._deepcopy_with_new_data(\
varmap.isig[::-1].data*(hc/EnergyAxis**2)**2) #Jacobian-square renormalised energy map
data_eV.estimate_poissonian_noise_variance(variance_map_eV )
What do you think?
from lumispy.
Thanks for the initiative.
In principle, I would add a function var2eV
similar to
Line 108 in 34a247b
It would differ only by the additional squaring (your 4th line). Then in
one would check whether the variance in the metadata is set and if yes call the conversion. Thus the transformation would be integrated directly in
to_eV()
.
We would have to do the same for to_invcm
.
I could draft a PR proposal later today, unless you want to do it yourself.
from lumispy.
from lumispy.
Just to document this discussion for the future.
@jlaehne has set as default the s.estimate_poissonian_noise_variance()
for estimating the noise in any general noise signal.
However, if you pass in your own noise signal, as @LMSC-NTappy suggests, then the Jacobian transformation also works.
from lumispy.
Related Issues (20)
- 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
- Slicing TransientSpec HOT 22
- `to_eV()` function and non-uniform axis HOT 1
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.