Rebin and Define Scale :



This routine allows a user to define a new wavelength grid and to rebin the prime AAR onto this grid. Here we explain the various rebin options and then give a detailed description of the rebinning algorithm.  We will refer to (wavelength, flux), or (x, y) interchangeably.
Depending on the AOT type, some of the scan, detector, line, and scan-direction buttons will be preselected for the user's convenience.  The user may override these selections.  When any of these buttons is selected, then the rebinning will be performed across the data ignoring the corresponding tags. When the buttons are not selected, data will be rebinned separately.
An Example: Suppose the selected data has three scans for each of ten detectors and only one value for the lines and scan-directions tags. Then only the scan and detector buttons will appear and the user has four different ways to rebin this data.  First, if both buttons are not turned on, then thirty rebinned spectra will appear corresponding to each scan from each detector.  Second, if only the scan button is selected, then the scans corresponding to each detector are rebinned together such that ten spectra (one for each detector) are produced. Third, if only the detector button is pressed, then for each scan, all the detector data will be rebinned together; hence, only three spectra results corresponding to each scan. Finally, when the both button are turned on, then only one spectrum appears because all the scan and detector data are rebinned together.
Resolution is defined as lambda/delta-lambda.

One or two lists of the wavelengths found in the input data are shown under the define scale option so that the user may easily select (by clicking) a new starting or stopping wavelength for the grid.

epsilon is used to eliminate multiple x-values as discussed below.