NAME:
  wrstarc
 PURPOSE:
  Write a binary version of a star catalog.
 DESCRIPTION:
  Writes a star catalog file.  This routine is coupled with rdstarc and
    starcprmt and only knows how to write most recent version of the binary
    catalog file.
 CATEGORY:
  File I/O
 CALLING SEQUENCE:
  wrstarc,file,nstars,ra,dec,bmag,rmag
 INPUTS:
  file    - File name for saving star catalog data.
  nstars  - Number of stars in the catalog.  This is provided so that you 
               can specify zero.  If nstars=0 then the rest of the inputs
               are ignored.
  ra      - J2000 RA of stars (radians)
  dec     - J2000 Dec of stars (radians)
  bmag    - blue magnitude
  rmag    - red magnitude
 OPTIONAL INPUT PARAMETERS:
 KEYWORD INPUT PARAMETERS:
 OUTPUTS:
 KEYWORD OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
   Writes this version of file:

   v1.0  Version line at the start:   STARC v1.0
         Binary format in big endian order. 
         The version line is a 10 byte string.
         Next is a longword giving number of stars, >= 0.
         This is followed by two double vectors for ra and dec, then float
            vectors for bmag and rmag.

   v1.1  Version line at the start:   STARC v1.1
         Binary format in big endian order. 
         The version line is a 10 byte string.
         Next is a longword giving number of stars, >= 0.
         Next is a double scalar with the catalog equinox (in years)
         Next is a double scalar with the catalog epoch (in years)
         This is followed by two double vectors for ra and dec, then float
            vectors for bmag and rmag., then two double vectors for ra and dec
            proper motion.

         Proper motion is encoded as radians/year and the ra proper motion does
            not include cos(dec) so that:
             RA(t) = RA0 + RPM*(t-epoch) where RA0 is the value in the catalog
             Dec(t) = Dec0 + DPM*(t-epoch)
         everything is in radians and radians/year

 MODIFICATION HISTORY:
  2012/07/15, Written by Marc W. Buie, Southwest Research Institute,
                 separated out from starcprmt.pro
  2016/09/20, MWB, added version 1.1 for proper motion support
  2018/05/07, MWB, changed to push G instead of rp for the red mag