en:software:matlab:ta:dev:gui-appdata
Storing and managing data inside the GUI
<note important>The following data model is still in its development, although by now it is rather additions than severe restructurings taking place.</note>
Structure
data
- cell-Array
Saves datasets (spectra) together with its' informations
See below for the details of the data structureorigdata
- cell-Array
Saves datasets (spectra) together with its' informations- “original data” in sense of as they got loaded from their files
- helpful/necessary for an undo function (still to be developed)
-
display
- structhighlight
- structmethod
- string (color, linewidth, marker, style, none)
How to highlight the current spectrum in the main axesvalue
- string/scalar/vector (depending on the value of “method”)
control
- struct
Saves informations important for the current operation of the GUI, such as the currently active spectrumspectra
- struct, informations about currently loaded spectraactiveSpectrum
- integer, reference to datavisible
- vector, holds the positions of the visible spectra in the cell arraydata
invisible
- see above with “visible”modified
- see above with “visible”; reference to the spectra that got modified after they were laoded into the GUI2)missing
- see above with “visible”, reference to the spectra that have missing parameters immediately after the load that are important for later operations
measure
- structpoint
x1val
y1val
x1ind
y1ind
axis
- struct
Informations for the axis handle (display of spectra)displayType
- string, 2D, B0, tMFEdisplay
- string
display mode for MFE data
values: “MFoff”/“MFoff+MFon”/“MFoff+MFon+DeltaMF”/“MFon”/“DeltaMF”grid
- structx
- string, {“major”,“minor”,“off”}y
- string, {“major”,“minor”,“off”}zero
- structvisible
- booleancolor
- 1×3 vectorwidth
- scalarstyle
- string
legend
- structhandle
- scalarlocation
- stringbox
- booleanFontName
- stringFontWeight
- stringFontAngle
- stringFontSize
- scalar
highlight
- structmethod
value
labels
- structx
measure
unit
y
measure
unit
z
measure
unit
limits
- structauto
- booleanx
min
max
y
min
max
z
min
max
normalisation
- stringstdev
- booleanonlyActive
- boolean
status
- cell array
Status messages since starting the GUI- Gets displayed in the “status” window of the GUI (
TAgui_statuswindow
)
dirs
- structlastLoad
- string
Directory data have been loaded from last timelastSave
- stringlastFigSave
- stringlastExport
- string
system
- structusername
- stringplatform
- stringmatlab
- stringTA
- string
Data Structure (data)
- Cell array containing all data.
- All aspects important for the GUI (visible, modified) are controlled via the
control
structure.
The actual TA Toolbox data format is documented elsewhere. Here, only the additional fields are documented that are added when loading data into the GUI.
history
- cell array
History of modifications of a dataset. Every step is documented in a struct that contains (at least) of the following fields:system
- struct
Informations about the system usedusername
- string
Account name of the user having performed the operationplatform
- string
Platform the operation was performed on
parameters
- struct
Parameters of the operation performedinfo
- cell array of strings
Additional informations in textual form, e.g. reprot of the ACC function
line
- struct
Line style settingscolor
- string oder vector, default: 'k'style
- string, default: '-'marker
- string, default: 'none'width
- scalar, default: 1
display
- struct
Values of the sliders etceteraposition
- struct
Position in the 2D datasetx
- scalar, default: 1y
- scalar, default: 1
displacement
- struct
displacement in x, y, and zx
- scalar, default: 0y
- scalar, default: 0z
- scalar, default: 0
scaling
- struct
Scaling in x, y, and zx
- scalar, default: 1y
- scalar, default: 1z
- scalar, default: 1
smoothing
- struct
Smoothing in x and yx
- structvalue
- scalar, default: 1filterfun
- string
y
- structvalue
- scalar, default: 1filterfun
- string
measure
- struct
Details about the measurement (measurement of points/distances inside the GUI)point
- array of structs
Index and unit of the x and y values of each pointindex
- vector
x- and y value of the measured point as indexunit
- vector
x- and y value of the measured point in units
MFon
- struct (OPTIONAL)
Display of the data with applied magnetic fieldline
- struct
Line style settingscolor
- string oder vector, default: 'k'style
- string, default: '-'marker
- string, default: 'none'width
- scalar, default: 1
DeltaMF
- struct (OPTIONAL)
Display of the difference spectra MFon-MFoffline
- struct
Line style settingscolor
- string oder vector, default: 'k'style
- string, default: '-'marker
- string, default: 'none'width
- scalar, default: 1
1)
The same parameters may be found again in the “control” field. The difference is that in “configure” you find the configuration (and therefore default) settings (as they got read from the config file), whereas “control” holds the actual values currently in use.
2)
If this is not empty, the GUI should ask the user before closing whether she/he wants to save the modifications.
3)
A time step that is accurate to a second should be sufficient, as such a time stamp is only valid for one operation on one dataset.
4)
To keep it simple, gets determined by the function
mfilename
.en/software/matlab/ta/dev/gui-appdata.txt · Last modified: 2020/09/30 21:35 by 127.0.0.1