%**************************************************************************
%This function plots the change in the difference between the hall and delta probe
%measurements as a fraction of the nmr measurement.
%
%Input:
%plt_file, plot file for results
%date_num, date of the measurement
%b_delta_frac_change, change in fractional field difference between the hall and nmr probes
%
%Zachary Wolf, 4/14/09

function [] = ref_dipole_plot_bdeltafracchange(plt_file, date_num, b_delta_frac_change)

%Make the plot
figure;
hold all;
plot(date_num, b_delta_frac_change, '*');
datetick('x', 'mm/yy', 'keepticks', 'keeplimits');
title('Change In Reference Dipole (Hall - NMR) / NMR Fractional Measurement Difference');
xlabel('Date');
ylabel('Change In delta B / B');
grid on;
zoom on;
hold off;

%Mark the hall probe calibrations
ii = 0;
%ii = ii + 1;  hall_calib(ii).date = [2007, 6, 18];
%ii = ii + 1;  hall_calib(ii).date = [2007, 10, 16];
%ii = ii + 1;  hall_calib(ii).date = [2008, 3, 14];
ii = ii + 1;  hall_calib(ii).date = [2008, 8, 18];
ii = ii + 1;  hall_calib(ii).date = [2008, 10, 7];
ii = ii + 1;  hall_calib(ii).date = [2008, 12, 19];
ii = ii + 1;  hall_calib(ii).date = [2009, 5, 18];
[r, c] = size(hall_calib);
for ii = 1 : c
    date_vec = hall_calib(ii).date;
    date_vec_text = date_vec;
    date_vec_text(3) = date_vec_text(3) + 5;
    y_limits = ylim;
    text(datenum(date_vec_text), y_limits(1) + 0.1 * (y_limits(2) - y_limits(1)), 'Calib', 'color', 'r');
    line([datenum(date_vec), datenum(date_vec)], ylim, 'color', 'r', 'linewidth', 1);
end

%Save the plot
util_print_fig(plt_file);

%Done
