Skip to content

Instantly share code, notes, and snippets.

@0xDBFB7
Created February 12, 2021 19:52
Show Gist options
  • Save 0xDBFB7/41d2c7fd952f5b4ee4b797f24cbcdc7a to your computer and use it in GitHub Desktop.
Save 0xDBFB7/41d2c7fd952f5b4ee4b797f24cbcdc7a to your computer and use it in GitHub Desktop.
Normalized gaussian and first gaussian derivative pulses
# see http://www.cse.yorku.ca/~kosta/CompVis_Notes/fourier_transform_Gaussian.pdf
# http://www.sci.utah.edu/~gerig/CS7960-S2010/handouts/04%20Gaussian%20derivatives.pdf
def normalized_gaussian_pulse(t,fwhm):
sigma = fwhm/2.355
return exp(-((t**2.0)/(2.0*(sigma**2.0))))
def normalized_gaussian_derivative_pulse(t,fwhm):
sigma = fwhm/2.355
return (exp((1.0/2.0) - (t**2.0)/(2.0*sigma**2.0))*t)/sigma
###############################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment