52 lines
2.0 KiB
Matlab
52 lines
2.0 KiB
Matlab
%% 20251119 ISS BeamTime
|
|
%
|
|
% We do this for ALL spectra during each beamtime. The code here is just
|
|
% for illustration and sample names might not make sense.
|
|
%% Start fresh
|
|
close all
|
|
clearvars
|
|
clc
|
|
|
|
%% Import Data
|
|
FileList = nappFileList('2025/20251119_NappIss','mode','local','importLabView','off');
|
|
save("FileList.mat","FileList")
|
|
|
|
%% Add sample label
|
|
%
|
|
% Typical info includes: sample, gas environment, purpose, project.
|
|
|
|
FileList = addSampleNotes(FileList,0:3,'test, empty file',11,2025,".h5");
|
|
FileList = addSampleNotes(FileList,1,'test, empty file',11,2025,"XPS");
|
|
FileList = addSampleNotes(FileList,128,'this is a sample description',11,2025,"XPS");
|
|
FileList = addSampleNotes(FileList,[74,78,80,82,83,84,85,86], ...
|
|
'Al-oxide, water, optimize peak separation, Celia',11,2025,"XPS"); % not ideal E_kin windows
|
|
% List selected files
|
|
tmpDataSelection = startsWith(FileList.name, "0074");
|
|
disp(FileList(tmpDataSelection,{'name','lastModifiedDatestr','sample'}))
|
|
|
|
%% Identify faulty data and files
|
|
%
|
|
% We use the phrase "(bad data)" at the end of the sample description to
|
|
% filter faulty files during the later analysis.
|
|
%
|
|
% Running addSampleNotes again will overwrite the old entry. If you want to
|
|
% keep notes on the sample and only add (bad data) at the end, you need to
|
|
% paste the whole text string:
|
|
FileList = addSampleNotes(FileList,[4,6,7,8,19,43],'(bad data)',11,2025,"XPS"); % data file corrupted
|
|
FileList = addSampleNotes(FileList,[74,78,80,82,83,84,85,86], ...
|
|
'Al-oxide, water, optimize peak separation, Celia (bad data)',11,2025,"XPS"); % not ideal E_kin windows
|
|
% List selected files
|
|
tmpDataSelection = startsWith(FileList.name, "0074");
|
|
disp(FileList(tmpDataSelection,{'name','lastModifiedDatestr','sample'}))
|
|
|
|
%% Add photon energy
|
|
FileList = addPhotonEnergy(FileList,91:94,750,11,2025);
|
|
|
|
%% Save
|
|
%
|
|
% The FileList table holds data and metadata for all beamtime data. It is
|
|
% saved in a mat file for further use.
|
|
close all
|
|
clearvars -except FileList
|
|
save("FileList.mat","FileList")
|