Astrophysical Virtual Observatory

::: ColumnCalculator :::
# Sitemap  
  AVO TWiki system # Edit # Attach # Diffs # Printable # More # Changes # Register # Search

:::
Logged in as TWikiGuest

EUROVO FC

AVO
SWG
Management
Science
Standards
Technology
Reports&Minutes
Forum
Events
Contacts
Help

EGG

Main

Know

Test

TWiki

Column calculator tool



This page aims at describing how ColumnManipulations required for the demo are obtained in the AVO prototype interface.

GUI

1. Once you loaded one or several catalog planes, right click on the plane you are interested in, and select Add new column

colcal1.jpg

2. A new window will pop up. Enter the name of the new column. You may also want to enter the UCD and the unit.

3. The syntax for expressing the new column value is quite similar to the one used for the filters (filters documentation is available here).
Basically, ${col} will point out the column whose name is col.
Under the expression textfield, there are several buttons reflecting all fields of the chosen catalog plane. Pressing one of this button will write the corresponding name into the expression textfield.

colcal2.jpg


You can use the traditional arithmetical operators : + - * / ^, as well as the following functions : sin, cos, tan, log (base 10 logarithm), ln (natural logarithm), abs (absolute value), deg2rad, rad2deg

Furthermore, you can use C-like ternary condition operator with the following syntax :
[condition statement] ? [expr1] : [expr2]
If the condition statement is evaluated to true, expr1 will be used to compute the new column, else expr2 is used.
eg:
${otyp}="Galaxy" ? 1 : -1
${Bmag}-${Vmag} > 0 ? ${Bmag} : ${Vmag}
Note that nested conditions are not supported.
The predefined expressions drop-list will give you examples of valid expressions.

4. Once you field out these fields, click on Add new column.

colcal3.jpg

The new computed column will appear in the measurement frame at the end of the row

colcal4.jpg

Script mode

This tool can also be used through a script command, which may be useful to integrate in a script.
The syntax of this command is:
adddcol( [plane index or plane name], [new column name], [ucd], [unit], [expression] )
You can refer to the plane either by its index (first plane at the bottom of the stack has index 1), or by its name


# Edit menu  


Topic revision r1.1 - 13 Jan 2004 - 16:10 - ThomasBoch
Topic parents: WebHome > AvoSoftwareRepos > AVOProtoChangelog
Copyright © 2003 by the contributing authors. All material on this collaboration tool is the property of the contributing authors. Ideas, requests, problems regarding AVO TWiki ? Send feedback.