;+ ;NAME: ; hsi_obs_summ_decompress ;PROJECT: ; HESSI ;CATEGORY: ; Hessi catalog generation ;PURPOSE: ; deCompression algorithm for the HESSI observing summary count rates; ;CALLING SEQUENCE: ; u = Hsi_obs_summ_decompress(c) ;INPUT: ; c = compressed count rate, a bytarr ;OUTPUT: ; u = uncompressed count rate, a lonarr, note that data is always ; lost by the compression-decompression process up tp 6% ;HISTORY: ; jmm, 22-mar-1999, jimm@ssl.berkeley.edu ;- FUNCTION Hsi_obs_summ_decompress, c0 ;Generate lookup table lkup = lonarr(256) ll = lindgen(16) sum = 0 FOR jj = 0l, 15l DO BEGIN lkup[16*jj:16*(jj+1)-1] = ll*2l^jj+sum IF(jj LT 15) THEN sum = lkup[16*(jj+1)-1]+2l^jj ENDFOR ;lkup ranges from 0 to 1015792l ;c must be between 0 and 255 c = c0 > 0 & c = c < 255 c = byte(c) u = lkup(c) RETURN, u END