NRAO Home > CASA > CASA Toolkit Reference Manual
coordsys.newcoordsys - Function

1.1.3 Create a non-default coordsys tool


Description

By default, this constructor makes an empty Coordsys tool. You can ask it to include various sorts of coordinates through the arguments. Except for Stokes, you don’t have any control over the coordinate contents (e.g. reference value etc.) it does make for you on request. But you can edit the Coordinate System after creation if you wish.

If you wish to make a Stokes coordinate, then you assign stokes to a string (or a vector of strings) saying which Stokes you want. CASA allows rather a lot of potential Stokes types.

Probably most useful is some combination of the basic I, Q, U, V, XX, YY, XY, YX, RR, LL, RL, and LR.

However, a more esoteric choice is also possible: RX, RY, LX, LY, XR, XL, YR, YL (these are mixed linear and circular), PP, PQ, QP, QQ (general quasi-orthogonal correlation products) RCircular, LCircular, Linear (single dish polarization types).

You can also specify some polarization ‘Stokes’ types: Ptotal (Polarized intensity ((Q2 + U2 + V 2)12), Plinear (Linearly Polarized intensity ((Q2 + U2)12), PFtotal (Polarization Fraction (Ptotal/I)), PFlinear (Linear Polarization Fraction (Plinear/I)), and Pangle (Linear Polarization Angle (0.5 arctan(U∕Q) in radians)).

Probably you will find the more unusual types aren’t fully supported throughout the system.

You can make a LinearCoordinate with as many uncoupled axes as you like. Thus, linear=2 makes one LinearCoordinate with 2 axes (think of it like a DirectionCoordinate which also has 2 axes [but coupled in this case], a longitude and a latitude).

If you make a TabularCoordinate, it is linear to start with. You can change it to a non-linear one by providing a list of pixel and world values to function settabular.

Arguments





Inputs

direction

Make a direction coordinate ?

allowed:

bool

Default:

false

spectral

Make a spectral coordinate ?

allowed:

bool

Default:

false

stokes

Make a Stokes coordinate with these Stokes

allowed:

stringArray

Default:

I Q U V XX YY XY YX RR LL RL LR

linear

Make a linear coordinate with this many axes

allowed:

int

Default:

0

tabular

Make a tabular coordinate

allowed:

bool

Default:

false

Returns
coordsys

Example

 
 
"""  
#  
print "\t----\t newcoordsys Ex 1 \t----"  
cs1=cs.newcoordsys()  
print ’ncoordinates =’,cs1.ncoordinates()  
#0  
cs1.done()  
#True  
cs2=cs.newcoordsys(direction=T,stokes=[’I’,’V’])  
print ’ncoordinates =’,cs2.ncoordinates()  
#2L  
print cs2.coordinatetype()  
#[’Direction’, ’Stokes’]  
cs2.summary()  
#  
"""  
 
The second Coordinate System contains a direction coordinate  
and a Stokes coordinate.   This means that there are three ‘axes’  
associated with the 2 coordinates.  
 

__________________________________________________________________


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