Changeset 117c02a in sasmodels for sasmodels/sasview_model.py


Ignore:
Timestamp:
Sep 3, 2018 7:20:35 AM (6 years ago)
Author:
Torin Cooper-Bennun <torin.cooper-bennun@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
c0131d44
Parents:
bad3093
Message:

cherry-picking lazy results implementation from beta_approx_lazy_results, beta_approx_new_R_eff branches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    rd533590 r117c02a  
    381381                continue 
    382382            self.params[p.name] = p.default 
    383             self.details[p.id] = [p.units, p.limits[0], p.limits[1]] 
     383            if p.limits is not None: 
     384                self.details[p.id] = [p.units if not p.choices else p.choices, p.limits[0], p.limits[1]] 
     385            else: 
     386                self.details[p.id] = [p.units if not p.choices else p.choices, None, None] 
    384387            if p.polydisperse: 
    385388                self.details[p.id+".width"] = [ 
     
    616619        # so that it returns a results object containing all the bits: 
    617620        #     the A, B, C, ... of the composition model (and any subcomponents?) 
    618         #     the P and S of the product model, 
     621        #     the P and S of the product model 
    619622        #     the combined model before resolution smearing, 
    620623        #     the sasmodel before sesans conversion, 
     
    638641            with calculation_lock: 
    639642                self._calculate_Iq(qx) 
    640                 return self._intermediate_results 
     643                # for compatibility with sasview 4.3 
     644                results = self._intermediate_results() 
     645                return results["P(Q)"], results["S(Q)"] 
    641646        else: 
    642647            return None 
Note: See TracChangeset for help on using the changeset viewer.