Incorporation of the Beta Approximation in SasView

August 8, 2018 

Greg Suczewski

Summer Undergraduate Research Fellowship (SURF)

Middlebury College Class of 2020

Paul Kienzle and Yun Liu

National Institute of Standards and Technology (NIST)

NIST Center for Neutron Research (NCNR)

1
What is Small Angle Neutron Scattering?

Gallego, Nidia & Burchell, Timothy & He, Lilin & Kirkham, Melanie & Contescu, Cristian. (2016). 

Neutron Irradiation Effects on the Structure of Highly Oriented Graphite: A XRD and SANS Study. 

Steps:

1. Produce free neutrons (nuclear fission 

with 235U)

2. Select speed of neutrons and direct 

beam towards sample

3. Neutrons diffract through sample

• Interactions are with the nuclei of 

sample

• Scatters neutrons at different 

angles

4. Neutrons are recorded by a detector

2
Elastic (no energy loss): 

kk

ii

kk

ff

kk

ffkk

ii

QQ

QQ=kk

ff

−kk

ii

,

kk

ff

=kk

ii

= k =

2πλλ

=>

QQ=kk

ff

−kk

ii

⋅kk

ff

−kk

ii

2θ

1− cos2θθ=2 sin

2

θθ

kk

ii

kk

ff

: incident wavevector

: scattered wavevector

: scattering vector

QQ

,

=kk

ff

2

+kk

ii

2

−2kk

ii

kkff cos2θθ

=kk2(1− cos2θθ)=

4πλλ sin

θ

3
SasView is a program used worldwide that simulates 

intensity patterns and fits experimental data

http://freesongs.us

4
I(Q) :

The scattering patterns are determined by the properties 

and characteristics of the sample

Liu, Yun. Static scattering techniques (SLS, SAXS, and SANS) – theories and 

applications.

5
Liu, Yun. Static scattering techniques (SLS, SAXS, and SANS) – theories and 

applications.

6

I(Q) :
Cylinder:

Ellipsoid:

S(Q) = 1 S(Q) = Hardsphere

7
Simulating Intensity Patterns

Not Dilute (with structure factor): 

P(Q) = F2(Q) where F(Q) is dependent 

on the shape of the constituents

ex. Sphere: F(Q) = VV∆ρρ 3

sin qqqq − qqqqqqqqqq(qqqq)

qqqq 3

http://mathworld.wolfram.com/Sphere.html

Dilute Case (without structure factor):

ex. Hardsphere, sticky hardsphere, hayterpenfold model 

8

I Q = P Q S(Q)

I Q = P Q
WHAT IF THERE IS POLYDISPERSITY?

Then:

9

I Q = P Q S(Q) I Q = P Q SS(QQ)

I Q = P(Q) I Q = P Q
Existing code

-

- DILUTE samples with POLYDISPERSE 

particle size and orientation 

◦ i.e. 

- DENSE samples with MONODISPERSE 

particle size and orientation

◦ i.e.

Dense colloids

-

-DENSE colloids with POLYDISPERSE 

particle size and shape

How can we study these materials 

more accurately?

scienceabc.com https://en.wikipedia

.org/wiki/Milk

Nymag.com mathworld.wolfram.com adamkempfitness.com

10

I Q = P(Q)

I Q = P Q S(Q)
BETA APPROXIMATION

= F2 1 +

F 2

F2 S Q − 1

= F2 + F 2 S Q − 1

11

I(Q) = P(Q) Seff(Q)

I Q = P(Q)

I Q = P Q S(Q)

I(Q) = P(Q) Seff(Q)

(Not currently implemented in SasView)
12

Graphical User Interface Simulating Engine

•Build mathematical tools

•Introduce additional parameters

• Effective radius

• Beta vs. non-beta

•Easily expandable

•3 computational engines

• GPU

• DLL

• Pure python

•Update individual models

•Crosschecking
Polydisperse Ellipsoid

Q (1/A)

Legend:

Blue -> Beta 

Approx

Orange -> No Beta 

Approx

13

Max Relative 

Difference: 

15%

I(Q) (1/cm) 
14

I(Q) (1/cm) 

Q (1/A)

Legend:

Blue -> Beta 

Approx

Orange -> No Beta 

Approx

Polydisperse Sphere

Max Relative 

Difference: 

23.1%
To see the importance of these differences, we can look at how 

much intensity patterns change as we adjust their parameters.

15

Legend:

Blue -> charge = 10 e

Orange -> charge = 200 e

I(Q) (1/cm) 

Q (1/A)

Max Relative 

Difference: 

20%

Polydisperse Sphere

With Hayter-Penfold 

Model
CHALLENGES

https://www.theodysseyonline.com/30-thoughts-collegestudents-have-while-studying

http://blog.klocwork.com/general-coding/python-coding-tips-1-with-statements/

http://www.circuitbasics.com/how-to-write-and-run-a-cprogram-on-the-raspberry-pi/

https://twitter.com/mariofusco/status/603894311177035776

16

ec.europa.eu
Future work

NUMERICAL INTEGRATION

-improving Legendre-Gaussian 

quadrature

-implementing Romberg integration

ADDING STRUCTURE FACTORS

- local monodisperse approximation

- partial structure factor

-scaling approximation of partial 

structure factor

17
Acknowledgements

• Paul Kienzle

• Yun Liu

• Paul Butler

• Torin Cooper, Steve King, Richard Heenan (ISIS)

• Julie Borchers, Joe Dura, and Brandi Toliver

• NIST/NCNR 

• SURFers

• Center for High Resolution Neutron Scattering

18