IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
report_soitem.m
Go to the documentation of this file.
1 %> @brief Base for all reports that operate on a @ref soitem object
3  methods
4  function o = report_soitem()
5  o.classtitle = 'System optimization item';
6  o.inputclass = ''; % This class is a base class
7  o.flag_params = 0;
8  end;
9  end;
10 
11  % *-*-*-*-*-*-*-* TOOLS
12  methods
13  function s = get_standardheader(o, obj)
14  s = ['<h1>', o.get_description(), '</h1>', 10, '<p>Input description: <b>', obj.get_description(), '</b></p>', 10, ...
15  iif(~isempty(obj.dstitle), ['<p>Input dataset: <b>', obj.dstitle, '</b></p>', 10], '')];
16  end;
17 
18  %> Creates curves from sovalues object.
19  function s = images_1d(o, sor)
20  s = '';
21  flag_many = size(sor.values, 2) > 1;
22 
23  % First part
24 
26  u.dimspec = {[0 0], [1 2]};
27  u.valuesfieldname = 'rates';
28  u.flag_legend = 1;
29  u.flag_star = 1;
30  u.ylimits = [];
31  u.xticks = [];
32  u.xticklabels = {};
33  u.flag_hachure = ~flag_many;
34 
35 
36  % Creates legend image
37  if flag_many
38  % Legend is only justified if there is more than one curve
39  figure;u.use(sor);
40  fnleg = find_filename('irr_image', [], 'png');
41  save_legend(o.gff(fnleg), 150); % High DPI because this may be the only opportunity to have the legend
42  close;
43  end;
44 
45 
46  figure;
47  subplot(1, 2, 1);
48  u.use(sor);
49  legend off;
50 
51  u.valuesfieldname = 'times3';
52  subplot(1, 2, 2);
53  u.use(sor);
54  legend off;
55 
56  pause(.1);
57  maximize_window(gcf(), 4);
58 
59  s = cat(2, s, o.save_n_close());
60 
61  if flag_many
62  s = cat(2, s, o.get_imgtag(fnleg, 10, 0));
63  end;
64 
65 
66  % Second part: the hachured sub-images
67 
68  if flag_many
70  u.dimspec = {[0 0], [1 2]};
71  u.valuesfieldname = 'rates';
72  u.ylimits = [];
73  u.xticks = [];
74  u.flag_star = 1;
75  u.xticklabels = {};
76  figure;u.use(sor);
77 
78  s = cat(2, s, o.save_n_close());
79 
80  u.valuesfieldname = 'times3';
81  figure;u.use(sor);
82 
83  s = cat(2, s, o.save_n_close());
84  end;
85  end;
86 
87  %*****************************************************************************************************************************************
88 
89  %> Creates 2d image maps from sovalues object.
90  function s = images_2d(o, sor)
93 
94  s = o.save_n_close();
95  end;
96  end;
97 end
Draws plot from a sovalues object.
Draws plot from a sovalues object.
function maximize_window(in h, in aspectratio, in normalizedsize)
Property valuesfieldname
=rates
function view_ratetimesubimages(in r)
function iif(in cond, in x1, in x2)
Base for all reports that operate on a soitem object.
Definition: report_soitem.m:2
function find_filename(in prefix, in suffix, in extension, in flag_return_ext)
Report base class.
Definition: irreport.m:8
function save_legend(in fn, in dpi)