Changeset bc873053 in sasview for test/sasfit


Ignore:
Timestamp:
Nov 10, 2015 5:39:44 PM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
80ba1a2
Parents:
40c69b3
Message:

Fix slit height resolution problem. Still issues with slit width. Refs #472

Location:
test/sasfit/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/sasfit/test/utest_fit_line.py

    racf8e4a5 rbc873053  
    1111from sas.models.LineModel import LineModel 
    1212from sas.models.Constant import Constant 
     13 
     14from bumps import fitters 
     15try: 
     16    from bumps.options import FIT_CONFIG 
     17    def set_fitter(alg, opts): 
     18        FIT_CONFIG.selected_id = alg 
     19        FIT_CONFIG.values[alg].update(opts, monitors=[]) 
     20except: 
     21    # CRUFT: Bumps changed its handling of fit options around 0.7.5.6 
     22    def set_fitter(alg, opts): 
     23        #print "fitting",alg,opts 
     24        #print "options",fitters.FIT_OPTIONS[alg].__dict__ 
     25        fitters.FIT_DEFAULT = alg 
     26        fitters.FIT_OPTIONS[alg].options.update(opts, monitors=[]) 
     27 
    1328 
    1429class testFitModule(unittest.TestCase): 
     
    6782 
    6883    def fit_bumps(self, alg, **opts): 
    69         #Importing the Fit module 
    70         from bumps import fitters 
    71         fitters.FIT_DEFAULT = alg 
    72         fitters.FIT_OPTIONS[alg].options.update(opts) 
    73         fitters.FIT_OPTIONS[alg].options.update(monitors=[]) 
    74         #print "fitting",alg,opts 
    75         #kprint "options",fitters.FIT_OPTIONS[alg].__dict__ 
     84        set_fitter(alg, opts) 
    7685        self.fit_single(isdream=(alg=='dream')) 
    7786 
  • test/sasfit/test/utest_fit_smeared.py

    racf8e4a5 rbc873053  
    1313from sas.models.CylinderModel import CylinderModel 
    1414from sas.models.SphereModel import SphereModel 
     15 
     16 
     17from bumps import fitters 
     18try: 
     19    from bumps.options import FIT_CONFIG 
     20    def set_fitter(alg, opts): 
     21        FIT_CONFIG.selected_id= alg 
     22        FIT_CONFIG.values[alg].update(opts, monitors=[]) 
     23except: 
     24    # CRUFT: Bumps changed its handling of fit options around 0.7.5.6 
     25    def set_fitter(alg, opts): 
     26        #print "fitting",alg,opts 
     27        #print "options",fitters.FIT_OPTIONS[alg].__dict__ 
     28        fitters.FIT_DEFAULT = alg 
     29        fitters.FIT_OPTIONS[alg].options.update(opts, monitors=[]) 
     30 
    1531 
    1632class testFitModule(unittest.TestCase): 
     
    5773            Cylinder fit with dispersion 
    5874        """ 
    59         alg = 'lm' 
    60         from bumps import fitters 
    61         fitters.FIT_DEFAULT = alg 
    62         #fitters.FIT_OPTIONS[alg].options.update(opts) 
    63         fitters.FIT_OPTIONS[alg].options.update(monitors=[]) 
     75        set_fitter('lm', {}) 
    6476        self._dispersion(fitter = Fit()) 
    6577 
Note: See TracChangeset for help on using the changeset viewer.