Ignore:
Timestamp:
04/22/11 18:21:29 (13 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (a fix)

Ready for Test: Yes

Interface Changes: added a new method new_asaplot() to module asapplotter which returns asaplot instance based on your backend selection.

What Interface Changed:

Test Programs: sdaverage, sdsmooth with verify=True and plotlevel > 0

Put in Release Notes: No

Module(s):

Description: proper handling of plotting in non-TkAgg? backend.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/asapmath.py

    r2139 r2150  
    33from asap.logging import asaplog, asaplog_post_dec
    44from asap.selector import selector
    5 from asap import asaplotgui
     5#from asap import asaplotgui
     6from asap.asapplotter import new_asaplot
    67
    78@asaplog_post_dec
     
    311312        asaplog.push('Plot only first spectrum for each [if,pol] pairs to verify calibration.')
    312313        asaplog.post('WARN')
    313         p=asaplotgui.asaplotgui()
     314        #p=asaplotgui.asaplotgui()
     315        p=new_asaplot()
    314316        #nr=min(6,len(ifnos)*len(polnos))
    315317        nr=len(ifnos)*len(polnos)
     
    388390        x=raw_input('Accept calibration ([y]/n): ' )
    389391        if x.upper() == 'N':
    390             p.unmap()
     392            p.quit()
    391393            del p
    392394            return scabtab
    393         p.unmap()
     395        p.quit()
    394396        del p
    395397    ###
     
    530532        asaplog.push('Plot only first spectrum for each [if,pol] pairs to verify calibration.')
    531533        asaplog.post('WARN')
    532         p=asaplotgui.asaplotgui()
     534        #p=asaplotgui.asaplotgui()
     535        p=new_asaplot()
    533536        #nr=min(6,len(ifnos)*len(polnos))
    534537        nr=len(ifnos)*len(polnos)
     
    607610        x=raw_input('Accept calibration ([y]/n): ' )
    608611        if x.upper() == 'N':
    609             p.unmap()
     612            p.quit()
    610613            del p
    611614            return scabtab
    612         p.unmap()
     615        p.quit()
    613616        del p
    614617    ###
     
    742745        asaplog.push('Plot only first spectrum for each [if,pol] pairs to verify calibration.')
    743746        asaplog.post('WARN')
    744         p=asaplotgui.asaplotgui()
     747        #p=asaplotgui.asaplotgui()
     748        p=new_asaplot()
    745749        #nr=min(6,len(ifnos)*len(polnos))
    746750        nr=len(ifnos)/2*len(polnos)
     
    811815        x=raw_input('Accept calibration ([y]/n): ' )
    812816        if x.upper() == 'N':
    813             p.unmap()
     817            p.quit()
    814818            del p
    815819            return scabtab
    816         p.unmap()
     820        p.quit()
    817821        del p
    818822    ###
Note: See TracChangeset for help on using the changeset viewer.