Xrf fit

This is also very ambiguous:

The gaussian function is

x = A \exp(-0.5 * x^2/\sigma^2)

Where A is the peak height.

What they are doing here is fitting or calculating:

A / (sigma * np.sqrt(2 * np.pi))

Which is the *area* under the gaussian function.

I think that the term “intensity” is just too ambiguous. We should probably use *amplitude* and *area* which are much more clear.

S


On Aug 13, 2014, at 5:37 PM, Eric Dill <notifications@github.com<mailto:notifications@github.com>> wrote:


In nsls2/fitting/model/physics_peak.py:

> +    -----------
> +    A : float
> +        intensity of gaussian function
> +    sigma : float
> +        standard deviation
> +    x : array
> +        data in x coordinate, relative to center
> +
> +    Returns:
> +    --------
> +    counts : array
> +        gaussian peak
> +
> +    """
> +
> +    counts = A / (sigma * np.sqrt(2 * np.pi)) * np.exp(-0.5 * ((dx / sigma)**2))


any reason not to just return on this line instead of declaring counts and then returning it?

—
Reply to this email directly or view it on GitHub<https://github.com/NSLS-II/NSLS2/pull/40/files#r16208037>.