Files
nappMATLAB-toolbox/beamtime/documentedExampleScripts/test.m
T
bartels-rausch 091cf00e77 Refactor energy calibration pipeline, introduce modern arguments blocks, and add universal logging
* Transitioned nappNorm, nappDetermineShift, and nappCopyShift to use modern MATLAB arguments blocks, removing their legacy functionSignatures.json entries.

* Refactored nappNorm to rely on prior peak fitting results (e.g., from nappFitGaussXps) for normalization rather than performing the fitting internally.

* Decoupled energy calibration: nappDetermineShift now solely calculates internal binding energy shifts, and nappCopyShift distributes them using a unified matching engine ('earlier', 'after', 'spectrumNumber').

* Implemented a Universal Logging Block to track data provenance, automatically appending execution timestamps and caller script names to processed rows.

* Updated nappCombineSpectra to output a logDataSource cell array and cleanly name combined spectra.

* Created nappSaveDataTable for automatic, script-named .mat file saving, complete with a Live Editor interceptor.

* Added a publish-mode silencer to nappFitGaussXps to prevent optimizer spam in generated PDFs.

* Updated readme.md to document the new arguments structure, the 3-step calibration workflow, the matching engine, and the new table variables.
2026-03-25 12:07:49 +01:00

23 lines
715 B
Matlab

%% Start fresh
close all
clearvars
clc
%% Import Data
FileList = nappFileList('2026/testImport','mode','local','importLabView','off');
%% Display Data
disp(FileList(:,{'name','creationDate','lastModifiedDatestr','image','originalFileName'}))
%% Plot images
nappPlot(FileList);
%% Plot iterations
close all
nappPlot(FileList,'tableVariable','image','mode','iterations');
%% Generate spectra and plot
close all
FileList = nappGenerateSpectra(FileList);
nappPlot(FileList,'tableVariable','spectrum_countsPerSecond','mode','OneEach');
%% Generate spectra, remove background and plot
close all
FileList = nappGenerateSpectra(FileList);
nappPlot(FileList,'tableVariable','spectrum_countsPerSecond','mode','OneEach');