%**************************************************************************
%This function writes magnetic length information to the data file.
%
%Input:
%dat_file, data file for results
%b_thresh, threshold field strength (T)
%mag_length_bx, length where abs(Bx) > threshold (m)
%mag_length_by, length where abs(By) > threshold (m)
%
%Zachary Wolf
%8/5/11

function [] = field_dat_magnetic_length(dat_file, b_thresh, mag_length_bx, mag_length_by)

%Write fringe field integral information to the data file
fid = fopen(dat_file, 'a');
fprintf(fid, '\r\n');
fprintf(fid, 'Magnetic Length:\r\n');
fprintf(fid, '(Length between limits where abs(B) < threshold)\r\n');
fprintf(fid, 'Field threshold to determine length = %8.6f T\r\n', b_thresh);
fprintf(fid, 'Magnetic length of Bx = %8.4f m\r\n', mag_length_bx);
fprintf(fid, 'Magnetic length of By = %8.4f m\r\n', mag_length_by);
fclose(fid);

%Done