Exemplo n.º 1
0
def _summarize(M):
    from periodictable.nsf import neutron_sld, neutron_xs
    sld = neutron_sld(M, wavelength=4.75)
    xs = neutron_xs(M, wavelength=4.75)
    print M, "sld", sld
    print M, "xs", xs, "1/e", 1 / sum(xs)
    #return
    for el in M.atoms.keys():
        print el, "density", el.density
        print el, "sld", el.neutron.sld(wavelength=4.75)
        print el, "xs", "%.15g %.15g %.15g" % el.neutron.xs(wavelength=4.75)
        print el, "1/e", 1. / sum(el.neutron.xs(wavelength=4.75))
Exemplo n.º 2
0
def _summarize(M):
    from periodictable.nsf import neutron_sld, neutron_xs
    sld = neutron_sld(M,wavelength=4.75)
    xs = neutron_xs(M,wavelength=4.75)
    print("%s sld %s"%(M,sld))
    print("%s xs %s 1/e %s"%(M,xs,1/sum(xs)))
    #return
    for el in list(M.atoms.keys()):
        print("%s density %s"%(el,el.density))
        print("%s sld %s"%(el,el.neutron.sld(wavelength=4.75)))
        print("%s xs"%el + " %.15g %.15g %.15g"%el.neutron.xs(wavelength=4.75))
        print("%s 1/e %s"%(el,1./sum(el.neutron.xs(wavelength=4.75))))
Exemplo n.º 3
0
def _summarize(M):
    from periodictable.nsf import neutron_sld, neutron_xs
    sld = neutron_sld(M,wavelength=4.75)
    xs = neutron_xs(M,wavelength=4.75)
    print M,"sld",sld
    print M,"xs",xs,"1/e",1/sum(xs)
    #return
    for el in M.atoms.keys():
        print el,"density",el.density
        print el,"sld",el.neutron.sld(wavelength=4.75)
        print el,"xs","%.15g %.15g %.15g"%el.neutron.xs(wavelength=4.75)
        print el,"1/e",1./sum(el.neutron.xs(wavelength=4.75))
Exemplo n.º 4
0
def _summarize(M):
    from periodictable.nsf import neutron_sld, neutron_xs
    sld = neutron_sld(M, wavelength=4.75)
    xs = neutron_xs(M, wavelength=4.75)
    print("%s sld %s" % (M, sld))
    print("%s xs %s 1/e %s" % (M, xs, 1 / sum(xs)))
    #return
    for el in list(M.atoms.keys()):
        print("%s density %s" % (el, el.density))
        print("%s sld %s" % (el, el.neutron.sld(wavelength=4.75)))
        print("%s xs" % el +
              " %.15g %.15g %.15g" % el.neutron.xs(wavelength=4.75))
        print("%s 1/e %s" % (el, 1. / sum(el.neutron.xs(wavelength=4.75))))