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

Slit scan guess #72

Closed
jackbdoughty opened this issue Nov 22, 2024 · 1 comment
Closed

Slit scan guess #72

jackbdoughty opened this issue Nov 22, 2024 · 1 comment
Assignees

Comments

@jackbdoughty
Copy link
Contributor

Slit scan guess was sometimes strugglnig to converge due to initial guesses outside of the data, this causes all differentials to go to zero for some parameters and hence optimizer cannot work.

Simplified heuristic guessing function that keeps all initial parameters within the bounds of the data seemed to work well to give the optimizer a good chance of converging to a decent fit:

            background = np.min(y)
            inflection0 = np.min(x) + (1/3) * (np.max(x) - np.min(x))
            inflections_diff = (1/3) * (np.max(x) - np.min(x))
            gradient = 2 * (np.max(y) - np.min(y)) / (np.max(x) - np.min(x))
            height_above_inflection1 = (np.max(y) - np.min(y)) / 5.0

Needs unit tests etc adding

@jackbdoughty jackbdoughty self-assigned this Nov 22, 2024
@jackbdoughty
Copy link
Contributor Author

See #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants