How to use the Quanta service
General tips
- In each of the functions you can combine units in the usual ways (multiplication &
division) such as km/s/Mpc or m.s-2.
See what units & constants are available
The function lists the units and constants that are available in this service.
It is useful for checking the symbols. Most of the symbols are standard, however
some may not what you would expect. This is to avoid ambiguity
as some units have the same symbols in common usage.
The resulting list of units will appear on a new screen.
Convert from one quantity to another
This function allows you to convert a value from one set of units to another.
So for example, you might want to convert from inches to centimetres.
In that case you would put the value in inches in the first box 10in and
the units you want to convert to in the second box cm, then click convert.
Some examples of common units are:
arcmin (arcmin) 0.000290888208666 rad
deg (degree) 0.0174532925199 rad
Hz (hertz) 1 s-1
Jy (jansky) 1e-26 kg.s-2
rad (radian) 1 rad
s (second) 1 s
sr (steradian) 1 sr
The results from your query will appear below the query boxes, with the answer highlighted in red text, such as:
The value of 234.45km converted to m is: 234450 m
Convert a quantity to base units
This function converts a quantity to the base units for that dimensionality
(ie: distance, time, temperature). For example, if you enter 10in it will convert
it to 0.254 m since the metre is the base unit for distance.
There are 10 base units:
A (ampere) 1 A
K (kelvin) 1 K
_ (undimensioned) 1 _
cd (candela) 1 cd
kg (kilogram) 1 kg
m (metre) 1 m
mol (mole) 1 mol
rad (radian) 1 rad
s (second) 1 s
sr (steradian) 1 sr
The results from your query will appear below the query boxes, with the answer highlighted in red text, such as:
The value of 234.45km converted to base units is: 234450 m
Convert a column of data from a table
The function allows you to convert one column of data from a table.
The table must be plain text and can have any column separator.
The service assumes that the column you want to transform consists of numerical data only.
For example:
1,2,3
3,4,5
6,7,8
and
J2134-2345 no 45
J2344-2355 no 234
J2335-9876 yes 234
are both valid formats, the first with comma separated columns and the second with
space separated columns.
In the first case, if you enter the table name, the column separator
(,) the column to
translate (3), the original units (km) and the target units
(m) the resulting table will be:
1,2,3000
4,5,6000
7,8,9000
At the moment, the program does not deal with comment lines in the table.
The resulting table will be displayed as plain text, on a new page so that it is
easy to download.
Convert a column from a VOTable
This function allows you to convert a column of data in a VOTable from one set of
units to another. It requires the name of the VOTable, the field name of the column you
want to convert, and the units you want to convert from and to.
Ultimately this function will be able to use the units from the VOTable to determine
the current units for the data. However, at the moment no standard for units has been
decided on by the IVOA community. The function returns a VOTable.
As an example, using this VOTable you could convert the Declination column from deg
(degrees) to s (seconds).
The column descriptor from the VOTable looks like this initially:
<FIELD ID="DE" name="Declination" datatype="float" unit="degrees" ucd="POS_EQ_DEC_MAIN">
<DESCRIPTION>Declination J2000</DESCRIPTION>
</FIELD>
and one row of data looks like this (Declination is the third column):
<TR>
<TD>40</TD>
<TD>185.5999</TD>
<TD>58.07998</TD>
<TD>Double Star WNC4</TD>
<TD />
<TD>9.599996</TD>
<TD>Double Star</TD>
<TD>Ursa Major</TD>
<TD />
</TR>
After the conversion, the table is returned with the column data modified and also the
new unit in the column description:
<FIELD ID="DE" name="Declination" datatype="float" unit="s" ucd="POS_EQ_DEC_MAIN">
<DESCRIPTION>Declination J2000</DESCRIPTION>
</FIELD>
<TR>
<TD>40</TD>
<TD>185.5999</TD>
<TD>13939.2</TD>
<TD>Double Star WNC4</TD>
<TD />
<TD>9.599996</TD>
<TD>Double Star</TD>
<TD>Ursa Major</TD>
<TD />
</TR>
The VOTable functionality has only been tested on relatively straightforward VOTable
examples. If you find VOTables that do not work, please let
me know so that I can modify the
service.
Error messages
Descriptions of the error messages you might get when using the Quanta service.
- Connection refused means either the service is currently
unavailable, or that you are unable to connect from your location.
Currently the service is only available within the ATNF. If you are trying to connect from within
the ATNF and you are getting this message, it means the service is down, in which case you can
contact Tara Murphy and/or try again
later.
- Quantity was not a legal value probably means you have
chosen units that do not exist. Use the
List units
function to check the symbols for the units you are using.
Another thing to check is that you don't have any non-numerical
characters in the value part, for example mistyping 0 (zero) as O (the letter O).
- Unit::check Illegal unit string 'dogs' means that you
have chosen an invalid unit (in this case 'dogs') for the target units.
Again, use the list function to check the symbols for the units you require.
Note that the case of the letters matters, so (km) is legal, but (Km) is not.
- Dimensions of quantity do not match target units means that
you a trying to convert a quantity to units that are not dimensionally equivalent. For example,
convert km/s to m/h is legal because they both have dimensions distance/time.
However converting km/s to m/kg is not legal.
If you can't spot the problem, try putting both sets of units into the
Convert to base
function and compare the results.
- Separator must be a single character means that you have
entered more than one character as your column separator. Column separators are generally only
one character anyway (for example, a comma), so check that the value is what you intended.
If your file is white space separated then a single space will work.
- Column number must be greater than zero this message is
self-explanatory - check that your column number is a positive integer. Note that the first
column is assumed to be Column 1 (rather than Column 0).
- No data in input file probably means that you have given an
incorrect file name. Alternatively, the filename might be correct, but the file is actually
empty.
- Illegal character after field means that the service is having
trouble reading the data from the file. This could be caused by you choosing a field separator
that is not actually the field separator in the file. For example, if your file is space
separated, but you choose a comma as the separator, you will get this message.
- Could not read in floating point value means that the service is
having trouble reading the data from the file. This is probably because the column you have
selected does not consist of numerical data. It could be that you have selected the wrong
column, or maybe there are some letters mixed in with some of the values, for example:
a 12 3
b 13x 3
c 14 4
will cause this message, if you have selected column 2 to transform.
- Fieldname 'dog' does not appear in table means that
the chosen field is not in the VOTable. Check that you have specified the name exactly,
including the correct capitalisation. Also, check that you are using the "name" and
not a similar property such as the "id".
- An unexpected error has occured, please try again... hopefully you
won't ever get this error, but if you do, please contact Tara Murphy
with details for the error.
|