Files
nappMATLAB-toolbox/beamtime/resources/functionSignatures.json
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

146 lines
6.1 KiB
JSON

{
"_schemaVersion": "1.0.0",
"nappPlot": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "tableSelection", "kind": "optional", "type": ["logical"]},
{"name": "tableVariable", "kind": "namevalue", "type": ["choices={'image','imageRoh','spectrum_countsPerSecond','spectrum_counts','spectrum_countsNorm'}"]},
{"name": "mode", "kind": "namevalue", "type": ["choices={'AllInOne','OneEach','iterations','AugerMeitner','interactive'}"]},
{"name": "figureMode", "kind": "namevalue", "type": ["choices={'screen','powerpoint','word'}"]},
{"name": "energyScale", "kind": "namevalue", "type": ["choices={'kinetic','binding','xRay','sweeps'}"]},
{"name": "plotStep", "kind": "namevalue", "type": ["numeric"]},
{"name": "AugerMeitnerEnergies", "kind": "namevalue", "type": ["numeric"]}
]
},
"nappGenerateSpectra": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "tableSelection", "kind": "optional", "type": ["logical"]},
{"name": "tableVariable", "kind": "namevalue", "type": ["choices={'image','imageRoh'}"]},
{"name": "mode", "kind": "namevalue", "type": ["choices={'mean','sum','trapz','AugerMeitnerMean'}"]},
{"name": "iterationRange", "kind": "namevalue", "type": ["numeric"]},
{"name": "eKinStart", "kind": "namevalue", "type": ["numeric"]},
{"name": "eKinEnd", "kind": "namevalue", "type": ["numeric"]}
]
},
"nappFitGaussXps": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "FitParameter", "kind": "required", "type": ["struct"]},
{"name": "tableSelection", "kind": "optional", "type": ["logical"]},
{"name": "tableVariable", "kind": "namevalue", "type": ["choices={'spectrum_counts','spectrum_countsPerSecond','spectrum_countsNorm'}"]},
{"name": "mode", "kind": "namevalue", "type": ["choices={'unconstrained','widthPosition','position','width','widthPositionShirley','positionShirley','widthShirley','unconstrainedAndWidthPosition','gasAndTwoAcidBasePairs','widthPositionAreaRatio','widthPositionAmineAreaRatio','TwoSpinOrbitDoublet','TwoSpinOrbitDoubletPseudoVoigtShirley','GasAndSurfaceSpinOrbitDoublet'}"]},
{"name": "showFigures", "kind": "namevalue", "type": ["choices={'on','off'}"]},
{"name": "energyScale", "kind": "namevalue", "type": ["choices={'kinetic','binding'}"]},
{"name": "backgroundMode", "kind": "namevalue", "type": ["choices={'linear','shirley'}"]},
{"name": "peakWidthMode", "kind": "namevalue", "type": ["choices={'gauss','FWHM'}"]}
]
},
"nappFileList": {
"inputs": [
{"name": "dataPath", "kind": "required"},
{"name": "DataTable", "kind": "optional", "type": ["table"]},
{"name": "mode", "kind": "namevalue", "type": ["choices={'local','nappDrive','dataDrive','localNew','nappDrivePick','localPick','dataPick'}"]},
{"name": "importLabView", "kind": "namevalue", "type": ["choices={'on','off'}"]}
]
},
"nappCombineSpectra": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "tableSelection", "kind": "namevalue", "type": ["logical"]},
{"name": "tableRow", "kind": "namevalue", "type": ["numeric"]},
{"name": "tableVariable", "kind": "namevalue", "type": ["choices={'nexafsSpectrum','spectrum_counts','spectrum_countsPerSecond','spectrum_countsNorm','nexafsSpectrumPreBackground','nexafsSpectrumPreNorm','nexafsSpectrumPreGasPhase','nexafsSpectrumPreI0','nexafsSpectrumPreAdvCarb'}"]},
{"name": "mode", "kind": "namevalue", "type": ["choices={'sum','average','subtract'}"]},
{"name": "energyScale", "kind": "namevalue", "type": ["choices={'kinetic','binding','xRay'}"]},
{"name": "output", "kind": "namevalue", "type": ["choices={'simple','complete'}"]}
]
},
"nappBindingEnergyXps": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "tableSelection", "kind": "namevalue", "type": ["logical"]},
{"name": "tableVariable", "kind": "namevalue", "type": ["choices={'spectrum_counts','spectrum_countsPerSecond'}"]}
]
},
"nappAlignImages": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "tableSelection", "kind": "namevalue", "type": ["logical"]},
{"name": "tableVariable", "kind": "namevalue", "type": ["choices={'imageRoh','image'}"]}
]
},
"nappAddFitToPlot": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "tableSelection", "kind": "optional"},
{"name": "plotHandle", "kind": "optional"},
{"name": "peakWidthMode", "kind": "optional"},
{"name": "energyScale", "kind": "optional"}
]
},
"nappAnnotateSurvey": {
"inputs": [
{"name": "X", "kind": "required"},
{"name": "Y", "kind": "required"},
{"name": "dataObjs", "kind": "required"},
{"name": "labeltext", "kind": "required"}
]
},
"Napp_RH_p": {
"inputs": [
{"name": "T_current", "kind": "required"},
{"name": "partial_pressure_water", "kind": "required"}
]
},
"Napp_p_RH": {
"inputs": [
{"name": "T_current", "kind": "required"},
{"name": "RH", "kind": "required"}
]
},
"Napp_p_ice": {
"inputs": [
{"name": "T_current", "kind": "required"}
]
},
"createBeamtimeFolder": {
"inputs": [
{"name": "projectName", "kind": "required"}
]
},
"addSampleNotes": {
"inputs": [
{"name": "DataTable", "kind": "required", "type": ["table"]},
{"name": "fileNumber", "kind": "required"},
{"name": "notesToAdd", "kind": "required"},
{"name": "dataMonth", "kind": "required"},
{"name": "dataYear", "kind": "required"},
{"name": "tableSelection", "kind": "required"}
]
},
"addPhotonEnergy": {
"inputs": [
{"name": "FileList", "kind": "required"},
{"name": "fileNumber", "kind": "required"},
{"name": "notesToAdd", "kind": "required"},
{"name": "dataMonth", "kind": "required"},
{"name": "dataYear", "kind": "required"}
]
}
}