;+
;
; NAME: 
;	CHANNEL
;
; PURPOSE:
;	This procedure computes the BATSE linear channel numbers for the SHER PHA
;
; CATEGORY:
;	BATSE
;
; CALLING SEQUENCE:
;       channel, width64, xvec
;
; CALLS:
;	none
;
; INPUTS:
;       Width64
;	
; OPTIONAL INPUTS:
;	none
;
; OUTPUTS:
;       Xvec: The linear channel numbers
;
; OPTIONAL OUTPUTS:
;	none
;
; KEYWORDS:
;	none
; COMMON BLOCKS:
;	none
;
; SIDE EFFECTS:
;	none
;
; RESTRICTIONS:
;	none
;
; PROCEDURE:
;c     This subroutines calculates the uncompressed channel boundaries
;c of the SD detectors.  Note that indexing starts at 0.  Based on Bill
;c Paciesas' memo of 2/11/91.
;c     Input:
;c        width64---a number between 0 and 16 to quantify the variable
;c           width of the 64th channel
;c     Output:
;c        xvec---vector of uncompressed channel boundaries.  Since there
;c           are 256 channels, there are 257 boundaries.
;c
;c Based on IDL procedure written 4/26/91; last modified 10/2/91  DLB
;c
;	none
;
; MODIFICATION HISTORY:
;	Version 2, ras, 7 June 1996, added proper documentation block
;-


pro channel, width64, xvec


	ich = findgen(257)
	xvec= ich
        xvec(65:128) = 2*ich(65:128) - 65.
	xvec(128:192) = 8*ich(128:192) - 833.
	xvec(193:*)  = 32*ich(193:*) - 5441.

	w = float(width64)/16.
        xvec(65:*) = xvec(65:*) + w

return 
end

