1 CHANPHA
2 Summary_of_options
	analogue_gain	 - Change analogue gain setting (for EXOSAT ME).
	area		 - Change effective area of the detector.
	background	 - Change background file name.
	bad_chan	 - Indicate channels in grouping card to easy
                           ignore in XSPEC.
	change		 - Change pha_data into pha_per_sec.
	collimator	 - Change collimator efficiency.
	correction	 - Change correction file name.
	csf 		 - Change scaling factor for correction file.
	dbase 		 - Change data base package.
	detid		 - Change detector ID.
	dirback          - Change background file name directory.
	dirresp          - Change response file name directory.
	dircorr          - Change correction file name directory.
	end_time	 - Change end time.
	exit		 - Write new pha file and exit.
	gain_coeff	 - Change gain coefficents (EXOSAT ME, GSPC).
	group		 - Rebin spectrum.
	help		 - Obtain help on CHANPHA options.
	indices		 - Change indices (3 values)
	prefix 		 - Prefix output file name.
	quit		 - Exit program without writing new pha file.
	resolution_coeff - Change resolution coefficents (EXOSAT ME).
	response	 - Change response file name.
	start_time	 - Change start time.
	systematics	 - Create new sytematic error package.
	time		 - Change active integration time.
	write		 - Write new pha file.
	*nbin		 - Change no. of channels in file.
	*nchan		 - Change no. of detector channels (unbinned).
	*pha_data	 -
	*pha_per_sec	 -
	*pha_per_cm2s	 -
	*pha_errors	 - Write your own data (e.g. if data in ascii file)
 
  The commands starting with * are currently under development and will
finally allow the user to read data from an ASCII file into an existing
file in XSPEC format.
  The commands change various entries in different packages in the data
file.
 
2 background
	background <new background file>
	Change entry in the associated files package for the background
file name. This background file will be automatically used by XSPEC when
the PHA file is read in.
3 examples
 background back1 	! Update background file name to be used
			  for background subtraction in XSPEC.
2 bad_chan
	bad_chan <channel ranges>
	Indicate channels in grouping card with a * which can then be
easily ignored in XSPEC with the `ignore bad' command. A zero for the
<channel ranges> resets the grouping card.
3 examples
 bad_chan 1-5 100-** 	! Indicate channels 1-5 and 100 to last channel
                          with a *.
 bad 0                  ! Remove all * from the grouping card.
2 exit
	exit [<new pha file>]
	Write new pha file and exit the program. If no <new pha file>
name is given then the file name given on the command line (when CHANPHA
was started) is used. If no file name for the new pha file is specified
at the command line either, a new version of the old pha file is created.
For the new file the contents of the old file with all the changes made
with CHANPHA is used.
3 examples
 exit newf1		! Create pha file 'newf1.pha' and exit program.
2 group
	group ?
	group min <min counts> <startchan> <stopchan>
	group <startbin> <stopbin> <bin factor>
	Rebin the data and set the grouping card appropriately. A number
of options are available including an interrogation of the current grouping
and two different ways of binning.
 
        group ?
	Write out the current grouping card and the signal/noise in each bin.
 
	group min <min counts> <startchan> <stopchan>
	Rebin the data till all bins have a minimum of <min counts>.
 
	group <startbin> <stopbin> <bin factor>
	Rebin the data by <bin factor> between bins <startbin> and <stopbin>.
3 examples
 group ?                ! shows current binning
 group min 10 20 64     ! adds up (ungrouped) channels in the range 20-64 to 
                          get at least 10 counts per bin
 group 1 64 2           ! adds groups of 2 bins  
2 prefix
	prefix <string>
	Prefix the current output file name with <string> of up to 12
characters.
2 quit
	quit
	Exit the program. No new pha file is created.
2 systematics
	systematics <fraction>
	Create new systematics package which contains <fraction> in each
bin. XSPEC uses then this fraction times the countrate in the data bin.
3 examples
 systematics 0.01	! 1% systematic error.
2 write
	write [<new pha file>]
	Write new pha file. If no <new pha file> name is given then
the file name given on the command line (when CHANPHA was started) is
used. If no file name for the new pha file is specified
at the command line either, a new version of the old pha file is created.
For the new file the contents of the old file with all the changes made
with CHANPHA is used. The current status of the changes is maintained
and more changes can be made to create another pha file.
3 examples
 write newf1		! Create pha file 'newf1.pha'.
 ...			! Make more changes.
 write newf2		! Create pha file 'newf2.pha'. This file includes
			  the changes made on the old pha file to
			  create newf1.pha plus the additional changes made.
2 response
	response <new response file>
	Change entry in the associated files package for the response
file name. This response file will be automatically used by XSPEC when
the PHA file is read in.
3 examples
 response resp1		! Update response file name to be used by XSPEC.
2 correction
	correction <new correction file>
	Change entry in the associated files package for the correction
file name. This correction file will be automatically used by XSPEC when
the PHA file is read in.
3 examples
 correction corr1 	! Update correction file name to be used by XSPEC.
2 dbase
        dbase <source RA><source DEC><Roll><SHF start><SHF end>
        Change entries in the data base package. This package is used by
the EXOSAT data base software to create a spectral data base.
<source RA> and <source DEC> are in degrees. <Roll> is an integer in
degrees. <SHF start> and <SHF end> are integer SHF keys and by default
set to the values from the source info package.
3 examples
 dbase 185.94997 -62.82669     ! Update only source RA and DEC.
 dbase,,,,135978721,135978780  ! Update start and end SHF.
2 dirback
	dirback <new background file directory>
	Change entry in the associated files package for the background
file name. Only the directory of the file name is updated. This background
file will be automatically used by XSPEC when the PHA file is read in.
3 examples
 dirback disk:[dir.back]     ! Update background file name directory.
2 dircorr
	dircorr <new correction file directory>
	Change entry in the associated files package for the correction
file name. Only the directory of the file name is updated. This correction
file will be automatically used by XSPEC when the PHA file is read in.
3 examples
 dircorr disk:[dir.corr]     ! Update correction file name directory.
2 dirresp
	dirresp <new response file directory>
	Change entry in the associated files package for the response
file name. Only the directory of the file name is updated. This response
file will be automatically used by XSPEC when the PHA file is read in.
3 examples
 dirresp disk:[dir.resp]     ! Update response file name directory.
