Changeset d277229 in sasmodels for sasmodels/models/mono_gauss_coil.py
- Timestamp:
- Sep 7, 2018 3:29:38 AM (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:
- 3c60146
- Parents:
- 2a12351b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/mono_gauss_coil.py
r2d81cfe rd277229 54 54 55 55 import numpy as np 56 from numpy import inf , exp, errstate56 from numpy import inf 57 57 58 58 name = "mono_gauss_coil" … … 69 69 parameters = [ 70 70 ["i_zero", "1/cm", 70.0, [0.0, inf], "", "Intensity at q=0"], 71 ["rg", "Ang", 75.0, [0.0, inf], " ", "Radius of gyration"],71 ["rg", "Ang", 75.0, [0.0, inf], "volume", "Radius of gyration"], 72 72 ] 73 74 source = ["mono_gauss_coil.c"] 75 have_Fq = False 76 effective_radius_type = ["R_g","2R_g","3R_g","(5/3)^0.5*R_g"] 77 78 73 79 # pylint: enable=bad-whitespace, line-too-long 74 80 75 # NB: Scale and Background are implicit parameters on every model76 def Iq(q, i_zero, rg):77 # pylint: disable = missing-docstring78 z = (q * rg)**279 80 with errstate(invalid='ignore'):81 inten = (i_zero * 2.0) * (exp(-z) + z - 1.0)/z**282 inten[q == 0] = i_zero83 return inten84 Iq.vectorized = True # Iq accepts an array of q values81 ## NB: Scale and Background are implicit parameters on every model 82 #def Iq(q, i_zero, rg): 83 # # pylint: disable = missing-docstring 84 # z = (q * rg)**2 85 # 86 # with errstate(invalid='ignore'): 87 # inten = (i_zero * 2.0) * (exp(-z) + z - 1.0)/z**2 88 # inten[q == 0] = i_zero 89 # return inten 90 #Iq.vectorized = True # Iq accepts an array of q values 85 91 86 92 def random():
Note: See TracChangeset
for help on using the changeset viewer.