Open a FITS file whose primary array represents a spectrum (flux vs wavelength)
void FITS_tutorial4()
{
printf("\n\n--------------------------------\n");
printf("WELCOME TO FITS tutorial #4 !!!!\n");
printf("--------------------------------\n");
printf("We're gonna open a FITS file that contains the\n");
printf("primary HDU and a little data table.\n");
printf("The data table is extension #1 and it has 2 rows.\n");
printf("We want to read only the rows that have the column\n");
printf("named DATAMAX greater than 2e-15 (there's only 1\n");
printf("matching row)\n");
printf("Data copyright: NASA\n\n");
}
if (hdu == 0) {
printf("ERROR: could not access the HDU\n"); return;
}
printf("\n\n........................................\n");
printf("Press ENTER to see full table contents (maybe you should resize\n");
printf("\n\n........................................\n");
printf("%lg\n", (*v)[0]);
printf("Does the matched row have DATAMAX > 2e-15? :-)\n");
delete hdu;
}
- Author
- Claudi Martinez
Definition in file FITS_tutorial4.C.