function gt_expmode, item, header=header, string=string, short=short, spaces=spaces ; ; header_array = ['ExpM', 'M'] conv2str = ['Norm', 'Dark', 'Calb', '????'] ;4 characters conv2short = ['N', 'D', 'C', '?'] ;2 characters ; if (n_params(0) eq 0) then begin print, 'String Output for GET_EXPMODE' for i=0,2 do print, i, conv2str(i), conv2short(i), format='(i3, 2x, a6, 2x, a6)' return, '' end ; siz = size(item) typ = siz( siz(0)+1 ) if (typ eq 8) then begin ;Check to see if an index was passed (which has the "periph" tag ;nested under "sxt", or a roadmap or observing log entry was passed tags = tag_names(item) if (tags(0) eq 'GEN') then out = item.sxt.explevmode $ else out = item.explevmode end else begin out = item end ; ;---- If the item passed is byte type, then assume that it is a ; raw telemetered value and the item's bits need to be extracted siz = size(out) typ = siz( siz(0)+1 ) if (typ eq 1) then out = mask(out, 6, 2) out = out>0<3 ;check the range ; out = gt_conv2str(out, conv2str, conv2short, header_array, header=header, $ string=string, short=short, spaces=spaces) ; return, out end