%**************************************************************************
%This function gets the header information and the measurements from
%the input data file.
%
%Input:
%param, parameter structure
%
%Output:
%header, header information from data file
%temp, measured temperature (C)
%zm, Z positions of the measurements in bench coordinates (m)
%vx1m, measured voltage from the horizontal field sensor, probe1 (V)
%vy1m, measured voltage from the vertical field sensor, probe1 (V)
%vz1m, measured voltage from the longitudinal field sensor, probe1 (V)
%vx2m, measured voltage from the horizontal field sensor, probe2 (V)
%vy2m, measured voltage from the vertical field sensor, probe2 (V)
%vz2m, measured voltage from the longitudinal field sensor, probe2 (V)
%
%Zachary Wolf
%6/20/13

function [header, temp, zm, vx1m, vy1m, vz1m, vx2m, vy2m, vz2m] = hall2_anal_get_meas(param)

%Construct the input file
input_file = strcat(param.input_file_dir, param.input_file_name);

%Read the input file
if strcmp(param.input_file_type, 'ZVXYVXYH')
    [header, zm, vx1m, vy1m, vx2m, vy2m] = hall2_meas_read_meas_zvxyvxyh(input_file);
    vz1m = zeros(1, length(vx1m));
    vz2m = zeros(1, length(vx2m));
    temp = 0;
elseif strcmp(param.input_file_type, 'ZVXYZVXYZH')
    [header, temp, zm, vx1m, vy1m, vz1m, vx2m, vy2m, vz2m] = hall2_meas_read_meas_zvxyzvxyzh(input_file);
else
    error('Unknown input file type.');
end

%Done
