Changeset 1154 for trunk/python


Ignore:
Timestamp:
08/21/06 13:42:34 (18 years ago)
Author:
mar637
Message:

workaround for tables not supporting change of directory. bug fix for set_frequency_limits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/linecatalog.py

    r1153 r1154  
    2424
    2525    def __init__(self, name):
    26         lcbase.__init__(self, name)
     26        fpath = os.path.abspath(os.path.expandvars(os.path.expanduser(name)))
     27        lcbase.__init__(self, fpath)
    2728
    2829    def summary(self):
     
    6465            raise ValueError("%s is not a valid unit." % unit)
    6566        # the table conatins values in MHz
    66         lcbase.set_freq_limits(self, fmin/base[unit], fmax/base[unit])
     67        lcbase.set_freq_limits(self, fmin*base[unit], fmax*base[unit])
    6768
    6869    def set_strength_limits(self, smin, smax):
     
    8081        and can be read in again.
    8182        """
    82         name = os.path.expandvars(name)
     83        name = os.path.expanduser(os.path.expandvars(name))
    8384        if os.path.isfile(name) or os.path.isdir(name):
    8485            if not overwrite:
Note: See TracChangeset for help on using the changeset viewer.