%**************************************************************************
%This function writes the parameter information to the data file.
%
%Input:
%dat_file, data file for results
%param, structure containing program parameters
%
%Zachary Wolf
%9/20/14

function [] = gen_epu_dat_param(dat_file, param)

%Write the parameter information to the data file
fid = fopen(dat_file, 'a');
fprintf(fid, '\r\n');
fprintf(fid, 'Program Parameters:\r\n');
fprintf(fid, 'Undulator period = %f m\r\n', param.lambda_u);
fprintf(fid, 'Number of periods = %i\r\n', param.num_per);
fprintf(fid, 'Peak Scalar Potential = %f Tm\r\n', param.phi_0);
fprintf(fid, 'Z_01 = %f m\r\n', param.z_01);
fprintf(fid, 'Z_02 = %f m\r\n', param.z_02);
fprintf(fid, 'Z_03 = %f m\r\n', param.z_03);
fprintf(fid, 'Z_04 = %f m\r\n', param.z_04);
fclose(fid);
