# Filtering specific particles in particle data

**URL:** https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412
**Category:** ParaView Support
**Created:** [June 15, 2021, 3:06pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412 "2021-06-15T15:06:56Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 15, 2021, 3:06pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/1 "2021-06-15T15:06:56Z")

</div>

Hello,

I have some positions data of a large number of particles over a large number of iterations. Visualizing everything at once over all iterations is therefore a bit of a hassle. I was wondering if there were any possibility to apply some initial filter that would be applied for all iteration e.g. track only particles that start in a given area ?

Thanks for any help !

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 29, 2021, 2:09pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/2 "2021-06-29T14:09:00Z")

</div>

Any chance someone knows the solution ? I guess tracking only some specific particles in time is something elementary but I can’t find the way to do that.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2021, 2:11pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/3 "2021-06-29T14:11:06Z")

</div>

So many solutions for this, simplest would be ExtractSelection or Clip but that depends how you want to filter particles.

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 29, 2021, 2:19pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/5 "2021-06-29T14:19:25Z")

</div>

My problem is that the Clip solution will clip on a given spatial region of the domain and this for only one timestep. What I would like to do is follow over all timesteps only particles that started for instance in region x\>0.5 & x\<0.75 or only particles whose initial velocity where say vel=1. So I would tag these particles initially and follow only them even though they go out of the inital region of interest or if they change their velocity. Is this possible ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2021, 2:21pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/6 "2021-06-29T14:21:18Z")

</div>

Are your particles identified by an id ?

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 29, 2021, 2:27pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/7 "2021-06-29T14:27:12Z")

</div>

Not that I know of…how do I do that ? They all are located in one given block though, is this equivalent ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2021, 2:29pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/8 "2021-06-29T14:29:19Z")

</div>

please share (some timesteps of) your data

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 29, 2021, 2:49pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/10 "2021-06-29T14:49:20Z")

</div>

Here: .nc files with xdmf to read with xdmf reader v1.

[particles\_w\_xdmf.tar.gz](https://discourse.paraview.org/uploads/short-url/owdhluHvxa9EaWmFldmOUbUKOLD.gz) (2.7 MB)

Sorry it’s only two timesteps, the server keeps crashing at the end of the upload and I guess it’s bc my fiel was too big.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2021, 3:01pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/11 "2021-06-29T15:01:25Z")

</div>

It looks like your number of points and point idexing is not changing over time also your point indexing is spacially logical, so extract points based on their ID should work perfectly.

- Edit → FindData → Find Points → ID is between → the values you want
- Run Selection Query
- Extract Selection, Apply

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 29, 2021, 3:07pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/12 "2021-06-29T15:07:46Z")

</div>

Oh, great thanks ! The filter on IDs is only continuous right ? Namely, I can’t give a list of discontinuous IDs ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 29, 2021, 3:14pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/13 "2021-06-29T15:14:14Z")

</div>

You can use a custom query and write in python to select any ids you want.

---

<div class="post-metadata">

### Author: ![rw31415](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rw31415/32/6431_2.png) [@rw31415](https://discourse.paraview.org/u/rw31415)
#### Post date: [June 29, 2021, 3:15pm UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/14 "2021-06-29T15:15:06Z")

</div>

Oh great, I’ll look into that. Thanks again. I’ve recently heard you’re giving some introductory classes at my institute so I’ll ask to follow it. I still have some remaining questions to use this great software 🙂

---

<div class="post-metadata">

### Author: ![nadeem](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nadeem/32/6444_2.png) [@nadeem](https://discourse.paraview.org/u/nadeem)
#### Post date: [October 26, 2022, 2:07am UTC](https://discourse.paraview.org/t/filtering-specific-particles-in-particle-data/7412/15 "2022-10-26T02:07:22Z")

</div>

Hello,  
Is this topic still live? I hope it is because I have an almost identical problem. I have similar time sequence of particle datasets – including particle coordinates (x,y,z), and also tag01=particle ID. I also want to select groups of different particles by their initial positions (not necessarily their ID – though that would be an equivalent solution if I knew particle ID’s by region) and then follow these same group in time. I would also like to color this group of particles for visual clarity – other groups of particles would have different colors.

I would greatly appreciate sharing the solution to this problem with you (or anyone) with complete example. At the moment, I can follow the entire set of 288 particles as Point Gaussian; but when I select the different groups of particles with different colors, something strange happens: some of the colors appear to randomly swap between some of the particles.

Regards  
Nadeem
