SHOW_INTENSITY_MODEL: Shows the intensity model in the form of a figure. Code written by Katherine Smith, 2003 GENERAL show_intensity_model(intensity_model, n_sds, max_modes, fig_title) INPUT/S -intensity_model: The intensity model to be shown. -n_sds: Number of standard deviations. -max_modes: Maximum modes, meaning what?? -fig_title: Title of the figure to be displayed? OUTPUT/S -None. PENDING WORK - KNOWN BUG/S -None. COMMENT/S - RELATED FUNCTION/S SHOW_SHAPE_MODEL, SHOW_COMBINED_MODEL ABOUT -Created: November 23rd, 2003 -Last update: Novermber 26th, 2003 -Revision: 0.0.2 -Author: R. S. Schestowitz, University of Manchester ==============================================================
0001 function figure_handle = show_intensity_model(intensity_model, n_sds, max_modes, fig_title, image_width) 0002 % SHOW_INTENSITY_MODEL: Shows the intensity model in the form of 0003 % a figure. 0004 % 0005 % Code written by Katherine Smith, 2003 0006 % 0007 % GENERAL 0008 % 0009 % show_intensity_model(intensity_model, n_sds, max_modes, fig_title) 0010 % 0011 % INPUT/S 0012 % 0013 % -intensity_model: 0014 % The intensity model to be shown. 0015 % 0016 % -n_sds: 0017 % Number of standard deviations. 0018 % 0019 % -max_modes: 0020 % Maximum modes, meaning what?? 0021 % 0022 % -fig_title: 0023 % Title of the figure to be displayed? 0024 % 0025 % 0026 % OUTPUT/S 0027 % 0028 % -None. 0029 % 0030 % PENDING WORK 0031 % 0032 % - 0033 % 0034 % KNOWN BUG/S 0035 % 0036 % -None. 0037 % 0038 % COMMENT/S 0039 % 0040 % - 0041 % 0042 % RELATED FUNCTION/S 0043 % 0044 % SHOW_SHAPE_MODEL, SHOW_COMBINED_MODEL 0045 % 0046 % ABOUT 0047 % 0048 % -Created: November 23rd, 2003 0049 % -Last update: Novermber 26th, 2003 0050 % -Revision: 0.0.2 0051 % -Author: R. S. Schestowitz, University of Manchester 0052 % ============================================================== 0053 0054 %n_modes = size(intensity_model.pcs,2); 0055 0056 n_modes = min(size(intensity_model.pcs,2),max_modes); 0057 % get number of modes. The one above (in comments) 0058 % is probably the remains of an older version. 0059 0060 fig = figure('Name',([fig_title,'Intensity modes'])); 0061 % prepare figure and assign name input 0062 figure_handle = figure(fig); 0063 0064 0065 for m=1:n_modes % for all modes as resolved above 0066 for i=-n_sds:n_sds % for range of negative deviations to possitive ones 0067 % with (currently) one unit steps (too large??) 0068 % Smith: what are the parameters corresponding to this sd 0069 % create example with these parameters 0070 example_params = repmat(i*intensity_model.sd(1,m),size(intensity_model.pcs,1),1); 0071 % get the parameters of the models 0072 example = example_params.*intensity_model.pcs(:,m) + intensity_model.mean'; 0073 % apply the changes according to the mode parameters. Use 0074 % them as an offset to the mean intensity model 0075 figure(fig); 0076 0077 subplot(n_modes, n_sds * 2 + 1, (m - 1) * (n_sds * 2 + 1) + i + n_sds + 1); 0078 plot(example); 0079 % plot the different modes of intensity variation 0080 axis([0 image_width -1 1.4]); 0081 if (m == 1 & i ==1), 0082 text(1,1,'Intensity Model'); 0083 end 0084 end 0085 end