Changeset 2892


Ignore:
Timestamp:
01/16/14 14:20:46 (11 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: Yes CAS-5859

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: Yes

Module(s): sd

Description: modified parse_spw_selection() so that the original MOLECULE_ID column values are saved and restored finally.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r2891 r2892  
    18531853        self.set_unit('channel')
    18541854       
    1855         orig_restfreq = self.get_restfreqs()
    1856         orig_restfreq_list = []
    1857         for i in orig_restfreq.keys():
    1858             if len(orig_restfreq[i]) == 1:
    1859                 orig_restfreq_list.append(orig_restfreq[i][0])
    1860             else:
    1861                 orig_restfreq_list.append(orig_restfreq[i])
    1862        
    1863         orig_coord    = self._getcoordinfo()
    1864         orig_frame    = orig_coord[1]
    1865         orig_doppler  = orig_coord[2]
    1866        
    1867         #if restfreq is None: restfreq = orig_restfreq_list
    1868         #self.set_restfreqs(restfreq)
    18691855        if restfreq is not None:
    1870             set_restfreq(self, restfreq) #<----------------------
    1871 
     1856            orig_molids = self._getmolidcol_list()
     1857            set_restfreq(self, restfreq)
     1858
     1859        orig_coord   = self._getcoordinfo()
     1860
     1861        if frame is not None:
     1862            orig_frame = orig_coord[1]
     1863            self.set_freqframe(frame)
     1864
     1865        if doppler is not None:
     1866            orig_doppler = orig_coord[2]
     1867            self.set_doppler(doppler)
     1868        """
    18721869        if frame is None: frame = orig_frame
    18731870        self.set_freqframe(frame)
     
    18751872        if doppler is None: doppler = orig_doppler
    18761873        self.set_doppler(doppler)
     1874        """
    18771875       
    18781876        valid_ifs = self.getifnos()
     
    21442142       
    21452143        # restore original values
    2146 
     2144        self.set_unit(orig_unit)
    21472145        if restfreq is not None:
    2148             #self.set_restfreqs(orig_restfreq_list)#<-- SHOULD BE set_restfreqs(normalise_restfreq(orig_restfreq))
    2149             set_restfreq(self, orig_restfreq_list)
    2150         self.set_freqframe(orig_frame)
    2151         self.set_doppler(orig_doppler)
    2152         self.set_unit(orig_unit)
     2146            self._setmolidcol_list(orig_molids)
     2147        if frame is not None:
     2148            self.set_freqframe(orig_frame)
     2149        if doppler is not None:
     2150            self.set_doppler(orig_doppler)
    21532151       
    21542152        return res
Note: See TracChangeset for help on using the changeset viewer.