Coder Social home page Coder Social logo

Comments (1)

jjhelmus avatar jjhelmus commented on June 15, 2024

I like the idea of adding a note that points out that the 0.6 comes from 1.0 / (2 * sqrt(log(2))) in the docstring of nmrglue.proc_base.gm but I do not like the idea of changing the value in the function itself. For better of worse, the most "standard" definition of the apodization functions the NMR community has are those in NMRPipe and I think nmrglue should use these. Also the gm function is named for NMRPipe's GM function, so I think keeping the results as identical as possible would be best. What I would be in favor of is adding a gauss or gaussian apodization function which applies an exp(-g*_2) based window, using the 1.0 / (2_sqrt(log(2))) constant.

A good explanation of why 1.0 / (2*sqrt(log(2))) * pi * g is used in the definition of the Gaussian apodization is this using this definition the apodization results in the addition of g units of Gaussian line broadening or, put another way, this transforms into a Gaussian function with FWHM of g. Working along these lines would make a good addition to the docstring. The math behind this is:

FFT[exp(-(a * pi * g * t)**2)] = exp( -(pi * f / (a * pi * g))**2) = exp(-(f / (a_g))_*2)

The full width half maximum of this Gaussian is 2 * a * g * sqrt(ln(2))

If a is 1/(2*sqrt(ln(2)) then the FWHM is g.

from nmrglue.

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.