Ignore:
Timestamp:
Nov 15, 2017 4:33:09 AM (7 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.

Location:
src/sas/sasgui/guiframe/local_perspectives/plotting
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    rc416a17 rfa81e94  
    475475            try: 
    476476                self._onEVT_FUNC_PROPERTY() 
    477             except Exception, exc: 
     477            except (Exception, exc): 
    478478                wx.PostEvent(self.parent, 
    479479                             StatusEvent(status="Plotting Error: %s" % str(exc), info="error")) 
     
    492492                    # MAC: forcing to plot 2D avg 
    493493                    self.canvas._onDrawIdle() 
    494             except Exception, exc: 
     494            except (Exception, exc): 
    495495                wx.PostEvent(self.parent, StatusEvent(status=\ 
    496496                    "Plotting Error: %s" % str(exc), info="error")) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py

    rcee5c78 rfa81e94  
    232232            msg = "Phi left and phi right are different" 
    233233            msg += " %f, %f" % (self.left_line.phi, self.right_line.phi) 
    234             raise ValueError, msg 
     234            raise (ValueError, msg) 
    235235        params["Phi [deg]"] = self.main_line.theta * 180 / numpy.pi 
    236236        params["Delta_Phi [deg]"] = numpy.fabs(self.left_line.phi * 180 / numpy.pi) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py

    r463e7ffc rfa81e94  
    187187        # Check that the trigger is valid 
    188188        if trigger not in self._actions: 
    189             raise ValueError, "%s invalid --- valid triggers are %s" \ 
    190                 % (trigger, ", ".join(self.events)) 
     189            raise (ValueError, "%s invalid --- valid triggers are %s" \ 
     190                % (trigger, ", ".join(self.events))) 
    191191        # Register the trigger callback 
    192192        self._actions[trigger][artist] = action 
     
    203203        """ 
    204204        if action not in self.events: 
    205             raise ValueError, "Trigger expects " + ", ".join(self.events) 
     205            raise (ValueError, "Trigger expects " + ", ".join(self.events)) 
    206206        # Tag the event with modifiers 
    207207        for mod in ('alt', 'control', 'shift', 'meta'): 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py

    rcee5c78 rfa81e94  
    136136            if new_slab is None: 
    137137                msg = "post data:cannot average , averager is empty" 
    138                 raise ValueError, msg 
     138                raise (ValueError, msg) 
    139139            self.averager = new_slab 
    140140        if self.direction == "X": 
     
    152152        else: 
    153153            msg = "post data:no Box Average direction was supplied" 
    154             raise ValueError, msg 
     154            raise (ValueError, msg) 
    155155        # # Average data2D given Qx or Qy 
    156156        box = self.averager(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max, 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py

    r2d9526d rfa81e94  
    200200 
    201201        msg = "1D Panel of group ID %s could not be created" % str(group_id) 
    202         raise ValueError, msg 
     202        raise (ValueError, msg) 
    203203 
    204204    def create_2d_panel(self, data, group_id): 
     
    218218            return new_panel 
    219219        msg = "2D Panel of group ID %s could not be created" % str(group_id) 
    220         raise ValueError, msg 
     220        raise (ValueError, msg) 
    221221 
    222222    def update_panel(self, data, panel): 
     
    238238            msg += " to panel %s\n" % str(panel.window_caption) 
    239239            msg += "Please edit %s's units, labels" % str(data.name) 
    240             raise ValueError, msg 
     240            raise (ValueError, msg) 
    241241        else: 
    242242            if panel.group_id not in data.list_group_id: 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py

    r7432acb rfa81e94  
    175175            msg += "different %f, %f" % (self.left_line.phi, 
    176176                                         self.right_line.phi) 
    177             raise ValueError, msg 
     177            raise (ValueError, msg) 
    178178        params["Phi"] = self.main_line.theta 
    179179        params["Delta_Phi"] = math.fabs(self.left_line.phi) 
Note: See TracChangeset for help on using the changeset viewer.