Simple sample

[1]:
import nexus as nx

site = nx.Hyperfine(magnetic_field = 33,
                    isotropic = True)

sample = nx.SimpleSample(thickness=3000,
                       composition = [["Fe", 1]],
                       density = nx.Var(7.874, min=7, max=7.874, fit=True, id = "sample density"),
                       isotope = nx.lib.moessbauer.Fe57,
                       abundance = 0.02119,
                       lamb_moessbauer = 0.796,
                       hyperfine_sites = [site])

print("\nthickness change")

print(sample.thickness)

sample.thickness = 1000

print(sample.thickness)


print("\ndensity change of the sample material")

sample.density = 7.3

print(sample.material)

print("\nlayer")

print(sample.layer)


print("\nchange hyperfine sites")

print(list(sample.hyperfine_sites))

site2 = nx.Hyperfine(magnetic_field = 20,
                     isotropic = True)

sample.hyperfine_sites = [site,site2]

print("new hyperfine sites")

print(list(sample.hyperfine_sites))

thickness change
Var.value = 3000.0, .min = 0.0, .max = inf, .fit: False, .id:
Var.value = 1000.0, .min = 0.0, .max = inf, .fit: False, .id:

density change of the sample material
Material
  .id:
  .composition:  Fe 1.0
  .density (g/cm^3) Var.value = 7.3, .min = 7.0, .max = 7.874, .fit: True, .id: sample density
  .isotope: 57-Fe
  .abundance Var.value = 0.02119, .min = 0.0, .max = 1.0, .fit: False, .id:
  .lamb_moessbauer Var.value = 0.796, .min = 0.0, .max = 1.0, .fit: False, .id:
    derived parameters:
    .total_number_density (1/m^3) = 7.868823760260314e+28
    .average_mole_mass (g/mole) = 55.868105434026994
    .isotope_number_density (1/m^3) = 1.6674037547991608e+27
    number of hyperfine sites 1


layer
Layer
  .id:
  .material.id:
  .material.composition:  Fe 1.0,
  .material.density (g/cm^3) Var.value = 7.3, .min = 7.0, .max = 7.874, .fit: True, .id: sample density
  .thickness (nm) Var.value = 1000.0, .min = 0.0, .max = inf, .fit: False, .id:
  .roughness (nm, sigma) Var.value = 0.0, .min = 0.0, .max = inf, .fit: False, .id:
  .thickness_fwhm (nm) Var.value = 0.0, .min = 0.0, .max = inf, .fit: False, .id:


change hyperfine sites
[Hyperfine .id:
  .weight =               1.0
  .isomer_shift =         0.0            dist points: 1
  .magnetic_field =       33.0           dist points: 1
  .magnetic_theta =       0.0            dist points: 1
  .magnetic_phi =         0.0            dist points: 1
  .quadrupole =           0.0            dist points: 1
  .quadrupole_alpha =     0.0            dist points: 1
  .quadrupole_beta =      0.0            dist points: 1
  .quadrupole_gamma =     0.0            dist points: 1
  .quadrupole_asymmetry = 0.0            dist points: 1
  .isotropic =            True           3D distribution in mag and efg. Random mag or efg distributions are ignored.
  random magnetic distribution: none     dist points: 1
  random quadrupole distribution: none   dist points: 1
  total number of distribution points: 1
]
new hyperfine sites
[Hyperfine .id:
  .weight =               1.0
  .isomer_shift =         0.0            dist points: 1
  .magnetic_field =       33.0           dist points: 1
  .magnetic_theta =       0.0            dist points: 1
  .magnetic_phi =         0.0            dist points: 1
  .quadrupole =           0.0            dist points: 1
  .quadrupole_alpha =     0.0            dist points: 1
  .quadrupole_beta =      0.0            dist points: 1
  .quadrupole_gamma =     0.0            dist points: 1
  .quadrupole_asymmetry = 0.0            dist points: 1
  .isotropic =            True           3D distribution in mag and efg. Random mag or efg distributions are ignored.
  random magnetic distribution: none     dist points: 1
  random quadrupole distribution: none   dist points: 1
  total number of distribution points: 1
, Hyperfine .id:
  .weight =               1.0
  .isomer_shift =         0.0            dist points: 1
  .magnetic_field =       20.0           dist points: 1
  .magnetic_theta =       0.0            dist points: 1
  .magnetic_phi =         0.0            dist points: 1
  .quadrupole =           0.0            dist points: 1
  .quadrupole_alpha =     0.0            dist points: 1
  .quadrupole_beta =      0.0            dist points: 1
  .quadrupole_gamma =     0.0            dist points: 1
  .quadrupole_asymmetry = 0.0            dist points: 1
  .isotropic =            True           3D distribution in mag and efg. Random mag or efg distributions are ignored.
  random magnetic distribution: none     dist points: 1
  random quadrupole distribution: none   dist points: 1
  total number of distribution points: 1
]