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

Error function for FCS with non-Gaussian MDF #36

Open
Janhagenkrohn opened this issue Dec 17, 2019 · 0 comments
Open

Error function for FCS with non-Gaussian MDF #36

Janhagenkrohn opened this issue Dec 17, 2019 · 0 comments

Comments

@Janhagenkrohn
Copy link

Is your feature request related to a problem? Please describe.
We are currently trying to analyze some TIR-FCS data, and tried to use ChiSurf for that. The problem: For that (and other non-Gaussian MDFs, like Lorentzian) we need the error function erf(x), which is not supported right now.

We already received a partial solution with a new parse.py for the 2017 release which supports the "classical" error function erf(x), which kind of worked. Two problems remain (see attachments), which I assume are connected:

  1. The fit does not converge (when I press "Fit", I get NaN in all free parameters).
  2. Towards long lag times, the model returns nonsense. I am not 100 % sure why, but my experience using erf(x) and modifications thereof (erfc(x), erfcx(x)) in Origin suggests that it's due to the extreme values returned by the error function, causing overflow/underflow. That's why I would also like a dedicated solver for the scaled complementary error function erfcx(x)=exp(x^2)*(1-erf(x)), which will circumvent the problem if I'm right about my assumption. At least when testing in Origin, it did.

Describe the solution you'd like
Introduction of error function erf(x), complementary error function erfc(x), and scaled complementary error function erfcx(x) into ChiSurf models, and perhaps addition of simple TIR-FCS models (see Hassler et al. BiophysJ 2005 and Hassler et al. Opt Expr 2005) as default models in future release. I can also contribute the latter, once the former is taken care of.

Describe alternatives you've considered

Additional context
Screenshot of model in ChiSurf (parameters manually set, not fitted):
Capture

JSON file with model as used in screenshot (sorry in advance if there is a comma error again):
3D_TIR-Gauss_Model_json.txt

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