%**************************************************************************
%This function initializes the plot file.  It writes a title page.
%
%Input:
%plt_file, plot file for results
%msg, message describing the type of plots
%param, structure containing parameter information
%
%Zachary Wolf, 4/2/08

function [] = util_sim_plt_init(plt_file, msg, param)

%Put the parameters in a cell array to include with the output
param_info{1} = strcat('OUTPUT_FILE_DIR = ', param.output_file_dir);
param_info = strrep(param_info, '_', '-');
param_info = strrep(param_info, '\', '\\');

axes('position', [0, 0, 1, 1], 'visible', 'off');
y_pos = .95;
text(.1, y_pos, 'SLAC Magnetic Measurements', 'FontSize', 12);
y_pos = y_pos - .03;
text(.1, y_pos, msg{1}, 'FontSize', 12);
y_pos = y_pos - .03;
text(.1, y_pos, msg{2}, 'FontSize', 12);
y_pos = y_pos - .03;
text(.1, y_pos, '  ', 'FontSize', 12);
y_pos = y_pos - .03;
text(.1, y_pos, 'Parameters:', 'FontSize', 12);
[r, c] = size(param_info);
for ii = 1:c
    y_pos = y_pos - .03;
    text(.1, y_pos, param_info{ii}, 'FontSize', 12);
end

%Plot the title page
orient landscape;
print('-dpsc', plt_file);

%Done