22 lines
1.1 KiB
Matlab
22 lines
1.1 KiB
Matlab
function FileList = addPhotonEnergy(FileList,fileNumber,notesToAdd,dataMonth,dataYear)
|
|
%addPhotonEnergy adds the Xray photon energy for selected measurements to the data table
|
|
%
|
|
% FileList = addPhotonEnergy(FileList,[1,8:12,26],1000,2,2022);
|
|
%
|
|
% Input to this function are
|
|
%
|
|
% * the name of the data table,
|
|
% * the file numbers of the SES scans to which the data should be added
|
|
% * the photon energy in eV,
|
|
% * the month and the year that the data was acquired
|
|
|
|
for ii = 1:length(fileNumber)
|
|
tmpMatch = (startsWith(FileList.name, sprintf('%04.0f',fileNumber(ii))) | startsWith(FileList.name, sprintf('NAPP%04.0f',fileNumber(ii)))) & ...
|
|
(month(FileList.lastModifiedDatenum) == dataMonth) &...
|
|
(year(FileList.lastModifiedDatenum) == dataYear) &...
|
|
(endsWith(FileList.name, '.ibw'));
|
|
|
|
FileList(tmpMatch,:).xRayEkin_eV = num2cell(repmat(notesToAdd,size(FileList.xRayEkin_eV(tmpMatch),1),1));
|
|
FileList(tmpMatch,:).xRayEkinRange_eV = repmat([min(notesToAdd) max(notesToAdd)],size(FileList.xRayEkin_eV(tmpMatch),1),1);
|
|
end
|
|
end |