Next Previous Up Contents
Next: Technical Note
Up: Algebraic Expression Syntax
Previous: Operators
Many functions are available for use within your expressions,
covering standard mathematical and trigonometric functions,
arithmetic utility functions, type conversions, and some more
specialised astronomical ones.
You can use them in just the way you'd expect,
by using the function name
(unlike column names, this is case-sensitive) followed by
comma-separated arguments in brackets, so
max(IMAG,JMAG)
will give you the larger of the values in the columns IMAG and JMAG,
and so on.
The functions are grouped into the following classes:
-
Times
-
Functions for conversion of time values between various forms.
The forms used are
-
Modified Julian Date (MJD)
- A continuous measure in days since midnight at the start of
17 November 1858. Based on UTC.
-
ISO 8601
- A string representation of the form
yyyy-mm-ddThh:mm:ss.s
, where the T
is a literal character (a space character may be used instead).
Based on UTC.
-
Julian Epoch
- A continuous measure based on a Julian year of exactly 365.25 days.
For approximate purposes this resembles the fractional number
of years AD represented by the date. Sometimes (but not here)
represented by prefixing a 'J'; J2000.0 is defined as
2000 January 1.5 in the TT timescale.
-
Besselian Epoch
- A continuous measure based on a tropical year of about 365.2422 days.
For approximate purposes this resembles the fractional number of
years AD represented by the date. Sometimes (but not here)
represented by prefixing a 'B'.
-
Decimal Year
- Fractional number of years AD represented by the date.
2000.0, or equivalently 1999.99recurring, is midnight at the start
of the first of January 2000. Because of leap years, the size of
a unit depends on what year it is in.
Therefore midday on the 25th of October 2004 is
2004-10-25T12:00:00
in ISO 8601 format,
53303.5 as an MJD value,
2004.81588 as a Julian Epoch and
2004.81726 as a Besselian Epoch.
Currently this implementation cannot be relied upon to
better than a millisecond.
-
Strings
-
String manipulation and query functions.
-
Maths
-
Standard mathematical and trigonometric functions.
-
Formats
-
Functions for formatting numeric values.
-
Fluxes
-
Functions for conversion between flux and magnitude values.
Functions are provided for conversion between flux in Janskys and
AB magnitudes.
A set of constants are also defined for approximate conversions
between the AB and Johnson magnitude scales;
the source for these values is
http://www.astro.utoronto.ca/~patton/astro/mags.html
(citing Frei and Gunn 1995).
-
Coords
-
Functions for angle transformations and manipulations.
In particular, methods for translating between radians and HH:MM:SS.S
or DDD:MM:SS.S type sexagesimal representations are provided.
-
Conversions
-
Functions for converting between strings and numeric values.
-
Arithmetic
-
Standard arithmetic functions including things like rounding,
sign manipulation, and maximum/minimum functions.
A listing of the functions in these classes is given in
Appendix B.1, and complete documentation on them is
available within TOPCAT from the
Available Functions Window.
Next Previous Up Contents
Next: Technical Note
Up: Algebraic Expression Syntax
Previous: Operators
TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note
253
TOPCAT web page:
http://www.starlink.ac.uk/topcat/
Author email:
m.b.taylor@bristol.ac.uk