Changeset 1496 for branches/alma


Ignore:
Timestamp:
02/04/09 11:01:51 (16 years ago)
Author:
TakTsutsumi
Message:

New Development: No

JIRA Issue: No

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: a new boolean, getpt

Test Programs: List test programs

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Added a boolean, getpt to init()

and _fill() to allow control over
pointing data filling.
Also commented out a line forces
the default frequency
frame setting when scantble is read.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/python/scantable.py

    r1457 r1496  
    1212    """
    1313
    14     def __init__(self, filename, average=None, unit=None):
     14    def __init__(self, filename, average=None, unit=None, getpt=None):
    1515        """
    1616        Create a scantable from a saved one or make a reference
     
    3333        if average is None:
    3434            average = rcParams['scantable.autoaverage']
     35        if getpt is None:
     36            getpt = False
    3537        varlist = vars()
    3638        from asap._asap import stmath
     
    5860                        if unit is not None:
    5961                            self.set_fluxunit(unit)
    60                         self.set_freqframe(rcParams['scantable.freqframe'])
     62                        # do not reset to the default freqframe
     63                        #self.set_freqframe(rcParams['scantable.freqframe'])
    6164                    else:
    6265                        msg = "The given file '%s'is not a valid " \
     
    6871                            raise IOError(msg)
    6972                else:
    70                     self._fill([filename], unit, average)
     73                    self._fill([filename], unit, average, getpt)
    7174            elif (isinstance(filename, list) or isinstance(filename, tuple)) \
    7275                  and isinstance(filename[-1], str):
    73                 self._fill(filename, unit, average)
     76                self._fill(filename, unit, average, getpt)
    7477        self._add_history("scantable", varlist)
    7578        print_log()
     
    18901893        return (sum(nchans)/len(nchans) == nchans[0])
    18911894
    1892     def _fill(self, names, unit, average):
     1895    def _fill(self, names, unit, average, getpt):
    18931896        import os
    18941897        from asap._asap import stfiller
     
    19151918            asaplog.push(msg, False)
    19161919            print_log()
    1917             r._open(name, -1, -1)
     1920            r._open(name, -1, -1, getpt)
    19181921            r._read()
    19191922            #tbl = r._getdata()
Note: See TracChangeset for help on using the changeset viewer.