Dips > Data Processing > Query Data

# Query Example 7

A new file can be created from a Set very easily with the Query Data option.

Set == 1

1. Create a Set using the Add Set Window option.

2. Select Query Data from the toolbar or the Analysis menu.

3. Create the Expression Set == 1 (or whatever Set ID you entered when you created the Set)

4. Select the Expression button.

5. Select OK.

In only a few mouse clicks, you have created a new Dips file containing only the data in a user-defined Set.

NOTE:

- If you want to create a new file from more than one Set using Query Data, remember to use the OR operator between expressions (e.g. Set == 1 || Set == 2). Do NOT use the AND operator, or the query will find no matches. See Query Example 4 for more information.

- Note that the Set Column in the new file is really an Extra Column. When Query Data creates a new file, Set information (e.g. windows, mean planes) is NOT saved. Therefore in the new file, Sets, as defined in Dips, do NOT exist, and the Set column merely preserves the Set ID. Furthermore, the Set Column will ONLY be saved if the "Save Set Column as an Extra Column" checkbox is selected in the Preferences dialog. If this checkbox is NOT selected, then the Set ID column will NOT be saved to the new file which is created after using Query Data.