Changeset 18a2bfc in sasmodels for sasmodels/models/flexible_cylinder.py


Ignore:
Timestamp:
Oct 4, 2017 4:25:40 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
ced5bd2
Parents:
a8631ca
Message:

flexible_cylinder: add details about testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/flexible_cylinder.py

    ra8631ca r18a2bfc  
    101101    # Accuracy tests based on content in test/utest_other_models.py 
    102102    # Currently fails in OCL 
    103     # [{'length':     1000.0, 
     103    # [{'length':     1000.0,  # test T1 
    104104    #  'kuhn_length': 100.0, 
    105105    #  'radius':       20.0, 
     
    110110 
    111111    # Additional tests with larger range of parameters 
    112     [{'length':    1000.0, 
     112    [{'length':    1000.0,  # test T2 
    113113      'kuhn_length': 100.0, 
    114114      'radius':       20.0, 
     
    117117      'background':    0.0001, 
    118118     }, 1.0, 0.000595345], 
    119     [{'length':        10.0, 
     119    [{'length':        10.0,  # test T3 
    120120      'kuhn_length': 800.0, 
    121121      'radius':        2.0, 
     
    124124      'background':    0.001, 
    125125     }, 0.1, 1.55228], 
    126     [{'length':        100.0, 
     126    [{'length':        100.0,  # test T4 
    127127      'kuhn_length': 800.0, 
    128128      'radius':       50.0, 
     
    132132     }, 1.0, 0.000938456] 
    133133    ] 
     134 
     135# There are a few branches in the code that ought to have test values: 
     136# 
     137# For length > 4 * kuhn_length 
     138#        if length > 10 * kuhn_length then C is scaled by 3.06 (L/b)^(-0.44) 
     139#        q*kuhn_length <= 3.1  => Sexv_new 
     140#           dS/dQ < 0 has different behaviour from dS/dQ >= 0 
     141#  T2    q*kuhn_length > 3.1   => a_long 
     142# 
     143# For length <= 4 * kuhn_length 
     144#        q*kuhn_length <= max(1.9/Rg_short, 3.0)  => Sdebye((q*Rg)^2) 
     145#           q*Rg < 0.5 uses Pade approx, q*Rg > 1.0 uses math lib 
     146#  T3,T4 q*kuhn_length > max(1.9/Rg_short, 3.0)   => a_short 
     147# 
     148# Note that the transitions between branches may be abrupt.  You can see a 
     149# several percent change around length=10*kuhn_length and length=4*kuhn_length 
     150# using the following: 
     151# 
     152#    sascomp flexible_cylinder -calc=double -sets=10 length=10*kuhn_length,10.000001*kuhn_length 
     153#    sascomp flexible_cylinder -calc=double -sets=10 length=4*kuhn_length,4.000001*kuhn_length 
     154# 
     155# The transition between low q and high q around q*kuhn_length = 3 seems 
     156# to be good to 4 digits or better.  This was tested by computing the value 
     157# on each branches near the transition point and reporting the relative error 
     158# for kuhn lengths of 10, 100 and 1000 and a variety of length:kuhn_length 
     159# ratios. 
Note: See TracChangeset for help on using the changeset viewer.