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

ENH: overhaul of singlet fitting methods #146

Closed
bennyrowland opened this issue Sep 14, 2020 · 0 comments · Fixed by #147
Closed

ENH: overhaul of singlet fitting methods #146

bennyrowland opened this issue Sep 14, 2020 · 0 comments · Fixed by #147
Assignees

Comments

@bennyrowland
Copy link
Member

The current model for singlet fitting uses a VARPRO approach where the linear components (the peak amplitudes) are fitted in a linear least squares step independently from the non-linear (width, frequency, phase) components. This is more efficient because no iteration is needed for those parameters, and it reduces the size of the non-linear search space, however it also makes constraints between the peak amplitudes impossible to introduce, and also gives challenges in returning fit standard errors because of the split in method. I propose to modify the singlet fitting code to use entirely non-linear methods - this will allow much greater alignment with the standard lmfit template and so give more flexibility to the fitting, allowing different optimisation algorithms to be specified, for example.

@bennyrowland bennyrowland self-assigned this Sep 14, 2020
bennyrowland added a commit that referenced this issue Sep 26, 2020
This PR modifies the singlet fitting model to use the LMFit Model
functionality directly and directly returns the ModelFit result,
allowing all the relevant information from lmfit to be available,
including the covariance matrix, standard errors and confidence
intervals. The JSON file format for models is preserved, but models
can also be created directly from LMFit model components.

Closes #146
bennyrowland added a commit that referenced this issue Sep 26, 2020
This PR modifies the singlet fitting model to use the LMFit Model
functionality directly and directly returns the ModelFit result,
allowing all the relevant information from lmfit to be available,
including the covariance matrix, standard errors and confidence
intervals. The JSON file format for models is preserved, but models
can also be created directly from LMFit model components.

Closes #146
bennyrowland added a commit that referenced this issue Sep 29, 2020
This PR modifies the singlet fitting model to use the LMFit Model
functionality directly and directly returns the ModelFit result,
allowing all the relevant information from lmfit to be available,
including the covariance matrix, standard errors and confidence
intervals. The JSON file format for models is preserved, but models
can also be created directly from LMFit model components.

Closes #146
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

Successfully merging a pull request may close this issue.

1 participant