These are release notes for FTOOLS v4.0, released 17 June, 1997. In this
document we discuss the new tools and scripts in v4.0 and highlight the
major changes since v3.6.

The FTOOLS now has a full suite of GUI based tools written in Tcl/Tk.
One or more of them could make your life much easier, so check them out.
Note: the FTOOLS tar file contains everything you need to run these tools
(including a specially "tuned" version of Tcl/Tk, you do *not* need to
have Tcl/Tk built separately from the FTOOLS).  Individual tools include:

FLAUNCH - This powerful yet easy to learn customizable graphical interface 
          to all of the FTOOLS is new with this release.  It enables the
          user to call any FTOOL or task, edit its parameter files, and
          examine the output. FLAUNCH provides extensive on-line help on
          its own capabilities, as well as providing context sensitive
          help on any task being examined.  There's even an IRAF epar
          emulation mode for those who want it.

          FLAUNCH can be called either with a specific task name
          (e.g. 'flaunch saextrct') providing a parameter editing window
          for just that task, or as a standalone GUI (e.g. 'flaunch &'). 
          In the latter case, FLAUNCH provides a complete FTOOLs
          environment allowing the user to run multiple FTOOLs and examine
          the output from each executed task in real-time, in either
          their own terminal window or via an output log file. Users
          may run tools in the background while running others in the
          foreground, and can input information interactively where
          necessary (e.g. when calling FPLOT) . Future versions of FLAUNCH
          will allow users to create and submit interactive scripts.


XSELECT2 - Also new to this release, the successor to the command-line driven 
           xselect, the new xselect2 is the primary GUI interface for
           HEASARC mission-specific data  analysis.  Currently it only
           supports XTE but more missions are on the way.  See the XTE
           GOF web pages for more info. 

FV2.0 -  This is a major upgrade over fv1.0 (released with FTOOLS3.6).
         fv now has a much more capable and intuitive plotting and
         image display interface (with online help).  fv also now
         allows you to edit table and keyword values from the
         spreadsheet interface.  It's also much faster. 




For each of the FTOOLS subpackages below we list the tools which are new
to v4.0 and briefly describe the major changes to preexisting tools. For
more information on any FTOOL type "fhelp " once you've installed
the package. "fhelp ftools" will provide a full listing of all the tools
available in v4.0, while "fhelp " lists all of the tools in
that package.

                          ===== ASCA =====

(*) For complete details and up-to-date information on using FTOOLS v4.0 
    to analyze ASCA data, please refer to:

        http://heasarc.gsfc.nasa.gov/docs/asca/ahp_proc_analysis.html

===> New since v3.6 <===
ADDASCASPEC -- [PERL] Combine ASCA spectral files
ASCARAY -- ASCA mirror ray tracing program
CORRECTRDD -- Apply RDD correction to ASCA SIS FAINT, BRIGHT or BRIGHT2 data

===> Major changes since v3.6 <===
ASCAARF (*)
ASCAEFFMAP (*)
ASCASCREEN (*)
SISRMG (*)
GHKCURVE (*)

                          ===== CALTOOLS =====


===> New since v3.6 <===
GENRSP -- Generic spectral response generator
MUDCIF -- Many updates to a Calibration Index File (CIF)

===> Major changes since v3.6 <===
ADDRMF 
Extra option added so that instead of ascii filename user can also type
input filenames at the prompt, and if this is the case, then user is
asked for weight factors

ADDARF
Extra option added so that instead of giving file names, user can also
input '@filename', where filename is an ascii file containing files to be
added and factor(weight) e.g., if file1, file2 to be added with factors
1, 4 (as file1*1 with file2*4) then input file should have two lines as:
   file1 1.0
   file2 4.0


                          ===== FIMAGE =====

===> New since v3.6 <===
FIMGMERGE -- Merge any number of FITS image files
FIMGSTAT -- Compute statistics for a FITS image file
FIMGTRIM -- Reset pixels to a constant value relative to a threshold

===> Major changes since v3.6 <===
FIMGCREATE 
Option for input ascii file to be 'none'/'NONE' and the tool creates an
empty image file with pixel values 0.0
FREGCON
Bugs fixed; the tool now works!


                          ===== FUTILS =====

