-
Notifications
You must be signed in to change notification settings - Fork 37
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
Computed decay time is incorrect #51
Comments
Derivative used in e4f8ea1 appears to be incorrect: f = lambda t: sum(Ia*exp(-La*(t-To)) for Ia, La in data) - target
df = lambda t: sum(La*Ia*(To-1)*exp(-La*(t-To)) for Ia, La in data) It is okay when To = 0, which is probably why it seems to work. This function needs a fuller review. [correction] It is okay when t=1 since the derivative with respect to t should be: df = lambda t: sum(-La*Ia*exp(-La*(t-To)) for Ia, La in data) This is only used in the root-finding code. It appears to be finding the correct value despite the incorrect derivative otherwise it would be throwing a runtime error. Using the correct code should make it converge faster. |
Even with the corrected df/dt the resulting time does not have total activation matching the target value. Need to verify that formulas for decay time and activation are consistent. |
After further investigation, the step sizes in the fit are too tiny because the exponential. I will instead adjust the intensities to the time at the guess and fit relative to that. Then the fit ends in a few short Newton steps. |
See scattering/activation#17
The text was updated successfully, but these errors were encountered: