qfitsdumper Struct Reference
qfits dumper control object
More...
Detailed Description
qfits dumper control object
This structure offers various control parameters to dump a pixel buffer to a FITS file. The buffer will be dumped as requested to the requested file in append mode. Of course, the requested file must be writeable for the operation to succeed.
The following example demonstrates how to save a linear ramp sized 100x100 to a FITS file with BITPIX=16. Notice that this code only dumps the pixel buffer, no header information is provided in this case.
int i, j ;
int * ibuf ;
qfitsdumper qd ;
ibuf = malloc(100 * 100 * sizeof(int));
for (j=0 ; j<100 ; j++) {
for (i=0 ; i<100 ; i++) {
ibuf[i+j*100] = i+j ;
}
}
qd.filename = "out.fits" ;
qd.npix = 100 * 100 ;
qd.ptype = PTYPE_INT ;
qd.ibuf = ibuf ;
qd.out_ptype = BPP_16_SIGNED ;
qfits_pixdump(&qd);
free(ibuf);
If the provided output file name is "STDOUT" (all capitals), the function will dump the pixels to the stdout steam (usually the console, could have been re-directed).
Field Documentation
|
Pointer to input double pixel buffer |
|
Pointer to input float pixel buffer |
|
Name of the file to dump to, "STDOUT" to dump to stdout |
|
Pointer to input integer pixel buffer |
|
Number of pixels in the buffer to dump |
|
Requested BITPIX in output FITS file |
|
Buffer type: PTYPE_FLOAT, PTYPE_INT or PTYPE_DOUBLE |
The documentation for this struct was generated from the following file: