Thresholding Data


Thresholding Data

You can think of a clip box as thresholding particles in x, y, and z. The thresh command allows you to threshold particles according to data variables you define via the datavar command. The thresh command takes several forms, so let's explore these one by one using the Sample Data.

Reporting the Data Variables

Let's fly out so that we can see most of the Sample particles in our view. You will likely have to increase the brightness (slum value) of the particles using the Slider once you pull away from the data. To get an idea of what data variables are available for threshing, issue the datavar command without any arguments (you may want to stretch the Console Window in Partiview by placing your mouse at the base of the Command Line and pulling down to expand the size of the Window). datavar will report each data variable that is defined in the .speck file in the format:

datavar num name min.. max mean meanvalue[default]

You can see that the zeroth data variable, coloridx, ranges from 1 to 10 with a mean of 5.5 and Partiview sets the zeroth data variable to be the color.

Thresholding on color

If we want to threshold on the color, we should familiarize ourselves with the Sample color map file sample.cmap. You will see that color 0 is red, 1 is green, 4 is orange--you can check the file. Since our color indices range from 1 to 10, there will be no red particles. Let's threshold these data by color. If you want to see just the particles with a color index of 1, then we would type

thresh coloridx 1 1
which displays all the green particles. To see both green and blue: thresh coloridx 1 2. We can also refer to the data variable number, 0, in the thresh command as well. Let's see this by viewing the aqua particles, then the purple particles in these commands
thresh coloridx 5 5
thresh 0 6 6

We do not recommend using the data variable number when referring to a variable since columns within a data file can shift between data processing iterations.

Upon issuing the thresh command, a report is written to standard out in the form:

thresh varnum(name) min minval max maxval
(num of total selected)
where varnum is the data variable number that corresponds with the name, minval and maxval are the minimum and maximum values of the thresh, and num is the number of particles displayed out of the total. To return seeing all the particles, use the see command
see all
which will return all particles to view.

Threshing data according to some value

Instead of providing a minimum and maximum range over which to threshold data, it is also possible to threshold data above or below a given value. For example, let's threshold these particles according to the value of its label (data variable label). We can see from datavar that the values range from 0 to 120,250. Let's look at all the particles that have a label less than 10,000. We can see these particles using the command

thresh label < 10000

Now, increase this value to 40,000 so that you're only seeing particles below label = 40000. Now let's reverse it using the > sign so that we're seeing all particles above label = 40000 using

thresh label > 40000
In this way, we can thresh over a range given one value from the data.

Seeing all your data

To return all the particles in the group to view, you can either use the thresh command without specifying min and max values, you can replace the min and max values with dashes, you can use the thresh datavar off command, or you can use the see all command. Each of these would be executed in the following way:

thresh label
thresh label - -
thresh label off
see all

Reversing the Thresh

You can reverse the thresh results by using the command see -thresh as well. For example, if you thresh on label to see all data with label < 50000, you can reverse the thresh, that is, see all data with label > 50000 by issuing

see -thresh

We will talk more about the see command and setting up selection expressions with thresh later in this section.

© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott