Next Previous Up Contents
Next: Row Order
Up: Row Subsets
Previous: Row Subsets

3.1.1 Defining Subsets

You can define a Row Subset in one of the following ways:

Defining an algebraic expression
From the Subset Window using the Add New Subset () button will pop up the Algebraic Subset Window which allows you to define a new subset using an algebraic expression based on the values of the cells in each row. The format of such expressions is described in Section 7. The Subsets Window also provides some variants on this option for convenience, like selecting the first N (), last N (), or every Nth () rows, or the complement () of an existing subset.
Graphical selection
There are several ways to indicate a region graphically in the plotting area of the plotting windows. which can be used to define subsets. The options are Subset From Visible (), Algebraic Subset From Visible (), Draw Subset Blob () and Draw Algebraic Subset (), though not all are available for all plot types.
Classifying by value
The Column Classification Window lets you define multiple mutually exclusive subsets based on the value in a given column (or other algebraic expression).
Boolean columns
Any column which has a boolean (true/false) type value can be used as a subset; rows in which it has a true value are in the subset and others are not. Any boolean column in a table is made available as a row subset with the same name when the table is imported.
Selecting rows in the browser
You can select a single row in the Data Window by clicking on it, or select a group of adjacent rows by dragging the mouse over them. You can add more rows to the selection by keeping the <Control> button pressed while you do it. Once you have a set of rows selected you can use the Subset From Selected Rows () or Subset From Unselected Rows () buttons to create a new subset based on the set of highlighted rows or their complement. Combining this with sorting the rows in the table can be useful; if you do a Sort Up on a given column and then drag out the top few rows of the table you can easily create a subset consisting of the highest values of a given column.

In all these cases you will be asked to assign a name for the subset. As with column names, it is a good idea to follow a few rules for these names so that they can be used in algebraic expressions. They should be:

When you choose a name, you can either type one in, or select one from the drop-down list, which gives the names of all the existing subsets. This allows you to redefine existing subsets. Note if you do select or type in one of the existing names, any previous content of that subset will be lost.

In the first subset definition method above, the current subset will be set immediately to the newly created one. In other cases the new subset may be highlighted appropriately in other windows, for instance by being plotted in scatter plot windows.


Next Previous Up Contents
Next: Row Order
Up: Row Subsets
Previous: Row Subsets

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk