Changeset 6cf1cb3 in sasmodels


Ignore:
Timestamp:
Nov 17, 2015 2:57:11 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
48be770
Parents:
143d596
Message:

hollow cylinder: scale SLD by 1e-6, mark volume and orientation parameters, scale by volume

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_cylinder.c

    r84e6942 r6cf1cb3  
    44double form_volume(double radius, double core_radius, double length); 
    55double Iq(double q, double radius, double core_radius, double length, double sld, 
    6         double solvent_sld, double axis_theta, double axis_phi); 
     6        double solvent_sld); 
    77double Iqxy(double qx, double qy, double radius, double core_radius, double length, double sld, 
    8         double solvent_sld, double axis_theta, double axis_phi); 
     8        double solvent_sld, double theta, double phi); 
    99 
    1010// From Igor library 
     
    4848} 
    4949 
    50 //FIXME: Returning values 10^12 times too high 
    5150double Iq(double q, double radius, double core_radius, double length, double sld, 
    52         double solvent_sld, double axis_theta, double axis_phi) 
     51        double solvent_sld) 
    5352{ 
    5453    int i; 
     
    7473        //normalize by volume 
    7574        volume = form_volume(radius, core_radius, length); 
    76         //convert to [cm-1] 
    77         convert = 1.0e8; 
    78         answer = norm*scale*volume*convert; 
     75        //convert to [cm-1] given sld*1e6 
     76        convert = 1.0e-4; 
     77        answer = norm*scale*convert*volume*volume; 
    7978         
    8079        return(answer); 
     
    8382//TODO: Add this in 
    8483double Iqxy(double qx, double qy, double radius, double core_radius, double length, double sld, 
    85         double solvent_sld, double axis_theta, double axis_phi) 
     84        double solvent_sld, double theta, double phi) 
    8685{ 
    8786    return(0.0); 
  • sasmodels/models/hollow_cylinder.py

    r84e6942 r6cf1cb3  
    7878#             ["name", "units", default, [lower, upper], "type","description"], 
    7979parameters = [ 
    80               ["radius", "Ang", 30.0, [0, inf], "", "Cylinder radius"], 
    81               ["core_radius", "Ang", 20.0, [0, inf], "", "Hollow core radius"], 
    82               ["length", "Ang", 400.0, [0, inf], "", "Cylinder length"], 
     80              ["radius", "Ang", 30.0, [0, inf], "volume", "Cylinder radius"], 
     81              ["core_radius", "Ang", 20.0, [0, inf], "volume", "Hollow core radius"], 
     82              ["length", "Ang", 400.0, [0, inf], "volume", "Cylinder length"], 
    8383              ["sld", "1/Ang^2", 6.3, [-inf, inf], "", "Cylinder sld"], 
    8484              ["solvent_sld", "1/Ang^2", 1, [-inf, inf], "", "Solvent sld"], 
    85               ["axis_theta", "[deg]", 90, [-360, 360], "", "Theta angle"], 
    86               ["axis_phi", "[deg]", 0, [-360, 360], "", "Phi angle"], 
     85              ["theta", "[deg]", 90, [-360, 360], "orientation", "Theta angle"], 
     86              ["phi", "[deg]", 0, [-360, 360], "orientation", "Phi angle"], 
    8787              ] 
    8888 
     
    9191# parameters for demo 
    9292demo = dict(scale=1.0,background=0.0,length=400.0,radius=30.0,core_radius=20.0, 
    93             sld=6.3,solvent_sld=1,axis_theta=90,axis_phi=0) 
     93            sld=6.3,solvent_sld=1,theta=90,phi=0, 
     94            radius_pd=.2, radius_pd_n=9, 
     95            length_pd=.2, length_pd_n=10, 
     96            theta_pd=10, theta_pd_n=5, 
     97            ) 
    9498 
    9599# For testing against the old sasview models, include the converted parameter 
     
    98102oldpars = dict(scale='scale',background='background',radius='radius', 
    99103               core_radius='core_radius',sld='sldCyl',length='length', 
    100                solvent_sld='sldSolv',axis_phi='axis_phi',axis_theta='axis_theta') 
     104               solvent_sld='sldSolv',phi='axis_phi',theta='axis_theta') 
Note: See TracChangeset for help on using the changeset viewer.