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/plottools/plottables.py

    • Property mode changed from 100644 to 100755
    r2d9526d rfa81e94  
    242242        selected_color = plottable.custom_color 
    243243        selected_plottable = None 
    244         for p in self.plottables.keys(): 
     244        for p in list(self.plottables.keys()): 
    245245            if plottable.id == p.id: 
    246246                selected_plottable = p 
     
    389389 
    390390        """ 
    391         raise NotImplemented, "Not a valid transform" 
     391        raise NotImplemented("Not a valid transform") 
    392392 
    393393    # Related issues 
     
    517517                label_dict[collection[0]] = basename 
    518518            else: 
    519                 for i in xrange(len(collection)): 
     519                for i in range(len(collection)): 
    520520                    label_dict[collection[i]] = "%s %d" % (basename, i) 
    521521        return label_dict 
     
    689689                msg = "Plottable.View: Given x and dx are not" 
    690690                msg += " of the same length" 
    691                 raise ValueError, msg 
     691                raise ValueError(msg) 
    692692            # Check length of y array 
    693693            if not len(y) == len(x): 
    694694                msg = "Plottable.View: Given y " 
    695695                msg += "and x are not of the same length" 
    696                 raise ValueError, msg 
     696                raise ValueError(msg) 
    697697 
    698698            if dy is not None and not len(dy) == 0 and not len(y) == len(dy): 
    699699                msg = "Plottable.View: Given y and dy are not of the same " 
    700700                msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy)) 
    701                 raise ValueError, msg 
     701                raise ValueError(msg) 
    702702            self.x = [] 
    703703            self.y = [] 
     
    734734                msg = "Plottable.View: transformed x " 
    735735                msg += "and y are not of the same length" 
    736                 raise ValueError, msg 
     736                raise ValueError(msg) 
    737737            if has_err_x and not (len(self.x) == len(self.dx)): 
    738738                msg = "Plottable.View: transformed x and dx" 
    739739                msg += " are not of the same length" 
    740                 raise ValueError, msg 
     740                raise ValueError(msg) 
    741741            if has_err_y and not (len(self.y) == len(self.dy)): 
    742742                msg = "Plottable.View: transformed y" 
    743743                msg += " and dy are not of the same length" 
    744                 raise ValueError, msg 
     744                raise ValueError(msg) 
    745745            # Check that negative values are not plot on x and y axis for 
    746746            # log10 transformation 
     
    814814                except: 
    815815                    logger.error("check_data_logX: skipping point x %g", self.x[i]) 
    816                     logger.error(sys.exc_value) 
     816                    logger.error(sys.exc_info()[1]) 
    817817            self.x = tempx 
    818818            self.y = tempy 
     
    844844                except: 
    845845                    logger.error("check_data_logY: skipping point %g", self.y[i]) 
    846                     logger.error(sys.exc_value) 
     846                    logger.error(sys.exc_info()[1]) 
    847847 
    848848            self.x = tempx 
     
    11081108        Plottable.__init__(self) 
    11091109        msg = "Theory1D is no longer supported, please use Data1D and change symbol.\n" 
    1110         raise DeprecationWarning, msg 
     1110        raise DeprecationWarning(msg) 
    11111111 
    11121112class Fit1D(Plottable): 
Note: See TracChangeset for help on using the changeset viewer.