예제 #1
0
    energy = 8000.0
    print("============ SHADOW / XRAYLIB  ==============")
    print("Photon energy: %g eV " % (energy))
    print("d_spacing: %g %g A " % (a.dSpacing(), b.dSpacing()))
    print("unitCellVolumw: %g %g A**3 " %
          (a.unitcellVolume(), b.unitcellVolume()))
    print("Bragg angle: %g %g deg " % (a.angleBragg(energy) * 180 / numpy.pi,
                                       b.angleBragg(energy) * 180 / numpy.pi))
    print("Asymmetry factor b: ", a.asymmetryFactor(energy),
          b.asymmetryFactor(energy))

    print("F0 ", a.F0(energy), b.F0(energy))
    print("FH ", a.FH(energy), b.FH(energy))
    print("FH_BAR ", a.FH_bar(energy), b.FH_bar(energy))

    print("PSI0 ", a.psi0(energy), b.psi0(energy))
    print("PSIH ", a.psiH(energy), b.psiH(energy))
    print("PSIH_bar ", a.psiH_bar(energy), b.psiH_bar(energy))

    print("DarwinHalfWidths:  ", a.darwinHalfwidth(energy),
          b.darwinHalfwidth(energy))

    print("\n\n====================== Warning =========================")
    print(
        "Please note a small difference in FH ratio (preprocessor/xraylib): ",
        a.FH(energy).real / b.FH(energy).real)
    print("which corresponds to a difference in f0: ")
    print(
        "shadow preprocessor file uses f0_xop() for the coefficients and this is different"
    )
    print("than xraylib.FF_Rayl() by a factor: ")
예제 #2
0
                           dabax=dx)

a3 = DiffractionSetupShadowPreprocessor(geometry_type=BraggDiffraction,
                                        crystal_name="Si",
                                        thickness=1e-5,
                                        miller_h=1,
                                        miller_k=1,
                                        miller_l=1,
                                        asymmetry_angle=0.0,
                                        azimuthal_angle=0.0,
                                        preprocessor_file="bragg.dat")

energy = 8000.0
print("Photon energy: %g deg " % (energy))
print("d_spacing: %g %g %g A " % (a.dSpacing(), a2.dSpacing(), a3.dSpacing()))
print("unitCellVolumw: %g %g %g A**3 " %
      (a.unitcellVolume(), a2.unitcellVolume(), a3.unitcellVolume()))
print("Bragg angle: %g %g %g deg " %
      (a.angleBragg(energy) * 180 / numpy.pi, a2.angleBragg(energy) * 180 /
       numpy.pi, a3.angleBragg(energy) * 180 / numpy.pi))
print("Asymmerey factor b: ", a.asymmetry_factor(energy),
      a2.asymmetry_factor(energy), a3.asymmetry_factor(energy))

print("F0 ", a.F0(energy), a2.F0(energy), a3.F0(energy))
print("FH ", a.FH(energy), a2.FH(energy), a3.FH(energy))
print("FH_BAR ", a.FH_bar(energy), a2.FH_bar(energy), a3.FH_bar(energy))

print("PSI0 ", a.psi0(energy), a2.psi0(energy), a3.psi0(energy))
print("PSIH ", a.psiH(energy), a2.psiH(energy), a3.psiH(energy))
print("PSIH_bar ", a.psiH_bar(energy), a2.psiH_bar(energy),
      a3.psiH_bar(energy))