Changeset 946c8d27 in sasmodels


Ignore:
Timestamp:
Sep 12, 2017 12:02:22 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
9644b5a
Parents:
ad79f49
Message:

add a TODO to the calc_composition_models code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    rad79f49 r946c8d27  
    602602        model. 
    603603        """ 
     604        # TODO: have calculate_Iq return the intermediates. 
     605        # 
     606        # The current interface causes calculate_Iq() to be called twice, 
     607        # once to get the combined result and again to get the intermediate 
     608        # results.  This is necessary for now. 
     609        # Long term, the solution is to change the interface to calculate_Iq 
     610        # so that it returns a results object containing all the bits: 
     611        #     the A, B, C, ... of the composition model 
     612        #     the P and S of the product model, 
     613        #     the combined model before resolution smearing, 
     614        #     the sasmodel before sesans conversion, 
     615        #     the oriented 2D model used to fit oriented usans data, 
     616        #     the final I(q), 
     617        #     ... 
     618        # Have the model calculator add all of these blindly to the data 
     619        # tree, and update the graphs which contain them.  The fitter 
     620        # needs to be updated to use the I(q) value only, ignoring the rest. 
     621        # 
     622        # The simple fix of returning the existing intermediate results 
     623        # will not work for a couple of reasons: (1) another thread may 
     624        # sneak in to compute its own results before calc_composition_models 
     625        # is called, and (2) calculate_Iq is currently called three times: 
     626        # once with q, once with q values before qmin and once with q values 
     627        # after q max.  Both of these should be addressed before 
     628        # replacing this code. 
    604629        with calculation_lock: 
    605630            self._calculate_Iq(qx) 
Note: See TracChangeset for help on using the changeset viewer.