Skip to content

numpydoc build for gaussian.py #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update for FWHM and maxwidth
  • Loading branch information
stevenhua0320 committed Aug 22, 2024
commit 32174508ae13bc537a9a74eddb314a8bcea7d7c7
8 changes: 4 additions & 4 deletions src/diffpy/srmise/peaks/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ def _jacobianraw(self, pars, r, free):

This method calculates the partial derivatives of a Gaussian function
with respect to its parameters, considering a limiting width. The Gaussian's
width approaches its maximum (`fwhm`) as the effective width parameter
width approaches its maximum FWHM (maxwidth) as the effective width parameter
(`pars[1]`) tends to infinity.

Parameters
----------
pars : array-like
Sequence of parameters defining a single width-limited Gaussian:
- pars[0]: Peak position.
- pars[1]: Effective width, which scales up to the full width at half maximum (fwhm) as
- pars[1]: Effective width, which scales up to the full width at half maximum (fwhm=maxwidth) as
`pars[1]` approaches infinity. It is mathematically represented as `tan(pi/2 * fwhm / maxwidth)`.
- pars[2]: Multiplicative constant 'a', equivalent to the peak area.

Expand Down Expand Up @@ -349,8 +349,8 @@ def _valueraw(self, pars, r):
"""Compute the value of a width-limited Gaussian for the specified parameters at given radial distances.

This function calculates the value of a Gaussian distribution, where its effective width is constrained and
related to the full width at half maximum (FWHM). As `pars[1]` approaches infinity,
the effective width reaches `maxwidth`. The returned values represent the Gaussian's intensity
related to the maxwidth. As `pars[1]` approaches infinity,
the effective width reaches `FWHM` (maxwidth). The returned values represent the Gaussian's intensity
across the provided radial coordinates `r`.

Parameters
Expand Down
Loading