Next Previous Up Contents
Next: tgridmap: Calculates N-dimensional density maps
Up: tloop: Generates a single-column table from a loop variable
Previous: Usage

B.31.2 Examples

stilts tloop COUNTER 0 1000
Generates a table with a single column, named COUNTER, and a thousand rows. The value in the first row is 0 and in the last row is 999. The table is written to standard output.
stilts tloop time 0 10 0.25 out=times.csv
Generates a table with one column time counting from 0 to 9.75 in steps of 0.25. Output is to a CSV file. The parameters here are specified in order, but could equivalently be given by name: "stilts tloop var=time start=0 end=10 step=0.26".
stilts tloop x start=1 end=11 ocmd='addcol x2 x*x' ocmd='addcol x3 x*x*x'
             ocmd='stats name sum'
Generates a table with a column x running from 1 to 10 inclusive. The addcol filters then append two further columns, giving the squares and cubes of these values respectively, giving a table of 10 rows and 3 columns. Finally this table is piped through a stats filter to calculate the sums of the values, squares and cubes in this range.


Next Previous Up Contents
Next: tgridmap: Calculates N-dimensional density maps
Up: tloop: Generates a single-column table from a loop variable
Previous: Usage

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk