Previous Page Trail Contents Next Page

8. Iterators and filters

8.1 Introduction

8.2 Data table iterator

8.3 Data table series

8.4 Filtration

8.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.

8.2 Data table iterator

Database iterator is a client of query component component corresponds to the Database comoponent 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:

Iterator + query 

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:

Combination 

 

8.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:

Data series scenario 

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

Diagram 

Click here to download this situation.

8.4 Filtration

Filtration of iterator output may be performed by the filter 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:


Filtration

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

Filter properties 

The result diagram looks like:

Filtered diagram 

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


Previous Page Trail Contents Next Page