Skip to main content
`Ctrl`+`K`

# Activity 2: Setting up the “experiment”

To model a spectroscopy experiment, some parameters need to be correctly defined. In MsSpec, parameters are grouped in different categories (`detector_parameters`, `source_parameters`, `calculation_parameters`…). Each category is an attribute of your calculator object and contains different parameters. For example, to define the angle of the incoming light with respect to the sample normal direction, you will use

    # (assuming your calculator variable is calc)
    # e.g: Incoming X-Ray light is 30° from the sample normal
    calc.source_parameters.theta = 30

## Sb-induced smooth growth of Ag on Ag(111) example

To see how some parameters - not related to the cluster shape - may change the results, we will look at the effect of two parameters:

1. The source direction

2. The inner potential of the sample

The inner potential is material specific. It will add to the photoelectron kinetic energy inside the material. When the photoelectron escapes the sample, this internal potential is missing and this will create an energy step that will act as a refraction for the photoelectron intensity. The effect will be significant for large polar angles and for small kinetic energy of the photoelectron.

Let’s look at the effect of those parameters on the following example. The idea is to use low energy photoelectron diffraction to see the substitution of Ag by Sb atoms on the surface plane.

See also

based on this paper from H. Cruguel et al. Phys. Rev. B 55 R16061

### Building the cluster

Let’s start by building the cluster

     1from ase.build import bulk
     2from ase.visualize import view
     3
     4from msspec.calculator import MSSPEC
     5from msspec.utils import hemispherical_cluster, get_atom_index, cut_plane
     6import numpy as np
     7from matplotlib import pyplot as plt
     8
     9# Create the silver cell
    10Ag = bulk('Ag', cubic=True)
    11# Orientate the cell in the [111] direction
    12Ag.rotate((1,1,1), (0,0,1), rotate_cell=True)
    13# Align the azimuth to match experimental reference
    14Ag.rotate(15, 'z', rotate_cell=True)
    15
    16# Create a cluster
    17cluster = hemispherical_cluster(Ag, diameter=20, emitter_plane=0)
    18cluster = cut_plane(cluster, z=-4.8)
    19cluster.emitter = get_atom_index(cluster, 0,0,0)
    20cluster[cluster.emitter].symbol = 'Sb'

ASE atomic visualization
<scene> <group/> <group> <group> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> </group> <group> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> <shape> <appearance> </appearance> </shape> </group> </group> </scene>

### Compute an azimuthal scan

Now create a calculator and configure experimental parameters

    25
    26# Define parameters
    27calc.source_parameters.theta = 0
    28calc.source_parameters.phi = 0
    29
    30calc.detector_parameters.angular_acceptance = 1
    31calc.detector_parameters.average_sampling = 'low'
    32
    33calc.muffintin_parameters.interstitial_potential = 0
    34

Finally, add those lines to compute the \(\phi\)-scan (in orange) and compare it to the experimental data (in blue).

    34
    35# Compute an azimuthal scan
    36data = calc.get_phi_scan(level='4d', theta=40, phi=np.linspace(0,240,121), kinetic_energy=45)
    37
    38# Normalize data between [0,1] (to ease comparison with experimental data)
    39dset = data[0]
    40dset.cross_section -= dset.cross_section.min()
    41dset.cross_section /= dset.cross_section.max()
    42
    43# Add experimental data points in the dataset
    44x, y = np.loadtxt('data.txt').T
    45dset.add_columns(experiment=y)
    46
    47# Add points to view
    48view = dset.views[0]
    49view.select('phi', 'experiment', legend='Exp. data')
    50
    51# Popup GUI
    52data.view()
    53
    54# Remove temp. files
    55calc.shutdown()

Fig. 4 Azimuthal (\(\phi\)) scan for Sb(4d) emitter in the top layer of Ag(111) at 45 eV kinetic energy.

The agreement is not satisfactory although most of the features may be identified.

Quiz

Try to change the source direction and the inner potential of Ag to better match the experiment…

Note

The cluster is smaller than it should for size convergence, but the calculation would take too much memory for this example

Fig. 5 Azimuthal (\(\phi\)) scan for Sb(4d) emitter in the top layer of Ag(111) at 45 eV kinetic energy, with `muffintin_parameters.interstitial_potential` = 10.2 and `source_parameters.theta` = 22.5

    # Source geometry (the former SA73 beamline of the LURE synchrotron)
    # given in ref 6 of the paper...
    calc.source_parameters.theta = 22.5
    # Inner potential is generally between 10 and 20 eV for most metrials
    calc.muffintin_parameters.inner_potential = 10.2