Changes in / [a57a902:ab60822] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    r724257c r724257c  
    595595                            % type(qdist)) 
    596596 
    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 
     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 
    605608 
    606609    def calculate_Iq(self, qx, qy=None): 
     
    643646        result = calculator(call_details, values, cutoff=self.cutoff, 
    644647                            magnetic=is_magnetic) 
    645         self._intermediate_results = getattr(calculator, 'results', None) 
    646648        calculator.release() 
    647649        self._model.release() 
Note: See TracChangeset for help on using the changeset viewer.