# Changeset 10576d1 in sasmodels

Ignore:
Timestamp:
Feb 16, 2015 6:25:36 PM (9 years ago)
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:
d547f16
Parents:
250fa25
Message:

add hankel function and sesans demo (not yet integrated with models)

Files:
1 edited

Unmodified
Removed
• ## sasmodels/models/spherepy.py

 rb3f6bc3 """ from numpy import pi, inf, sin, cos, sqrt import numpy as np from numpy import pi, inf, sin, cos, sqrt, exp, log name = "sphere" Iqxy.vectorized = True def sesans(z, sld, solvent_sld, radius): """ Calculate SESANS-correlation function for a solid sphere. Wim Bouwman after formulae Timofei Kruglov J.Appl.Cryst. 2003 article """ d = z/radius g = np.zeros_like(z) g[d==0] = 1. low = ((d > 0) & (d < 2)) dlow = d[low] dlow2 = dlow**2 g[low] = sqrt(1-dlow2/4.)*(1+dlow2/8.) + dlow2/2.*(1-dlow2/16.)*log(dlow/(2.+sqrt(4.-dlow2))) return g sesans.vectorized = True def ER(radius): return radius
Note: See TracChangeset for help on using the changeset viewer.