%	to read a signa  image which might have a header, or a
%	flat file

	fname = input('gimme image file =','s');
	fid = fopen(fname, 'r');
	hdr = fread(fid, 7904, 'char');
	if strcmp(sprintf('%s',hdr(1:4)), 'IMGF') == 0
	  fseek(fid, 0, 'bof');
	end
	[buf, n] = fread(fid, 'short');
	fclose(fid);
	npix = sqrt(n);
 	img = zeros(npix);	
	img(:) = buf;
	img = img';
