erlab.io.exampledata¶
Generates simple simulated ARPES data for testing and demonstration.
Functions
|
Generate simulated data for a given shape in momentum space. |
|
Generate simulated data for a given shape in angle space. |
|
Generate simulated topological surface-state ARPES data in angle space. |
|
Generate a curved Fermi edge with a linear density of states. |
|
Generate simulated hv-dependent cuts. |
|
Simulate an ARPES mesh pattern using step edges broadened by Gaussians. |
- erlab.io.exampledata.generate_data(shape=(250, 250, 300), *, krange=0.89, Erange=(-0.45, 0.09), temp=20.0, a=6.97, t=0.43, bandshift=0.0, Sreal=0.0, Simag=0.03, kres=0.01, Eres=2.0e-3, noise=True, seed=None, count=100000000, ccd_sigma=0.6, const_bkg=1e-3)[source]¶
Generate simulated data for a given shape in momentum space.
Generates simulated ARPES data based on a simple graphene-like tight-binding model.
- Parameters:
shape (
tuple[int,int,int], default:(250, 250, 300)) – The shape of the generated data, by default (250, 250, 300)krange (
float|tuple[float,float] |dict[str,tuple[float,float]], default:0.89) – Momentum range in inverse angstroms. Can be a single float, a tuple of floats representing the range, or a dictionary withkxandkykeys mapping to tuples representing the range for each dimension, by default 0.89Erange (
tuple[float,float], default:(-0.45, 0.09)) – Binding energy range in electronvolts, by default (-0.45, 0.09)temp (
float, default:20.0) – The temperature in Kelvins for the Fermi-Dirac cutoff. If 0, no cutoff is applied, by default 20.0a (
float, default:6.97) – Tight binding parameter \(a\), by default 6.97t (
float, default:0.43) – Tight binding parameter \(t\), by default 0.43bandshift (
float, default:0.0) – The rigid energy shift in eV, by default 0.0Sreal (
float, default:0.0) – The real part of the self energy, by default 0.0Simag (
float, default:0.03) – The imaginary part of the self energy, by default 0.03kres (
float, default:0.01) – Broadening in momentum in inverse angstroms, by default 0.01Eres (
float, default:2.0e-3) – Broadening in energy in electronvolts, by default 2.0e-3noise (
bool, default:True) – Whether to add noise to the generated data, by defaultTrueseed (
int|None, default:None) – Seed for the random number generator for the noise. Default is None.count (
int, default:100000000) – Determines the signal-to-noise ratio whennoiseisTrue, by default 1e+8ccd_sigma (
float, default:0.6) – The sigma value for CCD noise generation whennoiseisTrue, by default 0.6const_bkg (
float, default:1e-3) – Constant background as a fraction of the count, by default 1e-3
- Returns:
xarray.DataArray– The generated data with coordinates for kx, ky, and eV.- Return type:
- erlab.io.exampledata.generate_data_angles(shape=(500, 60, 500), *, angrange=15.0, Erange=(-0.45, 0.12), hv=50.0, configuration=erlab.constants.AxesConfiguration.Type1, temp=20.0, a=6.97, t=0.43, bandshift=0.0, Sreal=0.0, Simag=0.03, angres=0.1, Eres=10.0e-3, noise=True, seed=None, count=100000000, ccd_sigma=0.6, const_bkg=1e-3, assign_attributes=False, extended=True, polarization=(0.0, 0.0, 1.0), inner_potential=10.0)[source]¶
Generate simulated data for a given shape in angle space.
- Parameters:
shape (
tuple[int,int,int], default:(500, 60, 500)) – The shape of the generated data, by default (250, 250, 300)angrange (
float|tuple[float,float] |dict[str,tuple[float,float]], default:15.0) – Angle range in degrees. Can be a single float, a tuple of floats representing the range, or a dictionary withalphaandbetakeys mapping to tuples representing the range for each dimension, by default 15.0Erange (
tuple[float,float], default:(-0.45, 0.12)) – Binding energy range in electronvolts, by default (-0.45, 0.12)hv (
float, default:50.0) – The photon energy in eV. Note that the sample work function is assumed to be 4.5 eV, by default 30.0configuration (
AxesConfiguration|int, default:erlab.constants.AxesConfiguration.Type1) – The experimental configuration, by default Type1DAtemp (
float, default:20.0) – The temperature in Kelvins for the Fermi-Dirac cutoff. If 0, no cutoff is applied, by default 20.0a (
float, default:6.97) – Tight binding parameter \(a\), by default 6.97t (
float, default:0.43) – Tight binding parameter \(t\), by default 0.43bandshift (
float, default:0.0) – The rigid energy shift in eV, by default 0.0Sreal (
float, default:0.0) – The real part of the self energy, by default 0.0Simag (
float, default:0.03) – The imaginary part of the self energy, by default 0.03angres (
float, default:0.1) – Broadening in angle in degrees, by default 0.01Eres (
float, default:10.0e-3) – Broadening in energy in electronvolts, by default 2.0e-3noise (
bool, default:True) – Whether to add noise to the generated data, by defaultTrueseed (
int|None, default:None) – Seed for the random number generator for the noise. Default is None.count (
int, default:100000000) – Determines the signal-to-noise ratio whennoiseisTrue, by default 1e+8ccd_sigma (
float, default:0.6) – The sigma value for CCD noise generation whennoiseisTrue, by default 0.6const_bkg (
float, default:1e-3) – Constant background as a fraction of the count, by default 1e-3assign_attributes (
bool, default:False) – Whether to assign attributes to the generated data, by defaultFalseextended (
bool, default:True) – Whether to include additional effects such as kz modulation and polarization, by defaultTruepolarization (
Sequence[float], default:(0.0, 0.0, 1.0)) – Photon polarization vector, by default (0.0, 0.0, 1.0). Only used ifextendedisTrueinner_potential (
float, default:10.0) – Inner potential in eV, by default 10.0. Only used ifextendedisTrue.
- Returns:
xarray.DataArray– The generated data with coordinates for alpha, beta, and eV.- Return type:
- erlab.io.exampledata.generate_data_dirac(shape=(500, 60, 500), *, angrange=15.0, Erange=(-0.45, 0.12), hv=50.0, configuration=erlab.constants.AxesConfiguration.Type1, temp=20.0, dirac_velocity=0.3, curvature=0.0, gap=0.0, bandshift=0.0, Sreal=0.0, Simag=0.03, alpha_coeff=1.0, beta_coeff=0.6, branch='both', spin='integrated', angres=0.1, Eres=10.0e-3, noise=True, seed=None, count=100000000, ccd_sigma=0.6, const_bkg=1e-3, assign_attributes=False, extended=True, polarization=(0.0, 0.0, 1.0), inner_potential=10.0)[source]¶
Generate simulated topological surface-state ARPES data in angle space.
The surface-state dispersion follows a minimal Dirac/Rashba Hamiltonian with an optional quadratic curvature and mass gap. The matrix-element texture follows the spin-integrated and spin-filtered angular factors discussed by Moser for spin-orbit-coupled surface states.
Added in version 3.21.0.
- Parameters:
shape (
tuple[int,int,int], default:(500, 60, 500)) – The shape of the generated data as(alpha, beta, eV).angrange (
float|tuple[float,float] |dict[str,tuple[float,float]], default:15.0) – Angle range in degrees. Can be a single float, a tuple of floats representing the range, or a dictionary withalphaandbetakeys mapping to tuples representing the range for each dimension, by default 15.0.Erange (
tuple[float,float], default:(-0.45, 0.12)) – Binding energy range in electronvolts, by default (-0.45, 0.12).hv (
float, default:50.0) – The photon energy in eV. The sample work function is assumed to be 4.5 eV.configuration (
AxesConfiguration|int, default:erlab.constants.AxesConfiguration.Type1) – The experimental configuration, by defaultType1.temp (
float, default:20.0) – The temperature in kelvins for the Fermi-Dirac cutoff. If 0, no cutoff is applied.dirac_velocity (
float, default:0.3) – Linear Dirac or Rashba coefficient in eV A.curvature (
float, default:0.0) – Quadratic curvature coefficient in eV A^2.gap (
float, default:0.0) – Dirac mass term in eV. The full gap at the Dirac point is2 * gap.bandshift (
float, default:0.0) – The rigid energy shift in eV.Sreal (
float, default:0.0) – The real part of the self energy.Simag (
float, default:0.03) – The imaginary part of the self energy.alpha_coeff (
float, default:1.0) – Weight of the out-of-planespzorbital contribution in the matrix element.beta_coeff (
float, default:0.6) – Weight of the in-plane orbital contribution in the matrix element.branch (
Literal['both','upper','lower'], default:"both") – Which branch of the surface state to include:"upper","lower", or"both".spin (
Literal['integrated','up','down'], default:"integrated") – Matrix-element channel: spin-integrated (default) or one spin-projected component ("up"or"down").angres (
float, default:0.1) – Broadening in angle in degrees.Eres (
float, default:10.0e-3) – Broadening in energy in electronvolts.noise (
bool, default:True) – Whether to add noise to the generated data.seed (
int|None, default:None) – Seed for the random number generator for the noise.count (
int, default:100000000) – Determines the signal-to-noise ratio whennoiseisTrue.ccd_sigma (
float, default:0.6) – The sigma value for CCD noise generation whennoiseisTrue.const_bkg (
float, default:1e-3) – Constant background as a fraction of the count.assign_attributes (
bool, default:False) – Whether to assign attributes to the generated data.extended (
bool, default:True) – Whether to include the free-electron final-state polarization prefactor.polarization (
Sequence[float], default:(0.0, 0.0, 1.0)) – Photon polarization vector. Only used ifextendedisTrue.inner_potential (
float, default:10.0) – Inner potential in eV. Only used ifextendedisTrue.
- Returns:
xarray.DataArray– The generated data with coordinates for alpha, beta, and eV.- Return type:
- erlab.io.exampledata.generate_gold_edge(shape=(200, 300), *, a=-0.05, b=0.1, c=1e-3, temp=100.0, Eres=1e-2, angres=0.1, edge_coeffs=(0.04, 1e-5, -3e-4), background_coeffs=(1.0, 0.0, -2e-3), count=1000000000, noise=True, seed=None, ccd_sigma=0.6, add_mesh=False, mesh_params=None)[source]¶
Generate a curved Fermi edge with a linear density of states.
- Parameters:
shape (
tuple[int,int], default:(200, 300)) – Shape of the generated data. Default is (200, 300).a (
float, default:-0.05) – Slope of the linear density of states. Default is -0.05.b (
float, default:0.1) – Intercept of the linear density of states. Default is 0.1.c (
float, default:1e-3) – Constant background. Default is 1e-3.temp (
float, default:100.0) – Temperature in Kelvin. Default is 100.0.Eres (
float, default:1e-2) – Energy resolution in eV. Default is 1e-2.angres (
float, default:0.1) – Angular resolution. Default is 0.1.edge_coeffs (
Sequence[float], default:(0.04, 1e-5, -3e-4)) – Coefficients for the polynomial equation used to calculate the curved Fermi level as a function of angle in degrees. Default is (0.04, 1e-5, -3e-4).background_coeffs (
Sequence[float], default:(1.0, 0.0, -2e-3)) – Coefficients for the polynomial equation used to calculate the polynomial background of the spectrum as a function of angle in degrees. Negative values are clipped. Default is (1.0, 0.0, -2e-3).count (
int, default:1000000000) – Determines the signal-to-noise ratio whennoiseisTrue. Default is 1e+8.noise (
bool, default:True) – Flag indicating whether to add noise to the spectrum. Default is True.seed (
int|None, default:None) – Seed for the random number generator for the noise. Default is None.ccd_sigma (
float, default:0.6) – Standard deviation of the Gaussian filter applied to the spectrum. Default is 0.6.add_mesh (
bool, default:False) – Whether to multiply the spectrum by a mesh pattern. Default is False.mesh_params (
dict|None, default:None) – Parameters for the mesh pattern generation. Default is None.
- Returns:
data (
xarray.DataArray) – Simulated gold edge spectrum.- Return type:
- erlab.io.exampledata.generate_hvdep_cuts(shape=(50, 250, 300), *, angrange=(-15.0, 15.0), Erange=(-0.45, 0.12), hvrange=(20.0, 69.0), hv_shift=None, configuration=erlab.constants.AxesConfiguration.Type1, temp=20.0, a=6.97, t=0.43, **kwargs)[source]¶
Generate simulated hv-dependent cuts.
- Parameters:
shape (
tuple[int,int,int], default:(50, 250, 300)) – The shape of the generated data, by default (250, 250, 300)hvrange (
tuple[float,float], default:(20.0, 69.0)) – Photon energy range in eV.hv_shift (
float|tuple[float,float] |ndarray|None, default:None) – Optional energy shift (in eV) applied across the photon-energy axis. If a float, a linear shift from-hv_shiftto+hv_shiftis applied across the hν range. If a tuple, the shift is linearly interpolated between the two values across hν. If an array, it must have lengthshape[0]and provides the shift at each hν value. IfNone, no shift is applied. The shift is simulated by generating each hν cut on a shifted energy axis and then assigning a common energy coordinate, so the output contains no all-NaN energies.angrange (
tuple[float,float], default:(-15.0, 15.0)) – Angle range in degrees.Erange (
tuple[float,float], default:(-0.45, 0.12)) – Binding energy range in electronvolts.configuration (
AxesConfiguration|int, default:erlab.constants.AxesConfiguration.Type1) – The experimental configuration, by default Type1DAtemp (
float, default:20.0) – The temperature in Kelvins for the Fermi-Dirac cutoff. If 0, no cutoff is applied, by default 20.0a (
float, default:6.97) – Tight binding parameter \(a\), by default 6.97t (
float, default:0.43) – Tight binding parameter \(t\), by default 0.43**kwargs – Additional keyword arguments to pass to
generate_data_angles.
- erlab.io.exampledata.make_mesh_pattern(shape, *, pitch=12.4, duty=0.8, amplitude=0.3, rotate=27.0, sigma_edge=0.7)[source]¶
Simulate an ARPES mesh pattern using step edges broadened by Gaussians.
- Parameters:
pitch (
float, default:12.4) – Period of the mesh in pixels.duty (
float, default:0.8) – Open fraction along each axis, between 0 and 1.amplitude (
float, default:0.3) – Amplitude of the mesh.rotate (
float, default:27.0) – Rotation of the mesh relative to detector x-axis.sigma_edge (
float, default:0.7) – Gaussian sigma (in pixels) for edge broadening.