Ignore:
Timestamp:
Apr 25, 2018 6:59:33 AM (7 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:
017b285
Parents:
93c79b5
git-author:
Piotr Rozyczko <rozyczko@…> (03/22/18 16:46:19)
git-committer:
Piotr Rozyczko <rozyczko@…> (04/25/18 06:59:33)
Message:

Merge branch 'ESS_GUI' into ESS_GUI_better_batch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    rfde5bcd rd4dac80  
    421421        weight = numpy.abs(data) 
    422422    return weight 
     423 
     424def updateKernelWithResults(kernel, results): 
     425    """ 
     426    Takes model kernel and applies results dict to its parameters, 
     427    returning the modified (deep) copy of the kernel. 
     428    """ 
     429    assert(isinstance(results, dict)) 
     430    local_kernel = copy.deepcopy(kernel) 
     431 
     432    for parameter in results.keys(): 
     433        # Update the parameter value - note: this supports +/-inf as well 
     434        local_kernel.setParam(parameter, results[parameter][0]) 
     435 
     436    return local_kernel 
     437 
     438 
Note: See TracChangeset for help on using the changeset viewer.