Changeset 2541 for trunk/python


Ignore:
Timestamp:
05/21/12 14:16:36 (13 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (related to CAS-3749)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: Interactive tests

Test I. run sdbaseline with blfunc='poly', verify=True and masklist=[]

on CASA,
or run scantable.auto_poly_baseline and scantable.poly_baseline
with plot=True and mask=None.
--> Verification plots should properly be loaded.

Test II.
(1) run asapfitter.plot, by for example

scan = asap.scantable(infile,False)
f=asap.fitter()
f.set_function(lpoly=2)
f.x = scan._getabcissa(0)
f.y = scan._getspectrum(0)
f.mask=(scan._getmask(0))
f.data=None
f.fit()
f.plot(residual=True)

(2) plot something with sdplot (on CASA) or asapplotter.plot
(3) run asapfitter.plot again

f.plot(residual=True)
--> (3) should work without an error

Put in Release Notes: No

Module(s):

Description:

[I] Fixed bugs which caused scantable.poly_baseline and
scantable.auto_poly_baseline crash when mask=None (default)
and plot=True.
[II] Fixed a bug which caused an error in asapfitter.plot when the
other plotting operation is invoked between multiple run of asapfitter.plot.


Location:
trunk/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapfitter.py

    r2538 r2541  
    544544        if not self.fitted:
    545545            return
    546         if not self._p or self._p.is_dead:
     546        #if not self._p or self._p.is_dead:
     547        if not (self._p and self._p._alive()):
    547548            from asap.asapplotter import new_asaplot
    548549            del self._p
  • trunk/python/scantable.py

    r2535 r2541  
    29642964                    f.x = workscan._getabcissa(r)
    29652965                    f.y = workscan._getspectrum(r)
    2966                     f.mask = mask_and(mask, workscan._getmask(r))    # (CAS-1434)
     2966                    if mask:
     2967                        f.mask = mask_and(mask, workscan._getmask(r))    # (CAS-1434)
     2968                    else: # mask=None
     2969                        f.mask = workscan._getmask(r)
     2970                   
    29672971                    f.data = None
    29682972                    f.fit()
    2969                    
     2973
    29702974                    f.plot(residual=True)
    29712975                    accept_fit = raw_input("Accept fit ( [y]/n ): ")
     
    31093113                for r in rows:
    31103114                    idx = 2*workscan.getif(r)
    3111                     fl.find_lines(r, mask_and(mask, workscan._getmask(r)),
    3112                                   edge[idx:idx+2])  # (CAS-1434)
     3115                    if mask:
     3116                        msk = mask_and(mask, workscan._getmask(r)) # (CAS-1434)
     3117                    else: # mask=None
     3118                        msk = workscan._getmask(r)
     3119                    fl.find_lines(r, msk, edge[idx:idx+2]) 
    31133120
    31143121                    f.x = workscan._getabcissa(r)
Note: See TracChangeset for help on using the changeset viewer.