Changeset a807206 in sasmodels for sasmodels/models/lamellar_hg.py


Ignore:
Timestamp:
Sep 30, 2016 10:42:06 PM (8 years ago)
Author:
butler
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
Message:

updating more parameter names addressing #649

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lamellar_hg.py

    r40a87fa ra807206  
    2525        \right\rbrace^2 
    2626 
    27 where $\delta_T$ is *tail_length*, $\delta_H$ is *head_length*, 
     27where $\delta_T$ is *length_tail*, $\delta_H$ is *length_head*, 
    2828$\Delta\rho_H$ is the head contrast (*sld_head* $-$ *sld_solvent*), 
    2929and $\Delta\rho_T$ is tail contrast (*sld* $-$ *sld_solvent*). 
     
    6767# pylint: disable=bad-whitespace, line-too-long 
    6868#             ["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"], 
     69parameters = [["length_tail", "Ang",       15,   [0, inf],  "volume",  "Tail thickness ( total = H+T+T+H)"], 
     70              ["length_head", "Ang",       10,   [0, inf],  "volume",  "Head thickness"], 
    7171              ["sld",         "1e-6/Ang^2", 0.4, [-inf,inf], "sld",    "Tail scattering length density"], 
    7272              ["sld_head",    "1e-6/Ang^2", 3.0, [-inf,inf], "sld",    "Head scattering length density"], 
     
    8484    const double drh = sld_head - sld_solvent; 
    8585    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; 
    8787    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); 
    8989    Pq *= Pq; 
    9090    Pq *= 4.0/(qsq); 
     
    9393 
    9494    // normalize by the bilayer thickness 
    95     inten /= 2.0*(head_length+tail_length); 
     95    inten /= 2.0*(length_head+length_tail); 
    9696 
    9797    return inten; 
     
    102102 
    103103demo = dict(scale=1, background=0, 
    104             tail_length=15, head_length=10, 
     104            length_tail=15, length_head=10, 
    105105            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) 
    108108 
    109109# 
    110110tests = [ 
    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, 
    112112      'sld': 0.4, 'sld_head': 3.0, 'sld_solvent': 6.0}, 
    113113     [0.001], [653143.9209]], 
Note: See TracChangeset for help on using the changeset viewer.