function [year,jday,mstla,mstlo,stime,sdtime,sang,sdang,outname] = ...
         readamp(fnamein)

fname=sprintf('%s',fnamein);
fid = fopen(fname,'r');

year = fscanf(fid,'%s',1);
jday = fscanf(fid,'%s\n',1);
mstla = fscanf(fid,'%f',1);
mstlo = fscanf(fid,'%f\n',1);
stime = fscanf(fid,'%f',1);
sdtime = fscanf(fid,'%f\n',1);
sang = fscanf(fid,'%f',1);
sdang = fscanf(fid,'%f\n',1);
npts=fscanf(fid,'%d',1);
ntrs=fscanf(fid,'%d',1);
outname=zeros(npts,ntrs);
for i=1:npts
    for j=1:ntrs
       dumm=fscanf(fid,'%e',1);
       outname(i,j)=dumm;
    end
end

fclose(fid);
