Jones vector

[1]:
import nexus as nx
import numpy as np
import matplotlib.pyplot as plt

iron = nx.Material.Template(nx.lib.material.Fe)

layer_Fe = nx.Layer(id = "Fe layer",
                    material = iron,
                    thickness = 3000)

sample1 = nx.Sample(layers = [layer_Fe])

layer_Pt = nx.Layer(id = "Pt layer",
                    material = nx.Material.Template(nx.lib.material.Pt),
                    thickness = 1000)

sample2 = nx.Sample(layers=[layer_Pt])

beam = nx.Beam()
beam.LinearSigma()

exp = nx.Experiment(beam = beam,
                    objects = [sample1, sample2],
                    isotope = nx.lib.moessbauer.Fe57)

jones_vectors = nx.JonesVectors(experiment = exp,
                                energy = 14400)

print(jones_vectors())

# now we add an analyzer
print("\nwith Pi analyzer")

analyzer  = nx.Analyzer()
analyzer.LinearPi()

exp.objects = [sample1, analyzer, sample2]

print(jones_vectors())
[[0.71709362-0.58944207j 0.        +0.j        ]
 [0.66125439+0.40144845j 0.        +0.j        ]]

with Pi analyzer
[[7.17093622e-01-5.89442071e-01j 0.00000000e+00+0.00000000e+00j]
 [2.68867044e-33-2.21005378e-33j 4.39093204e-17-3.60929173e-17j]
 [2.47930684e-33+1.50519060e-33j 4.04901534e-17+2.45816279e-17j]]