NRAO Home > CASA > CASA Toolkit Reference Manual
sd.list_files - Function

5.1.1 Return list of files readable by sd tool
Description

Return a list files readable by asap, such as MS, rpf, sdfits, mbf, asap. The method looks a directory that is indicated by path argument, and searches files with extension specified by suffix. Allowed extensions are:

Note that the method just checks the extension of the file name. Thus, the returned list doesn’t contains files that don’t have the above extensions even if they are readable.

Arguments





Inputs

path

The directory to list

allowed:

string

Default:

’./’ (current directory)

suffix

The file extension

allowed:

string

Default:

’rpf’





Returns
string array

Example

        files = sd.list_files("data/","sdfits")  
        print files  
        [’data/2001-09-01_0332_P363.sdfits’,  
        ’data/2003-04-04_131152_t0002.sdfits’,  
        ’data/Sgr_86p262_best_SPC.sdfits’]


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