%**************************************************************************
%This function writes a summary of the zscan fiducialization information
%to the data file.
%
%Input:
%dat_file, data file for results
%zscan_temp, temperature of the undulator (C)
%zscan_x_pos, carriage x position during the scan (m)
%zscan_y_pos, carriage y position during the scan (m)
%
%Zachary Wolf, 9/18/07

function [] = fid_dat_zscan_info(dat_file, zscan_temp, zscan_x_pos, zscan_y_pos)

%Open the data file
fid = fopen(dat_file, 'a');

%Write the summary header
fprintf(fid, '\r\n');
fprintf(fid, '----- Z Scan Fiducialization Measurements Summary -----\r\n');

%Undulator temperature
fprintf(fid, 'Undulator Temperature = %f C\r\n', zscan_temp);
fprintf(fid, 'Carriage X Position = %f m\r\n', zscan_x_pos);
fprintf(fid, 'Carriage Y Position = %f m\r\n', zscan_y_pos);

%Close the data file
fclose(fid);

%Done
