00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <string.h>
00010 #include <stdio.h>
00011 #include <stdlib.h>
00012 #include "fitsio.h"
00013 #include "cfitsio.h"
00014
00015
00016
00017
00018 int main()
00019 {
00020
00021 CFITSIO_KEYWORD* keys = NULL;
00022 void* image = NULL;
00023 char* header = NULL;
00024
00025
00026 cfitsio_read_keys("image_1.fits", &keys);
00027 cfitsio_print_keys(keys);
00028
00029
00030
00031 cfitsio_read_header("hmi_image_1.fits", &header);
00032 cfitsio_print_header(header);
00033
00034
00035 cfitsio_read_image("hmi_image_1.fits", &image);
00036
00037
00038
00039
00040 cfitsio_write_file("hmi_image_1_out.fits", header, image, C_NONE);
00041
00042
00043 cfitsio_write_file("hmi_image_1_defautl.fits", header, image, C_DEFAULT);
00044
00045
00046 cfitsio_write_file("hmi_image_1_r.fits", header, image, C_RICE);
00047
00048
00049 cfitsio_write_file("hmi_image_1_c.fits[compress R 100, 100]", header, image, C_EXTENDED_FILENAME);
00050
00051
00052 if(header) free(header);
00053 if(image) free(image);
00054 if(keys) free(keys);
00055
00056 return(0);
00057 }