% Script File: Pallas
% Plots the trigonometric interpolant of the Gauss Pallas data.
clear
M=64
A = linspace(0,360,2*M+1)';
D(2:M)=0;D(M+2:2*M)=1;D(1)=.5;D(M+1)=.5;D(2*M+1)=.5;
%=[ 408 89 -66 10 338 807 1238 1511 1583 1462 1183 804 408]';
D=D';

Avals = linspace(0,360,1000)';
%F     = CSInterp(D(1:2*M));
y1 = FFTRecur(Avals(1:2*M));
   P1 = struct('a',real(y1(1:M+1)),'b',-imag(y1(2:M-1)));
   P1.a(1)=P1.a(1)/2;P1.a(M+1)=P1.a(M+1)/2;

Fvals = CSeval(P1,360,Avals);

%plot(Avals,Fvals,A,D,'o')
plot(Avals,Fvals)
a = 170;b=235;
%axis([a b .985 1.035])
set(gca,'xTick',linspace(a,b,M/4))
xlabel('Ascension (Degrees)')
ylabel('Declination (minutes)')
