function eis_bit_decomp, data, a=a, b=b, c=c, Nc=Nc
; 
; PURPOSE:
;          decompress the 12bit data
; HISTORY:
;          2005 Jan 28 by H. Hara 
;

a0  =    1877.50 & if keyword_set(a)  then a0=float(a)
b0  =     341.00 & if keyword_set(b)  then b0=float(b)
c0  = -669298.   & if keyword_set(c)  then c0=float(c)
Nc0 =    2048.   & if keyword_set(Nc) then Nc0=float(Nc)

;;;output = fix(data)
output=data

ss = where(data gt Nc0)
if ss(0) ne -1 then $
output(ss) = round( ( (data(ss)-a0)*(data(ss)-a0) - c0 )/b0 )

sss = where(output gt 16383)
if sss(0) ne -1 then output(sss) = 16383

return,output

end

