function at_hr(file_loc,mlab,calfile)

hr=get_argos_hr(file_loc,mlab);%read argos file
if ~isempty(hr)
    Cal=ReadCalfileHR(calfile);%then read it
    if ~isempty(Cal)
        [Cal_hr]=calc_hr(hr,Cal,calfile);%calculate calibrated HR data
        plot_argos_hr(Cal_hr,mlab);%plot it and save it
    else
        warning('Failed to read calibration data');
    end
end