Ignore:
Timestamp:
12/01/04 13:47:09 (20 years ago)
Author:
mar637
Message:

Added SDFITS writing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r113 r116  
    1919        self._p = None
    2020        sdtable.__init__(self, filename)
     21
     22    def save(self, name, format='ASAP'):
     23        """
     24        Store the scantable on disk. This can be a asap file or SDFITS/MS2.
     25        Parameters:
     26            name:        the name of the outputfile
     27            format:      an optional file format. Default is ASAP.
     28                         Alllowed are 'ASAP', 'SDFITS' and 'MS2'
     29        Example:
     30            scan.save('myscan.asap')
     31            scan.save('myscan.sdfits','SDFITS')
     32        """
     33        if format == 'ASAP':
     34            self._save(name)
     35        else:
     36            from asap._asap import sdwriter as _sw
     37            w = _sw()
     38            if format == 'SDFITS':
     39                w.write(self, name)
     40        return
    2141
    2242    def _verbose(self, *args):
Note: See TracChangeset for help on using the changeset viewer.