Changeset 5f8fc78 in sasview


Ignore:
Timestamp:
Mar 4, 2015 12:09:19 PM (9 years ago)
Author:
Doucet, Mathieu <doucetm@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
c76bdc3
Parents:
3350ad6
Message:

pylint fixes

Location:
src/sas/pr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/pr/invertor.py

    r3350ad6 r5f8fc78  
    107107    ## Information dictionary for application use 
    108108    info = {} 
     109    ## Slit information 
     110    slit_height = None 
     111    slit_width = None 
    109112 
    110113    def __init__(self): 
    111114        Cinvertor.__init__(self) 
    112         self.slit_height = None 
    113         self.slit_width = None 
    114115        self.err = None 
    115116        self.d_max = None 
     
    537538 
    538539        """ 
    539         from num_term import Num_terms 
    540         estimator = Num_terms(self.clone()) 
     540        from num_term import NTermEstimator 
     541        estimator = NTermEstimator(self.clone()) 
    541542        try: 
    542543            return estimator.num_terms(isquit_func) 
  • src/sas/pr/num_term.py

    r038c00cf r5f8fc78  
    22import numpy 
    33import copy 
     4import sys 
     5import logging 
    46from sas.pr.invertor import Invertor 
    57 
    6  
    7 class Num_terms(): 
     8class NTermEstimator(object): 
    89    """ 
    910    """ 
     
    177178                data_err = numpy.append(data_err, err) 
    178179            except: 
    179                 pass 
     180                logging.error(sys.exc_value) 
    180181 
    181182    return data_x, data_y, data_err 
     
    183184 
    184185if __name__ == "__main__": 
    185     i = Invertor() 
     186    invert = Invertor() 
    186187    x, y, erro = load("test/Cyl_A_D102.txt") 
    187     i.d_max = 102.0 
    188     i.nfunc = 10 
    189     #i.q_max = 0.4 
    190     #i.q_min = 0.07 
    191     i.x = x 
    192     i.y = y 
    193     i.err = erro 
    194     #i.out, i.cov = i.lstsq(10) 
     188    invert.d_max = 102.0 
     189    invert.nfunc = 10 
     190    invert.x = x 
     191    invert.y = y 
     192    invert.err = erro 
    195193    # Testing estimator 
    196     est = Num_terms(i) 
     194    est = NTermEstimator(invert) 
    197195    print est.num_terms() 
Note: See TracChangeset for help on using the changeset viewer.