void FITS_tutorial5()
{
printf("\n\n--------------------------------\n");
printf("WELCOME TO FITS tutorial #5 !!!!\n");
printf("--------------------------------\n");
printf("We're gonna open a FITS file that contains a\n");
printf("table with 9 rows and 8 columns. Column 4 has name\n");
printf("'mag' and contains a vector of 6 numeric components.\n");
printf("The values of vectors in rows 1 and 2 (column 4) are:\n");
printf("Row1: (99.0, 24.768, 23.215, 21.68, 21.076, 20.857)\n");
printf("Row2: (99.0, 21.689, 20.206, 18.86, 18.32 , 18.128 )\n");
printf("WARNING: when coding, row and column indices start from 0\n");
}
if (hdu == 0) {
printf("ERROR: could not access the HDU\n"); return;
}
for (int iVec=0; iVec < 2; iVec++) {
printf("Vector %d = (", iVec+1);
v = vecs[iVec];
if (i>0) printf(", ");
printf("%lg", (*v)[i]);
}
printf(")\n");
}
printf("\nBONUS EXAMPLE: we're gonna dump all rows using\n");
printf("the function GetTabRealVectorCells()\n");
printf("Vector %d = (", iVec+1);
v = (
TVectorD *) (*vectorCollection)[iVec];
if (i>0) printf(", ");
printf("%lg", (*v)[i]);
}
printf(")\n");
}
delete vecs[0];
delete vecs[1];
delete vectorCollection;
delete hdu;
}