# Threshold of two separate inputs

**URL:** https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809
**Category:** ParaView Support
**Created:** [October 29, 2018, 4:20pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809 "2018-10-29T16:20:52Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 4:20pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/1 "2018-10-29T16:20:52Z")

</div>

Hello, I have a question that I’m hoping someone can help me with.

I have 2 input scalars that I’ve read into the pipeline browser (call them u1 and u2) which exist on the same domain. I would like to find the area in the domain where both of the following conditions are true: L1 \< u1 \< M1 AND L2 \< u2 \< M2 for some L1, L2, M1, M2. I can find the area where one of these is true using the threshold filter, but I can’t seem to figure out how to achieve both conditions at the same time.

Any help would be appreciated!  
Thanks!

---

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [October 29, 2018, 4:28pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/2 "2018-10-29T16:28:51Z")

</div>

Would a second threshold with the input set to the first threshold work? That would produce `AND` logic, correct?

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 4:34pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/3 "2018-10-29T16:34:47Z")

</div>

Thanks for the reply!

Yes, that would produce what I’m looking for. The problem is that if I add a threshold to u1, I don’t know how to access the data for u2 in the second threshold. I seem to only be able to further trim the solution of u1.

Is there a way to trim the first threshold according to the data of a different solution?

Thanks again.

---

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [October 29, 2018, 4:36pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/4 "2018-10-29T16:36:48Z")

</div>

> [@cfmeaney](#):
>
> I seem to only be able to further trim the solution of u1.

Be sure to uncheck the **All Scalars** option:

 ![30%20AM](https://discourse.paraview.org/uploads/default/original/1X/44ec32b432a30a849d51bdcbc5f59d278b735e39.png)

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 4:43pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/5 "2018-10-29T16:43:52Z")

</div>

Thanks again for the reply.

Okay, I have it unchecked. But in the dropdown menu of the attached picture, only u0\_1 appears - meaning that the threshold is still applied to that same variable. Is there a way to have u0\_2 appear in this dropdown menu?

Thanks.

![image](https://discourse.paraview.org/uploads/default/original/1X/56d2c2c31dae3365078b843abf51bf37606e30ef.jpeg)

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 4:45pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/6 "2018-10-29T16:45:34Z")

</div>

Oops, realized it was still checked in that picture. Here’s another illustrating the same problem with it unchecked.  
Thanks.

![image](https://discourse.paraview.org/uploads/default/original/1X/4875b7643d2f41482381c7512cc42135b6107cf8.jpeg)

---

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [October 29, 2018, 4:48pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/7 "2018-10-29T16:48:40Z")

</div>

Is it unchecked on both threshold filters? (importantly, the upstream filter)

See if this example works for you:

[threshold-twice.pvsm](https://discourse.paraview.org/uploads/default/original/1X/6ab441da35548c83c52272313df46b8accce432f.pvsm) (382.7 KB)

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 5:00pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/8 "2018-10-29T17:00:50Z")

</div>

Yes, unchecked on both threshold filters. And unfortunately, when I open your file, it results in many errors. For some reason it seems that the threshold filter is only able to access one variable.

our help is much appreciated!

 ![image](https://discourse.paraview.org/uploads/default/original/1X/3e16ba236367052e772ae06861aaef9e58a608d6.jpeg)

---

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [October 29, 2018, 5:12pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/9 "2018-10-29T17:12:38Z")

</div>

Oh whoops, I’m working off of 5.6RC2 and I chose the only source I could find with two point arrays which is new to v5.6

Post your data file if you can

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 5:15pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/10 "2018-10-29T17:15:39Z")

</div>

Sure, here are the 2 data files. Both are solutions over time on a circular domain. I want to find the areas of the circle where a threshold conditions applied on both solutions.

Thanks!

[solution\_k1.pvd](https://discourse.paraview.org/uploads/default/original/1X/c5b798b2981052b05db1b8b2fc39762870825236.pvd) (59.2 KB)  
[solution\_n1.pvd](https://discourse.paraview.org/uploads/default/original/1X/83b8fea6ff517bd805736ac8908a8dec209b8fd9.pvd) (59.2 KB)

---

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [October 29, 2018, 6:01pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/11 "2018-10-29T18:01:52Z")

</div>

PVD files need to be next to a directory…

If your arrays are both `PointData`, then I’m fairly confident that making sure to uncheck **All Scalars** on any/all threshold filters should work. To double check on your data, zip up all of your data files next to a State File (File-\>Save State…) and I’ll give it a whirl.

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 29, 2018, 7:19pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/12 "2018-10-29T19:19:18Z")

</div>

Here is a link to the files. Let me know if there is a problem retrieving the files. Thank you so much again!

[https://drive.google.com/open?id=1wHLoNtwNHJN2FWIZRqWuHQGaEHMe\_knw](https://drive.google.com/open?id=1wHLoNtwNHJN2FWIZRqWuHQGaEHMe_knw)

---

<div class="post-metadata">

### Author: ![DennisConklin](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/b19c9b/32.png) [@DennisConklin](https://discourse.paraview.org/u/DennisConklin)
#### Post date: [October 30, 2018, 6:24pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/13 "2018-10-30T18:24:13Z")

</div>

How about a Find Data with a Query looking something like:  
(u1\>L1)&(u1\<M1)&(u2\>L2)&(u2\<M2)

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 30, 2018, 6:27pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/14 "2018-10-30T18:27:26Z")

</div>

Hello Denis,

Could you explain how I would go about doing this?  
Thanks!

---

<div class="post-metadata">

### Author: ![DennisConklin](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/b19c9b/32.png) [@DennisConklin](https://discourse.paraview.org/u/DennisConklin)
#### Post date: [October 30, 2018, 6:29pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/15 "2018-10-30T18:29:59Z")

</div>

Cameron,

Sorry, I just re-read and see that it is two different datasets. Can you append the variables from one dataset onto the other using something like Append Attributes (only if the geometry is identical, I think).  
I haven’t worked with anything other than Exodus files, so I may be off track here.

---

<div class="post-metadata">

### Author: ![cfmeaney](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/a587f6/32.png) [@cfmeaney](https://discourse.paraview.org/u/cfmeaney)
#### Post date: [October 30, 2018, 6:57pm UTC](https://discourse.paraview.org/t/threshold-of-two-separate-inputs/809/16 "2018-10-30T18:57:28Z")

</div>

Hey Dennis,

Yes! That is exactly what I was looking for. That allows the threshold filter to pull from either variable so I can use 2 thresholds to achieve the double condition.

Thanks!
