NRAO Home > CASA > CASA Toolkit Reference Manual

1.4 measures - Module

Measures handling

  1.4.1 measures - Tool
    measures.dirshow - Function
    measures.show - Function
    measures.epoch - Function
    measures.direction - Function
    measures.getvalue - Function
    measures.gettype - Function
    measures.getref - Function
    measures.getoffset - Function
    measures.cometname - Function
    measures.comettype - Function
    measures.cometdist - Function
    measures.cometangdiam - Function
    measures.comettopo - Function
    measures.framecomet - Function
    measures.position - Function
    measures.observatory - Function
    measures.obslist - Function
    measures.linelist - Function
    measures.spectralline - Function
    measures.sourcelist - Function
    measures.source - Function
    measures.frequency - Function
    measures.doppler - Function
    measures.radialvelocity - Function
    measures.shift - Function
    measures.uvw - Function
    measures.touvw - Function
    measures.expand - Function
    measures.earthmagnetic - Function
    measures.baseline - Function
    measures.asbaseline - Function
    measures.listcodes - Function
    measures.measure - Function
    measures.doframe - Function
    measures.framenow - Function
    measures.showframe - Function
    measures.toradialvelocity - Function
    measures.tofrequency - Function
    measures.todoppler - Function
    measures.torestfrequency - Function
    measures.rise - Function
    measures.riseset - Function
    measures.posangle - Function
    measures.separation - Function
    measures.addxvalue - Function
    measures.type - Function
    measures.done - Function
    measures.ismeasure - Function

Description A measure is a quantity with a specified reference frame (e.g. UTC, J2000, mars). The measures module provides an interface to the handling of measures. The basic functionality provided is:

This functionality is provided in a command line interface.

Measures

Measures are e.g. an epoch, or coordinates, which have, in addition to values (as quantities), also a reference specification, and possibly an offset. They are represented as records with fields describing the various entities embodied in the measure. These entities can be obtained by the access methods gettype, getref, getoffset. getvalue.

Each measure has its own list of reference codes (see the individual methods for creating them, like direction). If an empty or no code reference code is given, the default code for that type of measure will be used (e.g. it is J2000 for a direction). If an unknown code is given, this default is also returned, but with a warning message.

The values of a measure (like the right-ascension for a direction) are given as quantities. Each of them can be either a scalar quantity with a scalar or vector for its actual value (see the following example). E.g a vector of length 2 of quanta will be seen in a direction constructor as a longitude and a latitude.

"""  
#  
print "\t----\t Module Ex 1 \t----"  
print me.epoch(’utc’,’today’)      # note that your value will be different  
#{’type’: ’epoch’, ’m0’: {’value’: 54175.865923379628, ’unit’: ’d’}, ’refer’: ’UTC’}  
print me.direction(’j2000’,’5h20m’,’-30.2deg’)  
#{’type’: ’direction’, ’m1’: {’value’: -0.52708943410228748, ’unit’: ’rad’}, ’m0’: {’value’: 1.3962634015954634, ’unit’: ’rad’}, ’refer’: ’J2000’}  
a = me.direction(’j2000’,’5h20m’,’-30.2deg’)  
print me.gettype(a)  
#Direction  
print me.getoffset(a)  
#{}  
print me.getref(a)  
#J2000  
print me.getvalue(a)  
#{’m1’: {’value’: -0.52708943410228748, ’unit’: ’rad’}, ’m0’: {’value’: 1.3962634015954634, ’unit’: ’rad’}}  
print me.getvalue(a)[’m0’]  
#{’value’: 1.3962634015954634, ’unit’: ’rad’}  
print me.getvalue(a)[’m1’]  
#{’value’: -0.52708943410228748, ’unit’: ’rad’}  
print ’Last example! Exiting ...’  
exit()  
#  
"""

Known measures are:

In addition to the reference code (like J2000), a measure needs sometimes more information to be convertable to another reference code (e.g. a time and position to convert it to an azimuth/elevation). This additional information is called the reference frame, and can specify one or more of ’where am i’, ’when is it’, ’what direction”, ’how fast’.

The frame values can be set by the doframe tool function.


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search