Changeset 2ccb775 in sasmodels
- Timestamp:
- Nov 9, 2016 1:50:01 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 46d9f48
- Parents:
- 1a6cd57
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/resolution.py
reb8a82e r2ccb775 59 59 60 60 class SESANS1D(Resolution): 61 61 def __init__(self, data, H0, H, q_calc): 62 self.q = data.x 63 self.H0 = H0 64 self.H = H 65 self.data=data 66 self.q_calc = q_calc 67 def apply(self, theory): 68 return sesans.hankeltrafo(self.H0, self.H, theory) 69 70 """ 62 71 def __init__(self, data, q_calc): 63 72 self.q = data.x … … 67 76 def apply(self, theory): 68 77 return sesans.transform(self.data, self.q_calc, theory, None, None) 69 78 """ 70 79 class Pinhole1D(Resolution): 71 80 r""" -
sasmodels/sesans.py
r3023268 r2ccb775 54 54 # data.has_z_acceptance 55 55 return [q] 56 57 def hankeltrafo(H0, H, Iq_calc): 58 G0 = np.dot(H0, Iq_calc) 59 G=[] 60 for i in range(len(H[0, :])): 61 Gtmp = np.dot(H[:, i], Iq_calc) 62 G.append(Gtmp) 63 P = G - G0 64 return P # This is the logarithmic P, not the linear one as found in Andersson2008 65 66 """ 67 class HankelTransform(object): 68 def __init__(self,q_calc, SElength): 69 dq = q_calc[1]-q_calc[0] 70 self.H0 = dq / (2 * pi) * q_calc 71 self.H = dq / (2 * pi) * besselj(0, np.outer(q_calc, SElength)) 72 73 def apply(self, Iq_calc): 74 G0 = np.dot(self.H0, Iq_calc) 75 G = np.dot(self.H, Iq_calc) 76 return G - G0 #This is the logarithmic G, not the linear one as found in Andersson2008 77 """ 56 78 57 79 def transform(data, q_calc, Iq_calc, qmono, Iq_mono): … … 208 230 integral = besselj(0, q*SElength_i)*Iq*q 209 231 G[i] = np.sum(integral) 210 G0 = np.sum(Iq*q) #relation to ksi? For generalization to all models232 #G0 = np.sum(Iq*q) #relation to ksi? For generalization to all models 211 233 212 234 # [m^-1] step size in q, needed for integration
Note: See TracChangeset
for help on using the changeset viewer.