analysis.sees#

pyleem.analysis.sees.SEES_onset(profile)[source]#

Determine onset position of secondary electron emission.

Locates the steepest rise in the profile by finding maximum derivative. Extrapolates linear onset back to zero intensity.

Parameters:

profile (ndarray) – 1D array of secondary electron intensity values.

Returns:

Peak index, slope, and onset position in pixels.

Return type:

tuple(int, float, float)

class pyleem.analysis.sees.SEESBase(readers, roi=None, onset=0)[source]#

Bases: Analyzer

Base class for SEES analyzer.

get_processed_profile(index, sigma)[source]#

Return the processed profile.

class pyleem.analysis.sees.SEESCalibration(readers, roi=None, onset=0)[source]#

Bases: SEESBase

Config for SEES analyzer.

analyze(sigma=10, pixel_per_ev=None, peak_shift=None)[source]#

Calibration of the SEES analyzer.

class pyleem.analysis.sees.SEESAnalyzer(readers, roi, pixel_per_ev, peak_shift, onset=0, sigma=10)[source]#

Bases: SEESBase

Analyzer for secondary electron energy spectroscopy data.

Analyzes SEES profiles to determine surface potentials by measuring secondary electron emission onset. Onset shifts with surface charging.

Parameters:
  • readers (list) – List of readers.

  • roi (ROI) – Region of interest for profile extraction.

  • sigma (float) – Gaussian filter sigma for smoothing.

Variables:
  • pk_idx (int) – Index of steepest rise.

  • slope (float) – Maximum derivative.

  • onset_pos (float) – Extrapolated onset position in pixels.

  • surface_potential (float) – Measured surface potential in V.

analyze_profile(index)[source]#

Analyze a profile.

plot_profile(index, ax=None, show_fit=False)[source]#

Plot profile with optional onset fit overlay.

Parameters:
  • ax (matplotlib.axes.Axes) – Matplotlib axes object.

  • show_fit (bool) – Whether to show onset fit line.