Changeset a8631ca in sasmodels


Ignore:
Timestamp:
Oct 4, 2017 12:51:37 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:
18a2bfc
Parents:
5772737
Message:

flexible_cylinder: make sure all branches are tested

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/flexible_cylinder.py

    r237c9cf ra8631ca  
    9090    length = 10**np.random.uniform(2, 6) 
    9191    radius = 10**np.random.uniform(1, 3) 
    92     kuhn_length = 10**np.random.uniform(-2, -0.7)*length  # at least 10 segments 
     92    kuhn_length = 10**np.random.uniform(-2, 0)*length 
    9393    pars = dict( 
    9494        length=length, 
  • sasmodels/models/lib/wrc_cyl.c

    r5772737 ra8631ca  
    5454 
    5555static double 
    56 a_long(double qp, double L, double b/*, double p1, double p2, double q0*/) 
     56a_long(double q, double L, double b/*, double p1, double p2, double q0*/) 
    5757{ 
    5858    const double p1 = 4.12; 
     
    6969 
    7070    const double C = (L/b>10.0 ? 3.06*pow(L/b, -0.44) : 1.0); 
     71    //printf("branch B-%d q=%g L=%g b=%g\n", C==1.0, q, L, b); 
    7172    const double r2 = Rgsquare(L,b); 
    7273    const double r = sqrt(r2); 
     
    9798    const double a2 = t1*pow(q0,-p1)*(t12 + b*p1/q0*t13); 
    9899 
    99     const double ans = a1*pow(qp*b, -p1) + a2*pow(qp*b, -p2) + M_PI/(qp*L); 
     100    const double ans = a1*pow(q*b, -p1) + a2*pow(q*b, -p2) + M_PI/(q*L); 
    100101    return ans; 
    101102} 
     
    173174 
    174175    if (qdel < 0) { 
     176        //printf("branch A1-%d q=%g L=%g b=%g\n", C==1.0, q, L, b); 
    175177        return t9 + Sexv_orig; 
    176178    } else { 
     179        //printf("branch A2-%d q=%g L=%g b=%g\n", C==1.0, q, L, b); 
    177180        const double w = w_WR(qr); 
    178181        const double t10 = Sdebye(qr*qr)*(1.0 - w); 
     
    198201        if (q*b <= q0short) { // q*b <= fmax(1.9/Rg_short, 3) 
    199202            // 2017-10-01 pkienzle: moved low q approximation into Sdebye() 
     203            //printf("branch C-%d q=%g L=%g b=%g\n", square(q*Rg_short)<DEBYE_CUTOFF, q, L, b); 
    200204            ans = Sdebye(square(q*Rg_short)); 
    201205        } else {  // q*b > max(1.9/Rg_short, 3) 
     206            //printf("branch D q=%g L=%g b=%g\n", q, L, b); 
    202207            ans = a_short(q, L, b /*, p1short, p2short*/, q0short); 
    203208        } 
Note: See TracChangeset for help on using the changeset viewer.