Changes in / [ab60822:a57a902] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    r724257c r724257c  
    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.