Selecting Data with Specific Values


Selecting Data with Specific Values

The only command allows you to select a subset of a data group based on particular data attributes. When we do a thresh datavar 2 2, we are choosing only those particles with the values of the data variable datavar equal to 2. There is a more sensible way to do this using the only commands.

Choosing particular values to display

If you desire to pick out portions of a data group according to particular values of a data attribute, the only= command is what you want to use. The command has the form:

only= datavar «value | minval maxval | <maxval | >minval»

Let's try this by selecting only the particles in the Sample Data with a coloridx of 6 via the command:

only= coloridx 6
Now, we can select a range of values like the colors 2,3,4,5 and 8 using this command:
only= coloridx 2-5 8
Also, you can select data using the greater-than and less-than signs, as in:
only= coloridx <7
only= coloridx >7
only= coloridx <2 >8
although this last statement seems better suited for the thresh command. With the last command, we are viewing only those particles of coloridx 1,2,8,9, and 10. Now, let's alter the selection of just these data.

Choosing a subset from a subset

Once an only condition has been defined, data can be further added or subtracted from the current subset by using the only+ and only- commands. These have the same arguments as the only= command above, but they add or subtract particles from the current data subsample.

Let's thresh on the luminosity of the particles. Out of the subset of data we have now, let's remove those particles that have a luminosity less than 50. Typing datavar will show you that the lumin data variable ranges between 10 and 100 and has an average of about 50. So, we are asking for the brighter particles from those that have a coloridx of 1,2,8,9, or 10. Executing

only- lumin <50
removes the dimmer points, further shrinking the data subset that is displayed. Now, let's add some data in. Say we want to see the dimmest points along with the brighter ones. Let's add some data using the only+ command:
only+ lumin <20
Now, the number of points increases as expected. These three commands allow for complete customization of data display.

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