Changeset 3cea5a0 in sasmodels


Ignore:
Timestamp:
Jun 2, 2018 11:23:30 AM (6 years ago)
Author:
GitHub <noreply@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
f796469
Parents:
02490b3 (diff), befe905 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (06/02/18 11:23:30)
git-committer:
GitHub <noreply@…> (06/02/18 11:23:30)
Message:

Merge pull request #69 from rprospero/ticket_1086

Ticket #1086

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/guide/magnetism/magnetism.rst

    r4f5afc9 rbefe905  
    3939 
    4040.. math:: 
    41     -- &= ((1-u_i)(1-u_f))^{1/4} \\ 
    42     -+ &= ((1-u_i)(u_f))^{1/4} \\ 
    43     +- &= ((u_i)(1-u_f))^{1/4} \\ 
    44     ++ &= ((u_i)(u_f))^{1/4} 
     41    -- &= (1-u_i)(1-u_f) \\ 
     42    -+ &= (1-u_i)(u_f) \\ 
     43    +- &= (u_i)(1-u_f) \\ 
     44    ++ &= (u_i)(u_f) 
    4545 
    4646Ideally the experiment would measure the pure spin states independently and 
     
    104104| 2015-05-02 Steve King 
    105105| 2017-11-15 Paul Kienzle 
     106| 2018-06-02 Adam Washington 
  • sasmodels/kernel_iq.c

    rdc6f601 r7c35fda  
    8383  in_spin = clip(in_spin, 0.0, 1.0); 
    8484  out_spin = clip(out_spin, 0.0, 1.0); 
    85   // Note: sasview 3.1 scaled all slds by sqrt(weight) and assumed that 
     85  // Previous version of this function took the square root of the weights, 
     86  // under the assumption that  
     87  // 
    8688  //     w*I(q, rho1, rho2, ...) = I(q, sqrt(w)*rho1, sqrt(w)*rho2, ...) 
    87   // which is likely to be the case for simple models. 
    88   weight[0] = sqrt((1.0-in_spin) * (1.0-out_spin)); // dd 
    89   weight[1] = sqrt((1.0-in_spin) * out_spin);       // du.real 
    90   weight[2] = sqrt(in_spin * (1.0-out_spin));       // ud.real 
    91   weight[3] = sqrt(in_spin * out_spin);             // uu 
     89  // 
     90  // However, since the weights are applied to the final intensity and 
     91  // are not interned inside the I(q) function, we want the full 
     92  // weight and not the square root.  Any function using 
     93  // set_spin_weights as part of calculating an amplitude will need to 
     94  // manually take that square root, but there is currently no such 
     95  // function. 
     96  weight[0] = (1.0-in_spin) * (1.0-out_spin); // dd 
     97  weight[1] = (1.0-in_spin) * out_spin;       // du 
     98  weight[2] = in_spin * (1.0-out_spin);       // ud 
     99  weight[3] = in_spin * out_spin;             // uu 
    92100  weight[4] = weight[1]; // du.imag 
    93101  weight[5] = weight[2]; // ud.imag 
  • sasmodels/models/mass_surface_fractal.py

    r2d81cfe r7994359  
    3939    The surface ( $D_s$ ) and mass ( $D_m$ ) fractal dimensions are only 
    4040    valid if $0 < surface\_dim < 6$ , $0 < mass\_dim < 6$ , and 
    41     $(surface\_dim + mass\_dim ) < 6$ . 
    42  
     41    $(surface\_dim + mass\_dim ) < 6$ .  
     42    Older versions of sasview may have the default primary particle radius 
     43    larger than the cluster radius, this was an error, also present in the  
     44    Schmidt review paper below. The primary particle should be the smaller  
     45    as described in the original Hurd et.al. who also point out that  
     46    polydispersity in the primary particle sizes may affect their  
     47    apparent surface fractal dimension. 
     48     
    4349 
    4450References 
    4551---------- 
    4652 
    47 P Schmidt, *J Appl. Cryst.*, 24 (1991) 414-435 Equation(19) 
     53.. [#] P Schmidt, *J Appl. Cryst.*, 24 (1991) 414-435 Equation(19) 
     54.. [#] A J Hurd, D W Schaefer, J E Martin, *Phys. Rev. A*, 
     55   35 (1987) 2361-2364 Equation(2) 
    4856 
    49 A J Hurd, D W Schaefer, J E Martin, *Phys. Rev. A*, 
    50 35 (1987) 2361-2364 Equation(2) 
     57Authorship and Verification 
     58---------------------------- 
     59 
     60* **Converted to sasmodels by:** Piotr Rozyczko **Date:** Jan 20, 2016 
     61* **Last Reviewed by:** Richard Heenan **Date:** May 30, 2018 
    5162""" 
    5263 
     
    6778        rg_primary    =  rg 
    6879        background   =  background 
    69         Ref: Schmidt, J Appl Cryst, eq(19), (1991), 24, 414-435 
    7080        Hurd, Schaefer, Martin, Phys Rev A, eq(2),(1987),35, 2361-2364 
    7181        Note that 0 < Ds< 6 and 0 < Dm < 6. 
     
    7888    ["fractal_dim_mass", "",      1.8, [0.0, 6.0], "", "Mass fractal dimension"], 
    7989    ["fractal_dim_surf", "",      2.3, [0.0, 6.0], "", "Surface fractal dimension"], 
    80     ["rg_cluster",       "Ang",  86.7, [0.0, inf], "", "Cluster radius of gyration"], 
    81     ["rg_primary",       "Ang", 4000., [0.0, inf], "", "Primary particle radius of gyration"], 
     90    ["rg_cluster",       "Ang", 4000., [0.0, inf], "", "Cluster radius of gyration"], 
     91    ["rg_primary",       "Ang",  86.7, [0.0, inf], "", "Primary particle radius of gyration"], 
    8292] 
    8393# pylint: enable=bad-whitespace, line-too-long 
     
    107117            fractal_dim_mass=1.8, 
    108118            fractal_dim_surf=2.3, 
    109             rg_cluster=86.7, 
    110             rg_primary=4000.0) 
     119            rg_cluster=4000.0, 
     120            rg_primary=86.7) 
    111121 
    112122tests = [ 
    113123 
    114     # Accuracy tests based on content in test/utest_other_models.py 
    115     [{'fractal_dim_mass':      1.8, 
     124    # Accuracy tests based on content in test/utest_other_models.py  All except first, changed so rg_cluster is the larger, RKH 30 May 2018 
     125    [{'fractal_dim_mass':   1.8, 
    116126      'fractal_dim_surf':   2.3, 
    117127      'rg_cluster':   86.7, 
     
    123133    [{'fractal_dim_mass':      3.3, 
    124134      'fractal_dim_surf':   1.0, 
    125       'rg_cluster':   90.0, 
    126       'rg_primary': 4000.0, 
    127      }, 0.001, 0.18562699016], 
     135      'rg_cluster': 4000.0, 
     136      'rg_primary':   90.0, 
     137     }, 0.001, 0.0932516614456], 
    128138 
    129139    [{'fractal_dim_mass':      1.3, 
    130       'fractal_dim_surf':   1.0, 
    131       'rg_cluster':   90.0, 
    132       'rg_primary': 2000.0, 
     140      'fractal_dim_surf':   2.0, 
     141      'rg_cluster': 2000.0, 
     142      'rg_primary':   90.0, 
    133143      'background':    0.8, 
    134      }, 0.001, 1.16539753641], 
     144     }, 0.001, 1.28296431786], 
    135145 
    136146    [{'fractal_dim_mass':      2.3, 
    137       'fractal_dim_surf':   1.0, 
    138       'rg_cluster':   90.0, 
    139       'rg_primary': 1000.0, 
     147      'fractal_dim_surf':   3.1, 
     148      'rg_cluster':  1000.0, 
     149      'rg_primary':  30.0, 
    140150      'scale':        10.0, 
    141151      'background':    0.0, 
    142      }, 0.051, 0.000169548800377], 
     152     }, 0.051, 0.00333804044899], 
    143153    ] 
Note: See TracChangeset for help on using the changeset viewer.