Changes in / [1cdfd47:d712a0f] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r05df1de r3221de0 593 593 # Check whether we have a list of ndarrays [qx,qy] 594 594 qx, qy = qdist 595 return self.calculate_Iq(qx, qy) 595 if not self._model_info.parameters.has_2d: 596 return self.calculate_Iq(np.sqrt(qx ** 2 + qy ** 2)) 597 else: 598 return self.calculate_Iq(qx, qy) 596 599 597 600 elif isinstance(qdist, np.ndarray): … … 674 677 call_details, values, is_magnetic = make_kernel_args(calculator, pairs) 675 678 #call_details.show() 676 #print("================ parameters ==================") 677 #for p, v in zip(parameters.call_parameters, pairs): print(p.name, v[0]) 679 #print("pairs", pairs) 678 680 #for k, p in enumerate(self._model_info.parameters.call_parameters): 679 681 # print(k, p.name, *pairs[k]) … … 869 871 CylinderModel().evalDistribution([0.1, 0.1]) 870 872 871 def magnetic_demo():872 Model = _make_standard_model('sphere')873 model = Model()874 model.setParam('M0:sld', 8)875 q = np.linspace(-0.35, 0.35, 500)876 qx, qy = np.meshgrid(q, q)877 result = model.calculate_Iq(qx.flatten(), qy.flatten())878 result = result.reshape(qx.shape)879 880 import pylab881 pylab.imshow(np.log(result + 0.001))882 pylab.show()883 884 873 if __name__ == "__main__": 885 874 print("cylinder(0.1,0.1)=%g"%test_cylinder()) 886 #magnetic_demo()887 875 #test_product() 888 876 #test_structure_factor()
Note: See TracChangeset
for help on using the changeset viewer.