00001
00002 /*---------------------------------------------------------------------------
00003 E.S.O.
00004 ----------------------------------------------------------------------------
00005 File name : simple.h
00006 Author : Nicolas Devillard
00007 Created on : January 1999
00008 Language : ANSI C
00009 Part of ECLIPSE library
00010 Description : simple FITS access routines
00011 *--------------------------------------------------------------------------*/
00012
00013 /*
00014
00015 $Id: simple.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00016 $Author: amodigli $
00017 $Date: 2003/09/03 12:50:47 $
00018 $Revision: 1.1 $
00019
00020 */
00021
00022 #ifndef _SIMPLE_H_
00023 #define _SIMPLE_H_
00024
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028
00029 /*---------------------------------------------------------------------------
00030 Includes
00031 ---------------------------------------------------------------------------*/
00032
00033 #include <stdio.h>
00034 #include <stdlib.h>
00035 #include <string.h>
00036
00037 #include "mmap_i.h"
00038 #include "memstr.h"
00039
00040 /*---------------------------------------------------------------------------
00041 Defines
00042 ---------------------------------------------------------------------------*/
00043
00044 #define FITS_UNKNOWN 0
00045 #define FITS_BOOLEAN 1
00046 #define FITS_INT 2
00047 #define FITS_FLOAT 3
00048 #define FITS_COMPLEX 4
00049 #define FITS_STRING 5
00050
00051 /* The offsets to add to C-style indexes to obtain FITS coordinates */
00052 #define FITS_OFS_X 1
00053 #define FITS_OFS_Y 1
00054
00055 /* Default name of a place holder, as a character string */
00056 #define FITS_PLACEHOLDER "PLACEHOLDER"
00057
00058
00059 /*---------------------------------------------------------------------------
00060 Function codes
00061 ---------------------------------------------------------------------------*/
00062
00063
00064 /*-------------------------------------------------------------------------*/
00089 /*--------------------------------------------------------------------------*/
00090
00091 char *
00092 query_fits_header(char * filename, char * keyword) ;
00093
00094
00095
00096 /*-------------------------------------------------------------------------*/
00109 /*--------------------------------------------------------------------------*/
00110
00111 char *
00112 query_fits_xtension(char * filename, char * keyword, int xtnum);
00113
00114
00115
00116 /*-------------------------------------------------------------------------*/
00127 /*--------------------------------------------------------------------------*/
00128
00129 int query_fits_n_ext(char * filename);
00130
00131
00132
00133 /*-------------------------------------------------------------------------*/
00155 /*--------------------------------------------------------------------------*/
00156
00157 char * fits_pretty_string(char * s);
00158
00159
00160 /*-------------------------------------------------------------------------*/
00170 /*--------------------------------------------------------------------------*/
00171 int fits_is_boolean(char * s);
00172
00173
00174 /*-------------------------------------------------------------------------*/
00184 /*--------------------------------------------------------------------------*/
00185 int fits_is_int(char * s);
00186
00187
00188 /*-------------------------------------------------------------------------*/
00198 /*--------------------------------------------------------------------------*/
00199 int fits_is_float(char * s);
00200
00201
00202 /*-------------------------------------------------------------------------*/
00212 /*--------------------------------------------------------------------------*/
00213 int fits_is_complex(char * s);
00214
00215
00216 /*-------------------------------------------------------------------------*/
00226 /*--------------------------------------------------------------------------*/
00227 int fits_is_string(char * s);
00228
00229
00230
00231 /*-------------------------------------------------------------------------*/
00253 /*--------------------------------------------------------------------------*/
00254 int fits_get_type(char * s);
00255
00256
00257
00258 /*-------------------------------------------------------------------------*/
00269 /*--------------------------------------------------------------------------*/
00270
00271 size_t fits_get_header_size(char * name);
00272
00273
00274
00275 /*-------------------------------------------------------------------------*/
00288 /*--------------------------------------------------------------------------*/
00289
00290 size_t fits_get_offset_to_xtension_hdr(char * name, int xtnum);
00291
00292
00293
00294 /*-------------------------------------------------------------------------*/
00307 /*--------------------------------------------------------------------------*/
00308
00309 size_t fits_get_offset_to_xtension_data(char * name, int xtnum);
00310
00311
00312
00313 /*-------------------------------------------------------------------------*/
00327 /*--------------------------------------------------------------------------*/
00328
00329 char * query_card_in_header(char * filename, char * keyword);
00330
00331
00332
00333 /*-------------------------------------------------------------------------*/
00350 /*--------------------------------------------------------------------------*/
00351
00352 int fits_replace_card(
00353 char * filename,
00354 char * keyword,
00355 char * substitute
00356 ) ;
00357
00358
00359 /*-------------------------------------------------------------------------*/
00378 /*--------------------------------------------------------------------------*/
00379
00380 int fits_replace_placeholder(
00381 char * filename,
00382 char * placeholder,
00383 char * substitute
00384 );
00385
00386
00387 #ifdef __cplusplus
00388 }
00389 #endif
00390
00391 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001