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.71751273-0.58897687j 0.        +0.j        ]
 [0.66100408+0.40190631j 0.        +0.j        ]]

with Pi analyzer
[[0.71751273-0.58897687j 0.        +0.j        ]
 [0.        +0.j         0.        +0.j        ]
 [0.        +0.j         0.        +0.j        ]]