Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
stcc01

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     STCC01 ( STAR catalog type 1, check whether type 1 )

     SUBROUTINE STCC01 ( CATFNM, TABNAM, ISTYP1, ERRMSG )

Abstract

     Check whether a file is a type 1 star catalog and return the
     catalog's table name if it is.

Required_Reading

     EK

Keywords

     None.

Declarations

     IMPLICIT NONE

     INCLUDE 'ekcnamsz.inc'
     INCLUDE 'ektnamsz.inc'
     INCLUDE 'ekglimit.inc'

     CHARACTER*(*)         CATFNM
     CHARACTER*(*)         TABNAM
     LOGICAL               ISTYP1
     CHARACTER*(*)         ERRMSG

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     CATFNM     I   Catalog file name.
     TABNAM     O   Catalog table name.
     ISTYP1     O   .TRUE. when file is type 1 star catalog.
     ERRMSG     O   Error message.

Detailed_Input

     CATFNM   is the name of the catalog file.

Detailed_Output

     TABNAM   is the name of the data table contained in the
              catalog. Set to blank if file is not a type 1 star
              catalog.

     ISTYP1   is .TRUE. when the file is a type 1 star catalog. .FALSE.
              otherwise.

     ERRMSG   is a diagnostic message indicating why the file is
              not a type 1 star catalog. Set to blank if the file
              is a type 1 star catalog.

Parameters

     None.

Exceptions

     1)  If the indicated file cannot be opened, an error is signaled
         by a routine in the call tree of this routine.

     2)  If the indicated file has the wrong architecture version, an
         error is signaled by a routine in the call tree of this
         routine.

     3)  If an I/O error occurs while reading the indicated file, the
         error is signaled by a routine in the call tree of this
         routine.

Files

     This routine checks whether file is really SPICE type 1 star
     catalog file.

     SPICE type 1 star catalog files MUST contain a single data table.
     It can occupy a single segment or it can spread across multiple
     segments. This table MUST include the following columns:

        column name                data type          units
     -------------------------------------------------------
        RA                   DOUBLE PRECISION        DEGREES
        DEC                  DOUBLE PRECISION        DEGREES
        RA_SIGMA             DOUBLE PRECISION        DEGREES
        DEC_SIGMA            DOUBLE PRECISION        DEGREES
        CATALOG_NUMBER       INTEGER
        SPECTRAL_TYPE        CHARACTER*(4)
        VISUAL_MAGNITUDE     DOUBLE PRECISION

     Nulls are not allowed in any of the columns.
     Other columns can also be present in the table but their data
     will NOT be accessible through type 1 star catalog access
     routines. Note that the names and attributes of these additional
     columns must be identical for all segments containing this table.

Particulars

     This routine does not need to be called by the user's program.
     It is used by star catalog loader routines to check
     whether a particular file is a type 1 star catalog before loading
     the file.

Examples

     In the following code fragment, STCC01 is used to determine
     whether a file is a SPICE type 1 star catalog.

     C
     C     Call STCC01 to determine whether the file is type 1 star
     C     catalog file.
     C
           CALL STCC01 ( CATFNM, TABNAM, ISTYP1, ERRMSG )

     C
     C     Check ISTYP1 flag and stop execution and report an
     C     error if file is not type 1 star catalog file.
     C
           IF ( .NOT. ISTYP1 ) THEN
          .   WRITE (*,*) 'The file:'
          .   WRITE (*,*) '  ',CATFNM(1:RTRIM(CATFNM))
          .   WRITE (*,*) 'is not a type 1 star catalog.'
          .   WRITE (*,*) ERRMSG
              STOP
           END IF

Restrictions

     None.

Literature_References

     None.

Author_and_Institution

     J. Diaz del Rio    (ODC Space)
     B.V. Semenov       (JPL)

Version

    SPICELIB Version 1.1.0, 16-AUG-2021 (JDR)

        Added IMPLICIT NONE statement.

        Edited the header to comply with NAIF standard.

    SPICELIB Version 1.0.0, 15-MAY-1996 (BVS)
Fri Dec 31 18:36:57 2021