Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

read *.SPE or *.FITS

145 views
Skip to first unread message

elaine chan

unread,
Aug 29, 2003, 11:39:39 PM8/29/03
to

%This m file will read FITS if you adjust the
%size of the header
%reads Princeton (roperscientific)
%camera *.SPE files ->Matlab
%
fid=fopen('nameOfFile.SPE','r');
header=fread(fid,2050,'uint16');% 4100 bytes/2
ImMat=fread(fid,1024*1024,'uint16');
Z=reshape(ImMat,1024,1024);
fclose(fid);
Z=double(Z);
[X,Y]=meshgrid(1:1024,1:1024);
mesh(X,Y,Z); %display 3D
view(90,90);
%print -djpeg99 nameOfFile.jpg ;% high quality jpeg
%

--

0 new messages