Experiment
[1]:
import nexus as nx
import numpy as np
beam = nx.Beam(id="my beam")
analyzer = nx.Analyzer(id="my analyzer")
sample1 = nx.SimpleSample(thickness=3000,
composition = [["Fe", 1]],
density = nx.Var(7.874, min=7, max=7.874, fit=True, id = "sample density"),
id="my sample")
experiment = nx.Experiment(id = "my experiment",
beam = beam,
objects = [sample1, analyzer],
isotope = nx.lib.moessbauer.Fe57)
print(experiment)
Experiment:
.id: my experiment
.beam.id: my beam
.objects:
index: 0, type: Sample, .id: my sample
index: 1, type: Analyzer, .id: my analyzer
[2]:
exp_scattering_factor = experiment.ElectronicAmplitude(energy = 14.4e3)
detuning = np.linspace(-100, 100, 11)
exp_matrix = experiment.Matrix(detunings = detuning,
calc_transitions = True)
print(np.squeeze(exp_matrix))
[[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]
[[0.63871282+0.67381024j 0. +0.j ]
[0. +0.j 0.63871282+0.67381024j]]]