Logo Search packages:      
Sourcecode: qfits version File versions  Download package

int qfits_is_table ( const char *  filename,
int  xtnum 
)

Identify a file as containing a FITS table in extension.

Parameters:
filename Name of the FITS file to examine.
xtnum Extension number to check (starting from 1).
Returns:
int 1 if the extension contains a table, 0 else. Examines the requested extension and identifies the presence of a FITS table.

Definition at line 99 of file qfits_table.c.

References qfits_pretty_string(), and qfits_query_ext().

Referenced by qfits_table_open().

{
    char    *    value ;
    int            ttype ;
    
    ttype = QFITS_INVALIDTABLE ;
    value = qfits_query_ext(filename, "XTENSION", xtnum);
    if (value==NULL) return ttype ;
    
    value = qfits_pretty_string(value);
    if (!strcmp(value, "TABLE")) {
        ttype = QFITS_ASCIITABLE;
    } else if (!strcmp(value, "BINTABLE")) {
        ttype = QFITS_BINTABLE;
    }
    return ttype;
}    


Generated by  Doxygen 1.6.0   Back to index