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

function [] = hall2_anal_dat_param(dat_file, param)

%Write the parameter information to the data file
fid = fopen(dat_file, 'a');
fprintf(fid, '\r\n');
fprintf(fid, 'Analysis Parameters:\r\n');
fprintf(fid, 'Input file directory = %s\r\n', param.input_file_dir);
fprintf(fid, 'Input file name = %s\r\n', param.input_file_name);
fprintf(fid, 'Input file type = %s\r\n', param.input_file_type);
fprintf(fid, 'Undulator polarization mode = %s\r\n', param.und_pol_mode);
fprintf(fid, 'Probe 1 Bx calibration file = %s\r\n', param.probe1_bx_calib_file);
fprintf(fid, 'Probe 1 By calibration file = %s\r\n', param.probe1_by_calib_file);
fprintf(fid, 'Probe 2 Bx calibration file = %s\r\n', param.probe2_bx_calib_file);
fprintf(fid, 'Probe 2 By calibration file = %s\r\n', param.probe2_by_calib_file);
fprintf(fid, 'Number of zero Gauss measurements = %i\r\n', param.num_zero_gauss_meas);
fprintf(fid, 'Probe 1 Bx exement x-offset = %f m\r\n', param.probe1_param.bx_sensor.x);
fprintf(fid, 'Probe 1 Bx exement y-offset = %f m\r\n', param.probe1_param.bx_sensor.y);
fprintf(fid, 'Probe 1 Bx exement z-offset = %f m\r\n', param.probe1_param.bx_sensor.z);
fprintf(fid, 'Probe 1 Bx exement roll = %f m\r\n', param.probe1_param.bx_sensor.roll);
fprintf(fid, 'Probe 1 Bx exement pitch = %f m\r\n', param.probe1_param.bx_sensor.pitch);
fprintf(fid, 'Probe 1 Bx exement yaw = %f m\r\n', param.probe1_param.bx_sensor.yaw);
fprintf(fid, 'Probe 1 By exement x-offset = %f m\r\n', param.probe1_param.by_sensor.x);
fprintf(fid, 'Probe 1 By exement y-offset = %f m\r\n', param.probe1_param.by_sensor.y);
fprintf(fid, 'Probe 1 By exement z-offset = %f m\r\n', param.probe1_param.by_sensor.z);
fprintf(fid, 'Probe 1 By exement roll = %f m\r\n', param.probe1_param.by_sensor.roll);
fprintf(fid, 'Probe 1 By exement pitch = %f m\r\n', param.probe1_param.by_sensor.pitch);
fprintf(fid, 'Probe 1 By exement yaw = %f m\r\n', param.probe1_param.by_sensor.yaw);
fprintf(fid, 'Probe 1 Bz exement x-offset = %f m\r\n', param.probe1_param.bz_sensor.x);
fprintf(fid, 'Probe 1 Bz exement y-offset = %f m\r\n', param.probe1_param.bz_sensor.y);
fprintf(fid, 'Probe 1 Bz exement z-offset = %f m\r\n', param.probe1_param.bz_sensor.z);
fprintf(fid, 'Probe 1 Bz exement roll = %f m\r\n', param.probe1_param.bz_sensor.roll);
fprintf(fid, 'Probe 1 Bz exement pitch = %f m\r\n', param.probe1_param.bz_sensor.pitch);
fprintf(fid, 'Probe 2 Bz exement yaw = %f m\r\n', param.probe2_param.bz_sensor.yaw);
fprintf(fid, 'Probe 2 Bx exement x-offset = %f m\r\n', param.probe2_param.bx_sensor.x);
fprintf(fid, 'Probe 2 Bx exement y-offset = %f m\r\n', param.probe2_param.bx_sensor.y);
fprintf(fid, 'Probe 2 Bx exement z-offset = %f m\r\n', param.probe2_param.bx_sensor.z);
fprintf(fid, 'Probe 2 Bx exement roll = %f m\r\n', param.probe2_param.bx_sensor.roll);
fprintf(fid, 'Probe 2 Bx exement pitch = %f m\r\n', param.probe2_param.bx_sensor.pitch);
fprintf(fid, 'Probe 2 Bx exement yaw = %f m\r\n', param.probe2_param.bx_sensor.yaw);
fprintf(fid, 'Probe 2 By exement x-offset = %f m\r\n', param.probe2_param.by_sensor.x);
fprintf(fid, 'Probe 2 By exement y-offset = %f m\r\n', param.probe2_param.by_sensor.y);
fprintf(fid, 'Probe 2 By exement z-offset = %f m\r\n', param.probe2_param.by_sensor.z);
fprintf(fid, 'Probe 2 By exement roll = %f m\r\n', param.probe2_param.by_sensor.roll);
fprintf(fid, 'Probe 2 By exement pitch = %f m\r\n', param.probe2_param.by_sensor.pitch);
fprintf(fid, 'Probe 2 By exement yaw = %f m\r\n', param.probe2_param.by_sensor.yaw);
fprintf(fid, 'Probe 2 Bz exement x-offset = %f m\r\n', param.probe2_param.bz_sensor.x);
fprintf(fid, 'Probe 2 Bz exement y-offset = %f m\r\n', param.probe2_param.bz_sensor.y);
fprintf(fid, 'Probe 2 Bz exement z-offset = %f m\r\n', param.probe2_param.bz_sensor.z);
fprintf(fid, 'Probe 2 Bz exement roll = %f m\r\n', param.probe2_param.bz_sensor.roll);
fprintf(fid, 'Probe 2 Bz exement pitch = %f m\r\n', param.probe2_param.bz_sensor.pitch);
fprintf(fid, 'Probe 2 Bz exement yaw = %f m\r\n', param.probe2_param.bz_sensor.yaw);
fclose(fid);

%Done
