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

double qfits_header_getdouble ( const qfits_header hdr,
const char *  key,
double  errval 

Return the value associated to a key, as a double.

hdr qfits_header to parse
key key to find
errval default value to return if nothing is found
Finds the value associated to the given key and return it as a double. Returns errval if no matching key is found or no value is attached.

Definition at line 756 of file qfits_header.c.

References qfits_header_getstr().

    char    *    c ;

    if (hdr==NULL || key==NULL) return errval ;

    c = qfits_header_getstr(hdr, key);
    if (c==NULL) return errval ;
    return atof(c);

Generated by  Doxygen 1.6.0   Back to index