## 6. Iterators and filters

> 6.1 Introduction

> 6.2 Data table iterator

> 6.3 Data table series

> 6.4 Filtration

## 6.1 Introduction

> Some operations are required to be iterated. Typical example of iteration is reading of rows from data table. Iterators are used for creation of selections for research. Another example is creation of star's models array from database. Typically an iterator requres a filtration that omit some steps of iteration process. In priciple filtration may be performed with use of SQL. However SQL is a very poor language and does not enable performing all kinds of filtration. The formula editor is used for filtration in this software.

## 6.2 Data table iterator

Database iterator is a client of query component component corresponds to the button. It performs iterative reading of rows of SQL query. As a client of query component it shold be connected to query component . It is shown on the following picture:

It is possible to process result of iteration. For example a user can link an functional transformer to an iterator like it is exhibited on the following picture:

## 6.3 Data table series

Let us consider an example of application of this iterator. User should install TYCHO and HIPPARCOS DATABASE to reproduce this example. Configuration of this example is exhibited on the following picture:

We have a catalogue of stars and wish to construct Herzsprung-Rassel diagram. The catalogue contains parallaxes and magnitudes of stars. Herzsprung-Rassel diagram requires absolute magnitudes of stars. Formula editor provides the calculation of absolute star magnitude. The component Graph shows the following diagram

Click here to download this situation.

## 6.4 Filtration

Filtration of iterator output may be performed by the filter . Let us consider an example of a filter application. The problem depends on construction of Herzsprung-Rassel diagram with filtration of bad data. Data is bad if three times of root-mean-square error of a parallax exceeds a parallax. The situation with filter is exhibited on the following picture:

A filter contains a formula that returns a Boolean output. Its editor of properties looks like:

The result diagram looks like:

User should install TYCHO and HIPPARCOS DATABASE to reproduce this example. Click here to download this situation .