Git Product home page Git Product logo

Comments (4)

LMSC-NTappy avatar LMSC-NTappy commented on July 18, 2024

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.

jlaehne avatar jlaehne commented on July 18, 2024

Thanks for the initiative.

In principle, I would add a function var2eV similar to

def data2eV(data, factor, ax0, evaxis):

It would differ only by the additional squaring (your 4th line). Then in

def to_eV(self, inplace=True, jacobian=True):

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.

LMSC-NTappy avatar LMSC-NTappy commented on July 18, 2024

from lumispy.

jordiferrero avatar jordiferrero commented on July 18, 2024

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)

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.