Changeset d277229 in sasmodels for sasmodels/models/mono_gauss_coil.py


Ignore:
Timestamp:
Sep 7, 2018 3:29:38 AM (6 years ago)
Author:
grethevj
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3c60146
Parents:
2a12351b
Message:

Models updated to include choices for effective interaction radii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/mono_gauss_coil.py

    r2d81cfe rd277229  
    5454 
    5555import numpy as np 
    56 from numpy import inf, exp, errstate 
     56from numpy import inf 
    5757 
    5858name = "mono_gauss_coil" 
     
    6969parameters = [ 
    7070    ["i_zero", "1/cm", 70.0, [0.0, inf], "", "Intensity at q=0"], 
    71     ["rg", "Ang", 75.0, [0.0, inf], "", "Radius of gyration"], 
     71    ["rg", "Ang", 75.0, [0.0, inf], "volume", "Radius of gyration"], 
    7272    ] 
     73 
     74source = ["mono_gauss_coil.c"] 
     75have_Fq = False 
     76effective_radius_type = ["R_g","2R_g","3R_g","(5/3)^0.5*R_g"] 
     77 
     78 
    7379# pylint: enable=bad-whitespace, line-too-long 
    7480 
    75 # NB: Scale and Background are implicit parameters on every model 
    76 def Iq(q, i_zero, rg): 
    77     # pylint: disable = missing-docstring 
    78     z = (q * rg)**2 
    79  
    80     with errstate(invalid='ignore'): 
    81         inten = (i_zero * 2.0) * (exp(-z) + z - 1.0)/z**2 
    82         inten[q == 0] = i_zero 
    83     return inten 
    84 Iq.vectorized = True # Iq accepts an array of q values 
     81## NB: Scale and Background are implicit parameters on every model 
     82#def Iq(q, i_zero, rg): 
     83#    # pylint: disable = missing-docstring 
     84#    z = (q * rg)**2 
     85# 
     86#    with errstate(invalid='ignore'): 
     87#        inten = (i_zero * 2.0) * (exp(-z) + z - 1.0)/z**2 
     88#        inten[q == 0] = i_zero 
     89#    return inten 
     90#Iq.vectorized = True # Iq accepts an array of q values 
    8591 
    8692def random(): 
Note: See TracChangeset for help on using the changeset viewer.