soft-matter / trackpy

Python particle tracking toolkit
http://soft-matter.github.io/trackpy
Other
442 stars 131 forks source link

any way to select points for fit_powerlaw? #623

Closed khoroshyy closed 4 years ago

khoroshyy commented 4 years ago

Hi. Is there a way to limit points used in fit_powerlaw(em1). Lets say use the first 90%? Thanks. Petro

rbnvrw commented 4 years ago

Hi Petro, you can filter the DataFrame before passing it to the fit_powerlaw function:

em1 = em1.head(10)  # selects the first 10 rows

Have a look here: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html Good luck!