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 in walkthrough guide during particle filtering #775

Open
imruffin opened this issue Sep 2, 2024 · 0 comments
Open

Error in walkthrough guide during particle filtering #775

imruffin opened this issue Sep 2, 2024 · 0 comments

Comments

@imruffin
Copy link

imruffin commented Sep 2, 2024

Cell 23 in the walkthrough removes individual timesteps that are not compliant, but it needs to remove the entire bad particle trajectory:
t2 = t1[((t1['mass'] > 50) & (t1['size'] < 2.6) & (t1['ecc'] < 0.3))]
should be something like:
t1_means = t1.groupby('particle').mean()
good_particles = t1_means[(t1_means['mass'] > 50) & (t1_means['size'] < 2.6) & (t1_means['ecc']<0.3)]
# particle id is index of good_particles
t2 = t1[t1['particle'].isin(good_particles.index)]

@imruffin imruffin changed the title Bug in walkthrough guide Error in walkthrough guide during particle filtering Sep 2, 2024
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