Changeset 5399809 in sasmodels for sasmodels/kernel.py
- Timestamp:
- Aug 21, 2018 1:32:40 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 2a12351b
- Parents:
- c57ee9e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel.py
r6e7ba14 r5399809 44 44 # type: (CallDetails, np.ndarray, np.ndarray, float, bool) -> np.ndarray 45 45 Pq, Reff = self.Pq_Reff(call_details, values, cutoff, magnetic, effective_radius_type=0) 46 scale = values[0] 47 background = values[1] 48 return scale*Pq + background 46 return Pq 49 47 __call__ = Iq 50 48 … … 53 51 self._call_kernel(call_details, values, cutoff, magnetic, effective_radius_type) 54 52 #print("returned",self.q_input.q, self.result) 55 nout = 2 if self.info.have_Fq else 153 nout = 2 if self.info.have_Fq and self.dim == '1d' else 1 56 54 total_weight = self.result[nout*self.q_input.nq + 0] 57 55 if total_weight == 0.: … … 63 61 # = scale*(sum(w*F^2)/sum w)/(sum (w*V)/sum w) + background 64 62 # = scale/sum (w*V) * sum(w*F^2) + background 63 F2 = self.result[0:nout*self.q_input.nq:nout] 65 64 scale = values[0]/(weighted_volume if weighted_volume != 0.0 else 1.0) 66 65 background = values[1] 66 Pq = scale*F2 + background 67 67 #print("scale",scale,background) 68 return self.result[0:nout*self.q_input.nq:nout], effective_radius68 return Pq, effective_radius 69 69 70 70 def beta(self, call_details, values, cutoff, magnetic, effective_radius_type):
Note: See TracChangeset
for help on using the changeset viewer.