NAME:
  ltcrv2c
 PURPOSE:
  2-color lightcurve reductions with known transformation.
 DESCRIPTION:
 CATEGORY:
  Photometry
 CALLING SEQUENCE:
  ltcrv2c,stand,fil,jd,time,am,serial,inst,instsig, $
      doobj,doser,dofil,tran,transig,jdref, $
      color,colorsig, $
      NOPLOT=noplot,FILTNAME=filtname,FILE=file
 INPUTS:
  stand    - String array of standard names.  (See coord.)
  fil      - String array of filter names for observations.
  jd       - Double precision array of the JD of observations.
  time     - Floating point array of the UT time of observations.
  am       - Floating point array of the airmass of observations.
  serial   - Serial number of observation.
  inst     - Instrumental magnitude
  instsig  - Uncertainty of the instrumental magnitude
  doobj    - Name of object to reduce.
  doser    - Serial number of object to reduce.
 The following have one extra dimension relative to LTCRV2 arguments.
  The first dimension is for the first color, the second is for the other.
  dofil    - Name of filter to reduce.
  tran     - Transformation coefficients (2-d vector)
                tran(0,i) = principal extinction coefficient
                tran(1,i) = second order extinction coefficient
                tran(2,i) = color term
                tran(3,i) = zero-point
                tran(4,i) = time-dependent extinction term
                tran[5,i] = (f)  airmass squared term
                tran[6,i] = (g)  color squared term
  transig  - Uncertainty on the transformation coefficients (2-d vector).
  jdref    - Time reference point for extinction
  refcolor - Color reference for the color term transformation.
                 This term is normally C * (B-V) or some other standard
                 color.  This formulation uses
                     C * ( (B-V) - REFCOLOR ) for the term instead.
  refam - Air mass reference for the transformation.
  color    - Starting guess for color of object (default=refcolor)
  colorsig - Starting value for uncertainty of color (default=0.)
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
  BADFLAGS - Array of flags that mark data bad (if true).
  DB       - Flag, if set, tells ltcrv2 to use data base.
  DVERBOSE-  Flag, passed to gettran and other routine to print db queries.
  EPSILON  - Convergence criterion for color, default=0.001 mag
  FILE     - If supplied, the reduced lightcurve will be saved to these files.
  FILTNAME - String name for selected filter, default for 2=V and 3=R.
  NOEDIT   - Flag, if set inhibits final interactive editing of fitted points.
             This keyword has no effect and is not necessary if the current
             plotting device is 'PS'.
  NOPLOT   - Flag, if set, suppresses a plot of the final lightcurve.
  NOSAVE  -  Flag, if true, will inhibit modification of files or databases.
  PLOTWIN -  Plot window to use for output plots (default = current window)
  REFID   -  String uniquely identifying observing run. This is used in 
             updating the data table in the phot database. It must be 
             specified if DB is used.
  TABLE   -  Name of table in MYSQL database to save reduced observations.
                Passed transparently to ltcrv2, which supplies the default.
                Passed transparently to ltcrv2, which supplies the default.
 OUTPUTS:
  color    - Standard system color for object.
  colorsig - Uncertainty on the standard color
 KEYWORD OUTPUT PARAMETERS:
  BADFLAGS - Array of flags that mark data bad (if true).
  JDOBS    - Array of jd for observations that were reduced. 
  NOBS     - Number of obs that were used. This is the sum of
             reduced obs in each filter, but will be zero if the count
             is zero in either filter.
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 96/10/17, Marc W. Buie, Lowell Observatory
  96/01/24, MWB, added BADFLAGS
  97/02/11, MWB, modified to support new LTCRV2 program (k(t))
 2006/10/16, PLC, modified to pass keywords INSTRUMENT, DB and NOSAVE
                  to ltcrv2.
 2006/12/07, PLC, replace instrument keyword by REFID and
                   change calls to dbphot- add keyword TABLE.
 2006/12/10, PLC, forgot a call or two to ltcrv2.
 2006/12/14, MWB, added PLOTWIN keyword.
 2006/12/27, PLC, added DVERBOSE keyword.
 2007/02/05, PLC, added NOBS and JDOBS output keywords- rationalize
                  handling of bad flags and data base scrubbing.
 2014/03/06, MWB, added refcolor and refam (this changes the calling sequence)
                     added support for extra transformation terms
                     non-DB functions are deprecated