%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Name: plotSweep.m
% Author: J. Kristoffer Hultgren
%
% Description:
%
% Plots sweep at a complete orbit as a pcolor over time
%
% Input: data - Complete neutral model data set
% currout - Current vector (A)
% Vb - Bias voltage vector
% r - Radius of orbit
%
% Output: -
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function plotSweep(data,currout,Vb,r)
global CO; % Global constants
P = 2*pi*sqrt(r^3/(CO.G*CO.M))/60/60; %Orbital period
TH = linspace(0,360,max(size(data)));
figure('name','Timeplot Sweep')
subplot(2,1,1), pcolor(TH,Vb,currout'.*1e9)
shading interp
colorbar
title('I_{p} (nA)')
xlabel('\theta (deg)')
ylabel('V_{b} (V)')
axes('position',[.13 .45 .68 .0001])
axis([0 P*40/36 0 0001])
xlabel('Time (h)')