function map = pixcmap(n)
% PIXCMAP(N) NIWA PIX/ENH colormap
% Generally applied with temperature range 
% 
% See also:
% redblue, pixcmap, phasemap, clmap rscolmap, zebra, cmap5,
% makecmap, oceancolormap
%
% John Wilkin

% enhance file from Uddstrom via Chiswell
enh =[...
23.5 25   -331   1 .3     -331 1 0 
22   23.5 -331   1 .6     -331 1 .3 
21   22   -327   1 1      -331 1 .6 
20   21   -359   1 1      -327 1 1 
19   20   -25    1 1      -1 1 1 
18   19   -43    1 1      -25 1 1 
17   18   -61    1 1      -43 1 1 
16   17   -68    1 1      -61 1 1 
15   16   -86    1 1      -68 1 1 
14   15   -104   1 1      -86 1 1 
13   14   -119   1 1      -104 1 1 
12   13   -155   1 1      -119 1 1 
11   12   -173   1 1      -155 1 1 
10   11   -209   1 1      -173 1 1 
9    10   -227   1 1      -209 1 1 
8    9    -248   1 1      -227 1 1 
7    8    -263   1 1      -248 1 1 
6    7    -273   1 1      -263 1 1 
5    6    -277  .4 1      -273 1 1 
4.75 5.0  .7    .7 .7      .7 .7 .7 ];

% temperature scale
tk = enh(:,2);
tk  = flipud(tk); % flipud for cold to hot

% hue, saturation, value
h  = enh(:,6);
h(end) = enh(end-1,3); % can't figure last row of enh table ????
h = -h/360;
s = enh(:,7);
v = enh(:,8);
hsv = flipud([h(:) s(:) v(:)]);  % flipud for cold to hot

% convert to rgb
rgb = hsv2rgb(hsv);

% interp into required number of color entries
if nargin == 0
  n = size(colormap,1);
end
t = linspace(tk(1),tk(end),n);
map = interp1(tk,rgb,t);
