NRAO Home > CASA > CASA Toolkit Reference Manual
ms.asdmref - Function

1.3.1 Test if the MS was imported with option lazy=True in importasdm and optionally change the ASDM reference


Description

If the MS is imported from an ASDM with option lazy=True, the DATA column of the MS is virtual and directly reads the visibilities from the ASDM. A reference to the original ASDM is stored with the MS. If the ASDM needs to be moved to a different path, the reference to it in the MS needs to be updated. This can be achieved with ms.asdmref(). When called with an empty string (default), the method just reports the currently set ASDM path.

Return value is a string containing the new path if the path was successfully set or (in the case abspath was empty) the MS indeed contains a ASDM reference, i.e. was lazily imported.

If the ASDM does not contain an ASDM reference, the method returns an empty string. If abspath is not empty and there was an error setting the new reference, the method throws an exception.

Arguments





Inputs

abspath

new absolute path of the ASDM to be referenced (empty string = report current setting)

allowed:

string

Default:

Returns
string

Example

 
     Set the path to the referenced ASDM to "/home/alma/myanalysis/uid___A12345_X678_X910":  
        ms.open("uid___A12345_X678_X910.ms",False)  
        ms.asdmref("/home/alma/myanalysis/uid___A12345_X678_X910")  
        ms.close()  
 
     Test if the MS was imported with lazy=True and therefore references an ASDM:  
        ms.open("uid___A12345_X678_X910.ms")  
        myref = ms.asdmref()  
        ms.close()  
        if myref=="":  
          print "This MS does not reference an ASDM."  
        else:  
          print "This MS references the ASDM ", myref  

__________________________________________________________________


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