NAME:
  gtrans
 PURPOSE:   (one line only)
  Transform from Gaia (G,GB,GR) magnitudes to another standard bandpass
 DESCRIPTION:
  Transformation is handled with a simple formula:
    mag-g = c[1]*(gb-gr) + c[0]
  where c is the coefficient array returned.  The input arrays should all
  be the same length and be correlated arrays for the same source.  This
  routine assumes the uncertainty on the Gaia photometry is negligible
  compared to the standard magnitude.
  This tool needs lots of stars to do any good.
 CATEGORY:
  Photometry
 CALLING SEQUENCE:
  gtrans,mag,err,g,gb,gr,thresh,c,csig
 INPUTS:
  mag - Standard magnitudes in another system (eg., B or V)
  err - Uncertainty in the standard magnitude
  g   - Gaia G magnitude
  gb  - Gaia GB magnitude
  gr  - Gaia GR magnitude
  thresh - sigma cutoff for bad point filtering
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
  BAD - array of bad flags (modified and returned), default is all points
        are good
 OUTPUTS:
  c   - Fitted coefficients
  csig - uncertainties on the coefficients
 KEYWORD OUTPUT PARAMETERS:
 CONFIGURATION:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written by Marc W. Buie, Southwest Research Institute, 2024/07/24