Skip to content

Instantly share code, notes, and snippets.

@pkienzle
Created July 21, 2011 23:37
Show Gist options
  • Save pkienzle/1098508 to your computer and use it in GitHub Desktop.
Save pkienzle/1098508 to your computer and use it in GitHub Desktop.
volume fraction example for refl1d
from refl1d.names import *
D2O = Material('D2O',natural_density=1)
polymer = SLD('polymer',rho=2.4)
solvated_poly = Mixture.byvolume(D2O,polymer,40)
sample = silicon(0,4) | solvated_poly(100,20) | D2O
T = numpy.linspace(0, 5, 100)
probe = NeutronProbe(T=T, dT=0.01, L=4.75, dL=0.0475)
M = Experiment(sample=sample, probe=probe)
problem = FitProblem(M)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment