Changeset dd02bce in sasmodels for sasmodels/sasview_model.py


Ignore:
Timestamp:
Sep 5, 2017 10:59:18 AM (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:
a57a902
Parents:
44ca3e1 (diff), 142a8e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ticket-741

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    r724257c r44ca3e1  
    595595                            % type(qdist)) 
    596596 
    597     def get_composition_models(self): 
    598         """ 
    599             Returns usable models that compose this model 
    600         """ 
    601         s_model = None 
    602         p_model = None 
    603         if hasattr(self._model_info, "composition") \ 
    604            and self._model_info.composition is not None: 
    605             p_model = _make_model_from_info(self._model_info.composition[1][0])() 
    606             s_model = _make_model_from_info(self._model_info.composition[1][1])() 
    607         return p_model, s_model 
     597    def calc_composition_models(self, qx): 
     598        """ 
     599        returns parts of the composition model or None if not a composition 
     600        model. 
     601        """ 
     602        with calculation_lock: 
     603            self._calculate_Iq(qx) 
     604            return self._intermediate_results 
    608605 
    609606    def calculate_Iq(self, qx, qy=None): 
     
    646643        result = calculator(call_details, values, cutoff=self.cutoff, 
    647644                            magnetic=is_magnetic) 
     645        self._intermediate_results = getattr(calculator, 'results', None) 
    648646        calculator.release() 
    649647        self._model.release() 
Note: See TracChangeset for help on using the changeset viewer.