afm-analysis / nanite Goto Github PK
View Code? Open in Web Editor NEWFitting and machine-learning based rating of AFM force-indentation data
Home Page: https://nanite.readthedocs.io
License: GNU General Public License v3.0
Fitting and machine-learning based rating of AFM force-indentation data
Home Page: https://nanite.readthedocs.io
License: GNU General Public License v3.0
Sometimes the approach curve (before indentation) exhibits a non-zero slope. While many might be of the opinion that such curves should be discarded altogether, sometimes there is just not enough data of better quality to analyze.
I believe the question is not whether we should avoid such an analysis (because the need is there). But how a solution could look like. There are two approaches with benefits and drawbacks:
Measure the slope and subtract it from the entire approach part (including the indentation part). Here we are effectively manipulating measurement data, which is not so good. In addition we would have to make sure that approach and retract curve "match up" after subtraction of the approach curve. This results in an offset of the approach curve and might also affect hysteresis.
Fit the slope and subtract it only up until the fittted contact point. In contrast to point 1, this is not anymore a preprocessing step, but part of the fit model. Here we are not touching the indentation data, which might be better.
Personally, I would prefer approach 2. Open for discussion. Please attach your data as .zip files to this issue if you would like to contribute to the discussion.
Unhandled exception in PyJibe version 0.14.0:
Traceback (most recent call last):
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\pyjibe\fd\main.py", line 395, in on_curve_list
self.tab_preprocess.apply_preprocessing(fdist)
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\pyjibe\fd\tab_preprocess.py", line 56, in apply_preprocessing
details = fdist.apply_preprocessing(identifiers,
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\nanite\indent.py", line 91, in apply_preprocessing
details = preproc.apply(apret=self,
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\nanite\preproc.py", line 65, in apply
details[pid] = meth(apret, **kwargs)
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\nanite\preproc.py", line 349, in preproc_correct_force_slope
pars = mod.guess(force[:idp], x=abscissa[:idp])
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\lmfit\models.py", line 236, in guess
sval, oval = np.polyfit(x, data, 1)
File "<__array_function__ internals>", line 200, in polyfit
File "C:\Users\abattis\Documents\Python\pythonProject1\venv\lib\site-packages\numpy\lib\polynomial.py", line 638, in polyfit
raise TypeError("expected non-empty vector for x")
TypeError: expected non-empty vector for x
Create a new Python package called afmformats.
...similar to preprocessing decorators. This will make the code a lot cleaner.
...to create memory-efficient copies of Indentation datasets. Useful if the user wants to play with models/parameters without changing the current fit properties.
something about array sizes
This feature was introduced with ca51c57
It might be a good idea to use this as the default contact point estimator. It is quite robust.
Pros:
Cons:
I.e. data are recorded at 1kHz sampling rate, but fits should be performed at 100 Hz sampling rate. See e.g. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7610513/
Currently this is not possible
The minimisation method of Levenberg - Marquardt doesn't work well for exponential decays.
the KVM new model function is being fitted with Nedler (xtol and fool = 1e-20) method on the specific residuals defined in the model function.
Compare with data from previous publications (e.g. https://dx.doi.org/10.3390/polym10101055).
original paper: https://doi.org/10.1098/rspa.1971.0141
visualization: https://doi.org/10.1016/j.colsurfb.2015.06.044
Implement a rating refiner (user sees two curves and decides which one is better). The model is updated at each iteration and the largest deviations are presented to the user.
When the maximum adhesive (pull-off) force F ad is large enough in
comparison with the maximum force F max applied during load-
ing, i.e. for |F ad /F max |> 0.05 [28], which is frequently observed
in retraction curves, Hertzian analysis is no longer valid and
models for adhesive contact of spheres should be invoked. These models
include the JKR (Johnson–Kendall–Roberts), DMT
(Derjaguin–Muller–Toporov), and Maugis modelsThe dimensionless Tabor parameter � = (R� 2 /E 2 � 3 ) 1/3 is
used to choose the suitable model [31]
"D. Tabor, Surface forces and surface interactions, J. Colloid Interface Sci. 58 (1977) 2–13."
nanite should be able to fit the approach and retract segments of creep-compliance data.
afmformats.AFMData
class?Hello,
Pyjibe sometimes fits a flat line (see figure) even though the contact point found is out of the range of tip position. My guess is that this is connected to the negative right range chosen by the user (because the contact point wasn't found correctly in the preprosessing, I had to choose a smaller range)
could you take a look at this?
This should be part of the "baseline correction" preprocessing step with the default being "offset".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.