Changeset a807206 in sasmodels for sasmodels/models/lamellar_hg.py
- Timestamp:
- Sep 30, 2016 10:42:06 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- caddb14, 5031ca3
- Parents:
- 2222134
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/lamellar_hg.py
r40a87fa ra807206 25 25 \right\rbrace^2 26 26 27 where $\delta_T$ is * tail_length*, $\delta_H$ is *head_length*,27 where $\delta_T$ is *length_tail*, $\delta_H$ is *length_head*, 28 28 $\Delta\rho_H$ is the head contrast (*sld_head* $-$ *sld_solvent*), 29 29 and $\Delta\rho_T$ is tail contrast (*sld* $-$ *sld_solvent*). … … 67 67 # pylint: disable=bad-whitespace, line-too-long 68 68 # ["name", "units", default, [lower, upper], "type","description"], 69 parameters = [[" tail_length", "Ang", 15, [0, inf], "volume", "Tail thickness ( total = H+T+T+H)"],70 [" head_length", "Ang", 10, [0, inf], "volume", "Head thickness"],69 parameters = [["length_tail", "Ang", 15, [0, inf], "volume", "Tail thickness ( total = H+T+T+H)"], 70 ["length_head", "Ang", 10, [0, inf], "volume", "Head thickness"], 71 71 ["sld", "1e-6/Ang^2", 0.4, [-inf,inf], "sld", "Tail scattering length density"], 72 72 ["sld_head", "1e-6/Ang^2", 3.0, [-inf,inf], "sld", "Head scattering length density"], … … 84 84 const double drh = sld_head - sld_solvent; 85 85 const double drt = sld - sld_solvent; //correction 13FEB06 by L.Porcar 86 const double qT = q* tail_length;86 const double qT = q*length_tail; 87 87 double Pq, inten; 88 Pq = drh*(sin(q*( head_length+tail_length))-sin(qT)) + drt*sin(qT);88 Pq = drh*(sin(q*(length_head+length_tail))-sin(qT)) + drt*sin(qT); 89 89 Pq *= Pq; 90 90 Pq *= 4.0/(qsq); … … 93 93 94 94 // normalize by the bilayer thickness 95 inten /= 2.0*( head_length+tail_length);95 inten /= 2.0*(length_head+length_tail); 96 96 97 97 return inten; … … 102 102 103 103 demo = dict(scale=1, background=0, 104 tail_length=15, head_length=10,104 length_tail=15, length_head=10, 105 105 sld=0.4, sld_head=3.0, sld_solvent=6.0, 106 tail_length_pd=0.2, tail_length_pd_n=40,107 head_length_pd=0.01, head_length_pd_n=40)106 length_tail_pd=0.2, length_tail_pd_n=40, 107 length_head_pd=0.01, length_head_pd_n=40) 108 108 109 109 # 110 110 tests = [ 111 [{'scale': 1.0, 'background': 0.0, ' tail_length': 15.0, 'head_length': 10.0,111 [{'scale': 1.0, 'background': 0.0, 'length_tail': 15.0, 'length_head': 10.0, 112 112 'sld': 0.4, 'sld_head': 3.0, 'sld_solvent': 6.0}, 113 113 [0.001], [653143.9209]],
Note: See TracChangeset
for help on using the changeset viewer.