Use the FTOOLS task 'rbnpha'
cl> ftools
ft> heasarc
edit the parameter file....
infile = "raysm.fits" Please enter PHA filename
outfile = "rs_rebin.fits" Please enter output filename
finchan = 50 Please enter Resultant number of Channels
cmpmode = "linear" Please enter Compression mode
error = "poiss-1" Type of error:
(binfile = "NONE") Please enter binfile
(properr = no) Do you want error propagation calculation?:
(chatter = 9) Please enter chatter flag
(clobber = no) Overwrite output file if it already exists ?
(flpar = no) flush pfile on assign?
(mode = "ql") Mode
Note that the parameter 'finchan' should be a factor of the total number of
channels before rebinning.
he> rbnpha
An ASCII version of the final table in the fits file can be obtained with
'fdump' or on the fly with 'fv'.