Skip to content
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

A general handling of sigma equals or close to zero #84

Closed
yaelbh opened this issue Jun 6, 2021 · 1 comment
Closed

A general handling of sigma equals or close to zero #84

yaelbh opened this issue Jun 6, 2021 · 1 comment

Comments

@yaelbh
Copy link
Contributor

yaelbh commented Jun 6, 2021

What happens in the different experiments if the ydata's sigma is equal to zero or close to it? Is it what we want to happen? Is it the same for all the experiments?

@yaelbh
Copy link
Contributor Author

yaelbh commented Aug 3, 2021

Looks like it's already being taken care of in the curve_fit method:

    # Format non-number sigma values
    if np.all(np.isnan(sigma)):
        sigma = None
    else:
        sigma = np.nan_to_num(sigma)
        if np.count_nonzero(sigma) != len(sigma):
            # Sigma = 0 causes zero division error
            sigma = None

@yaelbh yaelbh closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant