Changeset bc873053 in sasview for test/sasfit/test/utest_fit_line.py


Ignore:
Timestamp:
Nov 10, 2015 5:39:44 PM (8 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

File:
1 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 
Note: See TracChangeset for help on using the changeset viewer.