1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456
|
# nttools - NOAO version of TTOOLS package
File: `startable`
```
#c STARno i %5d
#c X d %6.2f pixels
#c Y d %6.2f pixels
#c MAG d %15.7g magnitude
#c SHARP d %15.7g
#c ROUND d %15.7g
#c STARNAME ch*15 %-15s
#k HISTORY = 'Created Thu 08:48:13 26-Oct-2017'
1 3.00 4.00 5. 6. 7. HD12345
2 10.00 11.00 12. 13. 14. "HD 122"
3 20.00 21.00 22. 23. 24. ""
```
## keypar - Copy an image or table header keyword to an IRAF parameter.
```
cl> keypar dev$pix airmass
cl> print(keypar.value)
1.08015632629395
```
## keytab - Copy an image or table header keyword to a table element.
## parkey - Put an IRAF parameter into an image or table header keyword.
## partab - Transfer an IRAF parameter to a table element.
## tabkey - Copy a table element to an image or table header keyword.
## tabpar - Transfer a table element to an IRAF parameter.
## gtedit - Graphically edit a table.
## gtpar - Pset to specify graph parameters for 'gtedit' task.
## imtab - Copy an image to a table column.
```
cl> imtab dev$pix pixtab data
cl> head pixtab
#c data i %11d
#k HISTORY = 'Column data from dev$pix.imh'
38
43
35
43
39
39
41
41
41
37
```
## tabim - Copy a table column to an image.
```
cl> tabim pixtab pixtabimg data 2 512
cl> imstat pixtabimg
# IMAGE NPIX MEAN STDDEV MIN MAX
pixtabimg 262144 108.3 131.3 -1. 19936.
cl> imarith dev$pix - pixtabimg zero
cl> imstat zero
# IMAGE NPIX MEAN STDDEV MIN MAX
zero 262144 0. 0. 0. 0.
```
## taextract - Copy an array entry to a column of scalars in another table.
## tainsert - Copy a column of scalars to an array entry in another table.
## tcalc - Perform arithmetic operations on table columns.
## tchcol - Change column name, print format, or units.
## tcheck - Check STSDAS table element values.
## tchsize - Change allocated sizes of various sections of a table.
## tcopy - Copy tables.
Test options: `decimals=7`
```
cl> tcopy startable startable.fits
# startable -> startable.fits
cl> tdump startable.fits
STARno I %5d ""
X D %6.2f pixels
Y D %6.2f pixels
MAG D %15.7g magnitude
SHARP D %15.7g ""
ROUND D %15.7g ""
STARNAME CH*15 %-15s ""
XTENSION t 'BINTABLE' binary table extension
BITPIX i 8 8-bit bytes
NAXIS i 2 2-dimensional binary table
NAXIS1 i 59 width of table in bytes
NAXIS2 i 3
PCOUNT i 0 size of special data area
GCOUNT i 1 one data group (required keyword)
TFIELDS i 7
TTYPE1 t 'STARno' label for field 1
TFORM1 t '1J' data format of the field: 4-byte INTEGER
TTYPE2 t 'X' label for field 2
TFORM2 t '1D' data format of the field: 8-byte DOUBLE
TUNIT2 t 'pixels' physical unit of field
TTYPE3 t 'Y' label for field 3
TFORM3 t '1D' data format of the field: 8-byte DOUBLE
TUNIT3 t 'pixels' physical unit of field
TTYPE4 t 'MAG' label for field 4
TFORM4 t '1D' data format of the field: 8-byte DOUBLE
TUNIT4 t 'magnitude' physical unit of field
TTYPE5 t 'SHARP' label for field 5
TFORM5 t '1D' data format of the field: 8-byte DOUBLE
TTYPE6 t 'ROUND' label for field 6
TFORM6 t '1D' data format of the field: 8-byte DOUBLE
TTYPE7 t 'STARNAME' label for field 7
TFORM7 t '15A' data format of the field: ASCII Character
EXTNAME t 'startable' name of this binary table extension
TDISP1 t 'I5' display format
TNULL1 i -2147483647 undefined value for column
TDISP2 t 'F6.2' display format
TDISP3 t 'F6.2' display format
TDISP4 t 'G15.7' display format
TDISP5 t 'G15.7' display format
TDISP6 t 'G15.7' display format
TDISP7 t 'A15' display format
HISTORY t Created Thu 08:48:13 26-Oct-2017
1 3. 4. 5. 6. 7. HD12345
2 10. 11. 12. 13. 14. "HD 122"
3 20. 21. 22. 23. 24. ""
```
Test options: `decimals=7`
```
cl> tcopy startable.fits startable2
# startable.fits -> startable2
cl> tdump startable2
STARno I %5d ""
X D %6.2f pixels
Y D %6.2f pixels
MAG D %15.7g magnitude
SHARP D %15.7g ""
ROUND D %15.7g ""
STARNAME CH*15 %-15s ""
EXTNAME t 'startable' name of this binary table extension
HISTORY t Created Thu 08:48:13 26-Oct-2017
1 3. 4. 5. 6. 7. HD12345
2 10. 11. 12. 13. 14. "HD 122"
3 20. 21. 22. 23. 24. ""
```
## tcreate - Create a STSDAS table from an ASCII descriptor table.
`columns.cd` may contain just the following:
File: `columns.cd`
```
STARno I i5
X r "F6.2" pixels
Y R F6.2 "pixels"
MAG R "" magnitude
SHARP R
ROUND r
STARNAME ch*15
```
Note the free format of, and embedded tabs in, the column definitions
file itself. The format for display of MAG is not specified, but the
unit is given as magnitude, so adjacent quotes are used to mark the
position where the display format is expected.
The file `data.dat` may contain (if `nskip=3`, `nlines=2`):
File: `data.dat`
```
this is a header
header2
header3
1 3.0 4.0
5.0 6.0 7.0 HD12345
2 10.0 11.0 12.0 13.0
14.0 "HD 122"
3 20.0 21.0 22.0 23.0 24.0 ""
dummy line
```
Note the tabbed and free format of the data file and the specification
of the character strings. If the character data contain embedded
blanks then the whole string should be quoted, otherwise this is not
necessary. The final entry is the null character string.
```
cl> tcreate outfile columns.cd data.dat nskip=3
out of synch or extra data in line 9
cl> match "#k HISTORY" outfile stop=yes
#c STARno i %5d
#c X d %6.2f pixels
#c Y d %6.2f pixels
#c MAG d %15.7g magnitude
#c SHARP d %15.7g
#c ROUND d %15.7g
#c STARNAME ch*15 %-15s
1 3.00 4.00 5. 6. 7. HD12345
2 10.00 11.00 12. 13. 14. "HD 122"
3 20.00 21.00 22. 23. 24. ""
```
## tdelete - Delete tables.
## tdiffer - Form a table which is the difference of two tables.
## tdump - Dump the contents of a table to an ASCII file.
Test options: `decimals=7`
```
cl> tdump startable
STARno I %5d ""
X D %6.2f pixels
Y D %6.2f pixels
MAG D %15.7g magnitude
SHARP D %15.7g ""
ROUND D %15.7g ""
STARNAME CH*15 %-15s ""
HISTORY t Created Thu 08:48:13 26-Oct-2017
1 3. 4. 5. 6. 7. HD12345
2 10. 11. 12. 13. 14. "HD 122"
3 20. 21. 22. 23. 24. ""
```
## tedit - Edit a table.
## texpand - Expand tables according to a set of rules.
## thedit - Edit or print table header keywords.
```
cl> thedit startable i_ncols .
startable,i_ncols = 7
cl> thedit startable.fits history .
startable.fits,HISTORY = "Created Thu 08:48:13 26-Oct-2017"
```
## thistogram - Make a histogram of a column in a table.
## thselect - Select tables satisfying an expression; print keywords.
## tinfo - Display table size information.
```
cl> tinfo startable
# startable
3 rows written to table
7 columns defined
1 header parameters written to table
5 records allocated for header parameters
11 space allocated for column descriptors
table type: text explicit column definitions
cl> tinfo startable.fits
# startable.fits[1]
3 rows written to table
7 columns defined
35 header parameters written to table
35 records allocated for header parameters
7 space allocated for column descriptors
table type: fits
```
## tintegrate - Numerically integrate one column with respect to another.
## tjoin - Perform a relational join of two tables.
## tlcol - List column information for a table.
## tlinear - Use linear regression to fit one or two table columns.
## tmatch - Find closest match between rows in two tables
## tmerge - Either merge or append tables.
## tprint - Print tables--both headers and data.
## tproduct - Form the Cartesian product of two tables.
## tproject - Create new table from selected columns in a table.
## tquery - Create a new table from selected rows and columns in a table.
## tread - Browse through a table.
## trebin - Resample a table to uniform spacing.
This task resamples tables. The grid on which to interpolate an input
table may be specified either by a table giving explicit values or by
start, end, and step values for uniform spacing. The column names in
the output table will be the same as in the input table.
This is out input file. The numbers are just randomly chosen.
File: `rebin.tbl`
```
#c lambda d %6.2f nm
#c Y d %6.3f pixels
453.02 5.873
464.60 17.939
603.04 39.843
625.08 68.326
647.27 44.617
723.45 68.226
730.31 36.557
764.82 42.797
784.33 2.650
862.67 38.502
```
There are four different functions for interpolation: nearest, linear,
poly3, spline.
```
cl> trebin rebin.tbl rebnr.tbl lambda 460. 860. 50. function=nearest
rebin.tbl --> rebnr.tbl
cl> type rebnr.tbl
#c lambda d %6.2f nm
#c Y d %6.3f pixels
460.00 17.939
510.00 17.939
560.00 39.843
610.00 39.843
660.00 44.617
710.00 68.226
760.00 42.797
810.00 2.650
860.00 38.502
```
```
cl> trebin rebin.tbl reblin.tbl lambda 460. 860. 50. function=linear
rebin.tbl --> reblin.tbl
cl> type reblin.tbl
#c lambda d %6.2f nm
#c Y d %6.3f pixels
460.00 13.146
510.00 25.122
560.00 33.033
610.00 48.838
660.00 48.562
710.00 130.32
760.00 52.715
810.00 14.398
860.00 37.280
```
```
cl> trebin rebin.tbl rebspl.tbl lambda 460. 860. 50. function=spline
rebin.tbl --> rebspl.tbl
cl> type rebspl.tbl
#c lambda d %6.2f nm
#c Y d %6.3f pixels
460.00 13.514
510.00 24.524
560.00 8.351
610.00 52.234
660.00 49.286
710.00 106.62
760.00 41.834
810.00 -26.03
860.00 33.545
```
```
cl> trebin rebin.tbl rebpol.tbl lambda 460. 860. 50. function=poly3
rebin.tbl --> rebpol.tbl
cl> type rebpol.tbl
#c lambda d %6.2f nm
#c Y d %6.3f pixels
460.00 13.681
510.00 31.879
560.00 24.140
610.00 53.145
660.00 56.902
710.00 102.17
760.00 38.854
810.00 -51.35
860.00 22.331
```
## tselect - Create a new table from selected rows of a table.
## tsort - Sort a table.
## tstat - Get mean, standard deviation, min, and max for a column.
## ttranspose - Transpose or flip a table.
File: `ttranspose.in`
```
one two three
four five six
seven eight nine
ten eleven twelve
```
The input is the text file "in", and the output is to be displayed on
the screen. Each of the three operations ("t", "h", "v") and some
combinations are illustrated.
```
cl> ttranspose ttranspose.in STDOUT t
ttranspose.in --> STDOUT
one four seven ten
two five eight eleven
three six nine twelve
cl> ttranspose ttranspose.in STDOUT h
ttranspose.in --> STDOUT
three two one
six five four
nine eight seven
twelve eleven ten
cl> ttranspose ttranspose.in STDOUT v
ttranspose.in --> STDOUT
ten eleven twelve
seven eight nine
four five six
one two three
cl> ttranspose ttranspose.in STDOUT hv
ttranspose.in --> STDOUT
twelve eleven ten
nine eight seven
six five four
three two one
cl> ttranspose ttranspose.in STDOUT th
ttranspose.in --> STDOUT
ten seven four one
eleven eight five two
twelve nine six three
```
## tunits - Convert table column from one set of units to another
## tupar - Edit table header keywords.
## tiimage - Insert images into rows of a 3-D table.
## titable - Insert 2-D tables into rows of a 3-D table.
## tximage - Extract images from rows of 3-D tables.
## txtable - Extract 2-D tables from rows of 3-D tables.
## tscopy - Copy row/column subsets of tables using selectors.
|