NAME:
  osidvfit
 PURPOSE:
  Find the linear fit coefficients for a spectrum for each order
 DESCRIPTION:
  The spectrum and a reference to be divided by are input.  The spectrum is
  divided by the reference and this divided spectrum is then filtered for noise
  and deviant points.  A linear fit is then applied to each order of the
  filtered divided spectrum.
 CATEGORY:
  Spectroscopy
 CALLING SEQUENCE:
  osidvfit,calib,divspec
 INPUTS:
  calib    - The calibration information for the spectrum
  spectrum - The spectrum to be fit
  avgspec  - The spectrum to be used as a divisor
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
  BAD - The bad flags associated with the average spectrum
 OUTPUTS:
  fit - The linear fit coefficients for each order; this is in the form of a
        2-d array with the fit[0,i]=yint and fit[1,i]=slope where i is the
        order of the spectrum
 KEYWORD OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  98/06/24 - Written by Chris Dalla Piazza, Lycoming College