Home > Source > Model > show_intensity_model.m

show_intensity_model

PURPOSE ^

==============================================================

SYNOPSIS ^

function figure_handle = show_intensity_model(intensity_model, n_sds, max_modes, fig_title, image_width)

DESCRIPTION ^

 ==============================================================
 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
 ==============================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Thu 13-May-2004 18:00:46 by m2html © 2003