Changeset 05df1de in sasmodels
- Timestamp:
- Apr 4, 2018 6:09:07 PM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- a21d889, c11d09f
- Parents:
- 29afc50
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r3221de0 r05df1de 593 593 # Check whether we have a list of ndarrays [qx,qy] 594 594 qx, qy = qdist 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) 595 return self.calculate_Iq(qx, qy) 599 596 600 597 elif isinstance(qdist, np.ndarray): … … 677 674 call_details, values, is_magnetic = make_kernel_args(calculator, pairs) 678 675 #call_details.show() 679 #print("pairs", pairs) 676 #print("================ parameters ==================") 677 #for p, v in zip(parameters.call_parameters, pairs): print(p.name, v[0]) 680 678 #for k, p in enumerate(self._model_info.parameters.call_parameters): 681 679 # print(k, p.name, *pairs[k]) … … 871 869 CylinderModel().evalDistribution([0.1, 0.1]) 872 870 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 pylab 881 pylab.imshow(np.log(result + 0.001)) 882 pylab.show() 883 873 884 if __name__ == "__main__": 874 885 print("cylinder(0.1,0.1)=%g"%test_cylinder()) 886 #magnetic_demo() 875 887 #test_product() 876 888 #test_structure_factor()
Note: See TracChangeset
for help on using the changeset viewer.