Ignore:
Timestamp:
Nov 15, 2017 2:33:09 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
d4881f6a
Parents:
7c487846
Message:

Initial commit of the P(r) inversion perspective.
Code merged from Jeff Krzywon's ESS_GUI_Pr branch.
Also, minor 2to3 mods to sascalc/sasgui to enble error free setup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py

    • Property mode changed from 100644 to 100755
    ra1b8fee rfa81e94  
    33This module relies on guiframe manager. 
    44""" 
    5 from __future__ import print_function 
     5 
    66 
    77import wx 
     
    228228        sizer.Add(unit_title, (iy, ix), (1, 1), \ 
    229229                            wx.EXPAND | wx.ADJUST_MINSIZE, 0) 
    230         key_list = params.keys() 
     230        key_list = list(params.keys()) 
    231231        key_list.sort() 
    232232        for param in key_list: 
     
    560560            if self.parent.parent is None: 
    561561                return 
    562             msg = "Generic SAS Calculator: %s" % (sys.exc_value) 
     562            msg = "Generic SAS Calculator: %s" % (sys.exc_info()[1]) 
    563563            wx.PostEvent(self.parent.parent, 
    564564                          StatusEvent(status=msg, type='stop')) 
     
    761761        # II. Plot selective points in color 
    762762        other_color = np.ones(len(pix_symbol), dtype='bool') 
    763         for key in color_dic.keys(): 
     763        for key in list(color_dic.keys()): 
    764764            chosen_color = pix_symbol == key 
    765765            if np.any(chosen_color): 
     
    775775                # Get atom names not in the list 
    776776                a_names = [symb  for symb in pix_symbol \ 
    777                            if symb not in color_dic.keys()] 
     777                           if symb not in list(color_dic.keys())] 
    778778                a_name = a_names[0] 
    779779                for name in a_names: 
     
    899899 
    900900        except: 
    901             msg = "%s." % sys.exc_value 
     901            msg = "%s." % sys.exc_info()[1] 
    902902            status_type = 'stop' 
    903903            self._status_info(msg, status_type) 
     
    12851285            else: 
    12861286               sld_sets[list[0]] = None 
    1287         for key in sld_sets.keys(): 
     1287        for key in list(sld_sets.keys()): 
    12881288            key_low = key.lower() 
    12891289            if key_low.count('mx') > 0: 
     
    13361336                    return 
    13371337 
    1338             for key in sets.keys(): 
     1338            for key in list(sets.keys()): 
    13391339                setattr(omfdata, key, sets[key]) 
    13401340 
     
    13451345            self.sld_data.filename = "Default SLD Profile" 
    13461346        except: 
    1347             msg = "OMF Panel: %s" % sys.exc_value 
     1347            msg = "OMF Panel: %s" % sys.exc_info()[1] 
    13481348            infor = 'Error' 
    13491349            #logger.error(msg) 
     
    13751375        step_list = self._get_step_key_list(omfdata) 
    13761376        for ctr_list in self.nodes: 
    1377             for key in nodes_list.keys(): 
     1377            for key in list(nodes_list.keys()): 
    13781378                if ctr_list[0] == key: 
    13791379                    ctr_list[1].SetValue(format_number(nodes_list[key], True)) 
     
    13811381                    break 
    13821382        for ctr_list in self.stepsize: 
    1383             for key in step_list.keys(): 
     1383            for key in list(step_list.keys()): 
    13841384                if ctr_list[0] == key: 
    13851385                    ctr_list[1].SetValue(format_number(step_list[key], True)) 
     
    14421442        sld_key_list = self._get_slds_key_list(omfdata) 
    14431443        # Dic is not sorted 
    1444         key_list = [key for key in sld_key_list.keys()] 
     1444        key_list = [key for key in list(sld_key_list.keys())] 
    14451445        # Sort here 
    14461446        key_list.sort() 
     
    14851485        ix = 0 
    14861486        iy = -1 
    1487         for key, value in key_list.iteritems(): 
     1487        for key, value in key_list.items(): 
    14881488            iy += 1 
    14891489            ix = 0 
     
    15211521        iy = -1 
    15221522        #key_list.sort() 
    1523         for key, value in key_list.iteritems(): 
     1523        for key, value in key_list.items(): 
    15241524            iy += 1 
    15251525            ix = 0 
     
    16411641        sld_list = self._get_slds_key_list(sld_data) 
    16421642        for ctr_list in self.slds: 
    1643             for key in sld_list.keys(): 
     1643            for key in list(sld_list.keys()): 
    16441644                if ctr_list[0] == key: 
    16451645                    min_val = np.min(sld_list[key]) 
Note: See TracChangeset for help on using the changeset viewer.