Changes in / [ad79f49:b18e650] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    rbcdd6c9 rbcdd6c9  
    169169    return make_model_from_info(model_info) 
    170170 
    171  
     171     
    172172def _register_old_models(): 
    173173    # type: () -> None 
     
    597597                            % type(qdist)) 
    598598 
    599     def calc_composition_models(self, qx): 
    600         """ 
    601         returns parts of the composition model or None if not a composition 
    602         model. 
    603         """ 
    604         with calculation_lock: 
    605             self._calculate_Iq(qx) 
    606             return self._intermediate_results 
     599    def get_composition_models(self): 
     600        """ 
     601            Returns usable models that compose this model 
     602        """ 
     603        s_model = None 
     604        p_model = None 
     605        if hasattr(self._model_info, "composition") \ 
     606           and self._model_info.composition is not None: 
     607            p_model = make_model_from_info(self._model_info.composition[1][0])() 
     608            s_model = make_model_from_info(self._model_info.composition[1][1])() 
     609        return p_model, s_model 
    607610 
    608611    def calculate_Iq(self, qx, qy=None): 
     
    645648        result = calculator(call_details, values, cutoff=self.cutoff, 
    646649                            magnetic=is_magnetic) 
    647         self._intermediate_results = getattr(calculator, 'results', None) 
    648650        calculator.release() 
    649651        self._model.release() 
Note: See TracChangeset for help on using the changeset viewer.