Changeset 0cc77d8 in sasview for src/sas/sascalc/pr


Ignore:
Timestamp:
May 1, 2017 3:00:53 PM (8 years ago)
Author:
GitHub <noreply@…>
Children:
733cdcd
Parents:
b9d74f3 (diff), c00a797a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (05/01/17 15:00:53)
git-committer:
GitHub <noreply@…> (05/01/17 15:00:53)
Message:

Merge branch 'master' into raise

Location:
src/sas/sascalc/pr
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/pr/fit/AbstractFitEngine.py

    rb9d74f3 r0cc77d8  
     1from __future__ import print_function 
    12 
    23import  copy 
     
    630631        """ 
    631632        """ 
    632         print str(self) 
     633        print(str(self)) 
  • src/sas/sascalc/pr/fit/Loader.py

    rb9d74f3 r0cc77d8  
     1from __future__ import print_function 
     2 
    13# class Loader  to load any king of file 
    24#import wx 
     
    5456                    self.dx = np.zeros(len(self.x)) 
    5557                except: 
    56                     print "READ ERROR", line 
     58                    print("READ ERROR", line) 
    5759            # Sanity check 
    5860            if not len(self.x) == len(self.dx): 
     
    8082    load = Load() 
    8183    load.set_filename("testdata_line.txt") 
    82     print load.get_filename()  
     84    print(load.get_filename())  
    8385    load.set_values() 
    84     print load.get_values() 
     86    print(load.get_values()) 
    8587     
    8688             
  • src/sas/sascalc/pr/fit/expression.py

    rb9d74f3 r0cc77d8  
     1from __future__ import print_function 
     2 
    13# This program is public domain 
    24""" 
  • src/sas/sascalc/pr/num_term.py

    r7432acb ra1b8fee  
     1from __future__ import print_function 
     2 
    13import math 
    24import numpy as np 
     
    197199    # Testing estimator 
    198200    est = NTermEstimator(invert) 
    199     print est.num_terms() 
     201    print(est.num_terms()) 
  • src/sas/sascalc/pr/invertor.py

    r45dffa69 rb9d74f3  
    148148                msg = "Invertor: one of your q-values is zero. " 
    149149                msg += "Delete that entry before proceeding" 
    150                 raise ValueError, msg 
     150                raise ValueError(msg) 
    151151            return self.set_x(value) 
    152152        elif name == 'y': 
     
    159159                msg = "Invertor: d_max must be greater than zero." 
    160160                msg += "Correct that entry before proceeding" 
    161                 raise ValueError, msg 
     161                raise ValueError(msg) 
    162162            return self.set_dmax(value) 
    163163        elif name == 'q_min': 
     
    181181                return self.set_has_bck(0) 
    182182            else: 
    183                 raise ValueError, "Invertor: has_bck can only be True or False" 
     183                raise ValueError("Invertor: has_bck can only be True or False") 
    184184 
    185185        return Cinvertor.__setattr__(self, name, value) 
     
    325325        if self.is_valid() <= 0: 
    326326            msg = "Invertor.invert: Data array are of different length" 
    327             raise RuntimeError, msg 
     327            raise RuntimeError(msg) 
    328328 
    329329        p = np.ones(nfunc) 
     
    358358        if self.is_valid() <= 0: 
    359359            msg = "Invertor.invert: Data arrays are of different length" 
    360             raise RuntimeError, msg 
     360            raise RuntimeError(msg) 
    361361 
    362362        p = np.ones(nfunc) 
     
    442442        if self.is_valid() < 0: 
    443443            msg = "Invertor: invalid data; incompatible data lengths." 
    444             raise RuntimeError, msg 
     444            raise RuntimeError(msg) 
    445445 
    446446        self.nfunc = nfunc 
     
    467467            self._get_matrix(nfunc, nq, a, b) 
    468468        except: 
    469             raise RuntimeError, "Invertor: could not invert I(Q)\n  %s" % sys.exc_value 
     469            raise RuntimeError("Invertor: could not invert I(Q)\n  %s" % sys.exc_value) 
    470470 
    471471        # Perform the inversion (least square fit) 
     
    751751            except: 
    752752                msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value 
    753                 raise RuntimeError, msg 
     753                raise RuntimeError(msg) 
    754754        else: 
    755755            msg = "Invertor.from_file: '%s' is not a file" % str(path) 
    756             raise RuntimeError, msg 
     756            raise RuntimeError(msg) 
Note: See TracChangeset for help on using the changeset viewer.