Skip to content

Working with Trace

Guillaume Erny edited this page Apr 3, 2017 · 7 revisions

Recovering information using the Data property in Trace

While the Finnee and Dataset objects allow organising the data, the data are stored in the Trace objects. For example, to recover the BPP one may do

XY = myFinnee.Datasets{1}.BPP.Data;

XY is nx2 array with, in the first column the axis and the second the corresponding values

with this variable, it is easy to plot or transform the data. For example

plot(XY(:,1), X(Y:,2))

will plot the BPP with the time as the x-axis, while

plot(XY(:,2))

will plot the BPP with scan number as the x-axis

Matlab integrates various tools with their graphics. In particular Zoom In, Zoom Out, and Data Cursor allows to explore the data graphically.

plot of BPP

In this particular example, Data Cursor allows to known the scan numbers of interest whose data can then be extracted:

MSat511 = myFinnee.Datasets{1}.ListOfScans{511}.Data;
plot(MSat511(:,1), MSat511(:,2))

plot of MSat511

With such system is easy to access every MS scans in a given dataset to access or transform the data, for example:

for ii = 1: length(myFinnee.Datasets{1}.ListOfScans)    
    MSatii = myFinnee.Datasets{1}.ListOfScans{ii}.Data;    
    % Do something to MSatii    
    % Do something else    
end

Class methods: plot

To facilitate the data exploration and analysis, some methods have been programmed in the trace class. The plot method allows displaying the data with axis and title.

myFinnee.Datasets{1}.BPP.plot;

gives

plot of BPP

As you can see, axes are now labelled. The trace can also be exported to Matlab workspace by right-clicking in the grey-zone and selecting ExportObj. In this case, a new variable called currentTrace will be created (NOTE: this will only work with no icons are selected in the menu bar of the figure).


Up            : Profile and spectrum
Next         : Extracting profile or spectrum
Previous  : Profile and spectrum


Related to:

Clone this wiki locally