NEP 2.7.0
NetCDF Extension Pack
Loading...
Searching...
No Matches
fitsdispatch.h
Go to the documentation of this file.
1
9#ifndef _FITSDISPATCH_H
10#define _FITSDISPATCH_H
11
12#include "config.h"
13#include "ncdispatch.h"
14#include "nep.h"
15
16/* Include CFITSIO header if available */
17#ifdef HAVE_FITS
18#include <fitsio.h>
19#endif
20
22#ifdef NC_FORMATX_UDF3
23#define NC_FORMATX_NC_FITS NC_FORMATX_UDF3
24#else
25#define NC_FORMATX_NC_FITS NC_FORMATX_UDF0
26#endif
27
29#define FITS_MAGIC_LEN 6
30
38
40typedef struct NC_FITS_FILE_INFO
41{
42#ifdef HAVE_FITS
43 fitsfile *fptr;
44#else
45 void *fptr;
46#endif
47 char *path;
50
51#if defined(__cplusplus)
52extern "C" {
53#endif
54
55 extern int
56 NC_FITS_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
57 void *parameters, const NC_Dispatch *, int);
58
59 extern int
60 NC_FITS_abort(int ncid);
61
62 extern int
63 NC_FITS_close(int ncid, void *ignore);
64
65 extern int
66 NC_FITS_inq_format(int ncid, int *formatp);
67
68 extern int
69 NC_FITS_inq_format_extended(int ncid, int *formatp, int *modep);
70
71 extern int
72 NC_FITS_get_vara(int ncid, int varid, const size_t *start, const size_t *count,
73 void *value, nc_type);
74
75 extern NC_Dispatch*
77
78 extern int
79 NC_FITS_finalize(void);
80
81#define FITS_INIT_OK() (NC_FITS_initialize() != NULL)
82#define FITS_INIT_AND_ASSIGN(ret) do { \
83 (ret) = (NC_FITS_initialize() != NULL) ? NC_NOERR : NC_EINVAL; \
84 } while(0)
85
86 extern const NC_Dispatch *FITS_dispatch_table;
87
88#if defined(__cplusplus)
89}
90#endif
91
92#endif /* _FITSDISPATCH_H */
int NC_FITS_get_vara(int ncid, int varid, const size_t *start, const size_t *count, void *value, nc_type)
Definition fitsfile.c:1229
int NC_FITS_open(const char *path, int mode, int basepe, size_t *chunksizehintp, void *parameters, const NC_Dispatch *, int)
Definition fitsfile.c:938
NC_Dispatch * NC_FITS_initialize(void)
Definition fitsdispatch.c:131
int NC_FITS_inq_format(int ncid, int *formatp)
Definition fitsfile.c:1138
const NC_Dispatch * FITS_dispatch_table
Definition fitsdispatch.c:116
int NC_FITS_abort(int ncid)
Definition fitsfile.c:1091
int NC_FITS_finalize(void)
Definition fitsdispatch.c:146
struct NC_FITS_VAR_INFO NC_FITS_VAR_INFO_T
int NC_FITS_close(int ncid, void *ignore)
Definition fitsfile.c:1043
int NC_FITS_inq_format_extended(int ncid, int *formatp, int *modep)
Definition fitsfile.c:1157
struct NC_FITS_FILE_INFO NC_FITS_FILE_INFO_T
NetCDF Extension Pack (NEP) - Public API.
Definition fitsdispatch.h:41
int num_hdus
Definition fitsdispatch.h:48
char * path
Definition fitsdispatch.h:47
void * fptr
Definition fitsdispatch.h:45
Definition fitsdispatch.h:33
int col_num
Definition fitsdispatch.h:35
int hdu_num
Definition fitsdispatch.h:34
int col_width
Definition fitsdispatch.h:36