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

Issue with 'particle' index and label prevents MSD calculation #778

Open
AWAshley93 opened this issue Jan 9, 2025 · 0 comments
Open

Issue with 'particle' index and label prevents MSD calculation #778

AWAshley93 opened this issue Jan 9, 2025 · 0 comments

Comments

@AWAshley93
Copy link

In trying to calculate the MSD from my particle positions, I get the error below. I did not have issues with this section before.

"ValueError: 'particle' is both an index level and a column label, which is ambiguous."

located in

~\anaconda3\lib\site-packages\trackpy\motion.py in ?(traj, mpp, fps, max_lagtime, statistic, pos_columns)
190 ids = []
191 msds = []
192 # Note: Index is set by msd, so we don't need to worry
193 # about conformity here.
--> 194 for pid, ptraj in traj.groupby('particle'):
195 msds.append(msd(ptraj, mpp, fps, max_lagtime, False, pos_columns))
196 ids.append(pid)
197 results = pandas_concat(msds, keys=ids)

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