===> New since v3.6 <===
FDELCOL -- Delete a specified column in a FITS table
FDELHDU -- Delete an extension from a FITS file
FDELROW -- Delete specified rows in a FITS table
FPARHELP -- [PERL] Print help for specific parameter of a given FTOOL
FSCRIPT -- [PERL] General script-writing tool

FSCRIPT is a flexible tool to assist users in writing their own scripts
to run Ftools and/or operating system commands. When run, FSCRIPT
prompts the user for commands, and (if a command is an Ftool) for the
appropriate parameters. FSCRIPT then generates a child script, also in
Perl, which contains the user's commands in a simple, self-explanatory
macro syntax. Using these macros, a user may edit the child script,
modify or add commands, without any knowledge of Perl. Experienced Perl
users may also augment the child script with their own Perl code. When
the child script is finally run, it expands the macros into operating
system calls, then runs the resulting script. 

FSCRIPT is in final testing and will be available soon after the release
of Ftools v4.0.


===> Major changes since v3.6 <===
FTABCOPY 
Row option is added. That is, user is given option to define row numbers
as in other utility tools such as fdump.
FFILECAT
No longer requires filenames to be < 100 characters.


                          ===== GRO =====

===> New since v3.6 <===
ECONVPHA -- Convert EGRET .spec files to XSPEC .pha files
ECONVRMF -- Convert EGRET .resp files to XSPEC .rmf files
                      

                          ===== HEASARC =====
===> New since v3.6 <===
CHKARF -- Check validity of keywords for an ARF FITS file to be input to XSPEC
CHKPHA -- Check validity of keywords for a PHA/PI FITS file to be input to XSPEC
CHKRMF -- Check validity of keywords for a RMF FITS file to be input to XSPEC
MEKAL -- Generates an XSPEC table file for the MEKAL plasma emission model
NH -- Return hydrogen column density for a given RA and Dec
RAYSMITH -- Generates an XSPEC table file for the Raymond-Smith emission model

===> Major changes since v3.6 <===
RBNPHA (*)
Now follows the channel numbering convention of the input file


                          ===== ROSAT =====

===> New since v3.6 <===
AO -- Evaluate geometrical variation of the scattered solar X-ray background
DETECT -- Detect sources at or above a given significance and count rate
TILT -- Evaluate the nominal scattered solar X-ray  background
LTE -- Evaluate the polynomial fit made by RATEFIT routine
RATE -- Create light curves binned on 30-s intervals for the seven bands
RATEFIT -- Fit PSPC light curves in seven broad pulse-height bands
SRCDETECT -- [PERL] ROSAT source detection; runs XSELECT and then DETECT


                          ===== TIME =====

===> Major changes since v3.6 <===
DEADTIME 
1. gtifile parameter hidden (%) and GTI is searched for in the infile 
   when the gtifile is "%".
2. allow input for multiple MKF files rather than one

                              ===== XTE =====

For complete details and up-to-date information on using FTOOLS v4.0 
to analyze RXTE data, please refer to:

  http://heasarc.gsfc.nasa.gov/docs/xte/xhp_proc_analysis.html

===> New since v3.6 <===
ASMCHANNEL -- [PERL] Separate ASM color file by energy channel
FASEBIN -- Bin RXTE observations of a periodic signal into a 2-d histogram (fB)
FBADD -- Add several commensurate fB files together
FBFSUM -- Average fB files in phase, by summing rows together
FBSSUM -- Average fB files in energy and perform phase analysis
FBSUB -- Subtract a baseline (unpulsed contribution) from a fB histogram
HXTARF -- Compute and apply HEXTE collimator response to produce a .arf file
HXTBACK -- [PERL] Separate HEXTE science or hk files by cluster position
HXTDEADLC -- Correct HEXTE light curve from clock time to live time
HXTDEADPHA -- Correct HEXTE .pha file from clock time to live time
MKGTIF -- Create GTI extension file for HEXTE data
RECOFMI -- Reconstruct RXTE master index files (FMI)
XTECOL -- Create collimator corrected light curve for input XTE light curve
XSELECT2 - Perform (standard mode 2) XTE PCA analysis

