>  Docs Center  >  Libraries  >  Buie  >  WRSTARC
Libraries

WRSTARC

WRSTARC

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



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us