PHASE BINNING TOOLS (fasebin, fbadd, fbsub, fbfsum, fbssum)
New tools to bin events from a periodic source in both time (phase)
and energy, thus allowing phase-resolved spectroscopy, as well as
multi-spectral periodic light curve analysis.  These tools can apply
barycenter and binary orbit corrections, and can handle PCA data in a
variety of data modes, HEXTE data in event mode.  The default timing
ephemeris is obtained from the radio pulsar database.

  *fasebin* is the main tool.  It extracts the two-dimensional
  phase-energy histogram from the raw data and formats it into a single
  .pha file containing multiple spectra (one for each phase bin,
  preserving the phase information), according to the OGIP Type II
  Spectral File standard.  Spectral files produced by fasebin may be
  read into XSPEC 10.0 or higher.

  A suite of additional new tools (*fbadd, fbsub, fbfsum, fbssum*),
  allows adding observations together, subtracting non-periodic
  emission, and creating phase-vs-energy histograms, among other
  options.

*XSELECT2*
This release includes a first look at xselect2.  Xselect2 will help you do
Standard mode 2 PCA analysis.  It implements the "Reduction and Analysis of
PCA Spectra" from the RXTE Data Analysis Cookbook.

===> Major changes since v3.6 <===
PCARSP (v2.31)
1) Three command line options have been added to override some default
settings:
  a) The default naming scheme for the final .rsp file has been altered
for cases in which not all detectors are used, but are added together.
The default name now explicitly lists the pcu's in such cases.  The "pca"
designation is reserved for when all 5 pcu's are added. The user may
override the default name given to the final .rsp file using the -n
command line input.
  b) The date of the observation is now taken from the header of the
input pha file.  The user may override this date using the -d command
line input.
  c) Using the -e option, the user may now specify an energy-to-channel
calibration file which is resident on a local disk rather than having
it fetched from the calibration database (e.g. caldb).

2) The option for using the crab-fixing efficiencies in pcarmf have
been removed.  In v2.1.2 of pcarmf, this now requires the user to supply
his/her own file with modified areas.  We now consider this an expert
feature.  Interested users should contact the GOF or the PCA team.

3) When used with pcarmf v2.1.2, users may now create a matrix for the
propane layer.

4) Lower case is now accepted when specifying the layer anodes.

5) Bug fixes include better cleaning up of the unnecessary files, allowing
the calls to pcarmf, marfrmf, xpcaarf and gcorrmf to overwrite existing
output files, and proper calling of gcorrmf when pcarsp runs pcagainset.

PCARMF (v2.1.2)
This version of pcarmf includes a number of changes and enhancements.
Note that it should be used with the calibration file pca_e2c_e03v03.fits.

1) The supported energy-to-channel model is now 3.  This model first
translates the energy of the photon into the number of secondary
electrons, and then allows a quadratic fit for channel number as a
function of number of electrons.  The x-axis (number of electrons) is
renormalized to be approximately the energy for convenience for plotting
inside xspec.

2) Propane matrices may now be created, and are individually generated
for each PCU to account for the different PCU gains.  The normalization
of propane response to xenon response is unexpected (i.e. not 1).
Users are advised to let the normalization of the propane layer float
relative to other layers for the time being.

3) The default areas have been removed for the crab-fixing efficiency
adjustments.  Hence, to utilize the scale_hack parameter, the user must
now supply his/her own file (using the scale_file parameter) giving the
area adjustments.

4) Parameters used to calculate the response matrix are now written as
HISTORY keywords to the extension header.  These include many of the
hidden pcarmf parameters.

PCABACKEST (v1.5)
- Can really search calibration database for background models.
- Some HISTORY records in the FITS header.
- Allows filter files to be a little short.
- Correctly sets the GAINAPP keyword.
- Supports various improvements in the model file format.


                       ===== XSELECT/EXTRACTOR =====

XSELECT (*)
Now supports SAX LECS and MECS. Uses new extractor (see below).  Does an
fmemsort after "extract events" when working with multiple event files
to ensure that output events file is time-ordered. New option "set image
raw" uses raw coordinates.

EXTRACTOR (*)
The program that was run by xselect is now available as a stand-alone
ftool. A number of bugs have been fixed in region filtering. Dynamic
memory is used.

(*) For complete details and up-to-date information on using FTOOLS v4.0 
    to analyze ASCA data, please refer to:

       http://heasarc.gsfc.nasa.gov/docs/asca/ahp_proc_analysis.html