12 printf(
"\n\n--------------------------------\n");
13 printf(
"WELCOME TO FITS tutorial #1 !!!!\n");
14 printf(
"--------------------------------\n");
15 printf(
"We're gonna open a FITS file that contains only the\n");
16 printf(
"primary HDU, consisting on an image.\n");
17 printf(
"The object you will see is a snapshot of the NGC7662 nebula,\n");
18 printf(
"which was taken by the author on November 2009 in Barcelona (CATALONIA).\n\n");
20 if (!
gROOT->IsBatch()) {
28 printf(
"ERROR: could not access the HDU\n");
return;
30 printf(
"File successfully open!\n");
38 printf(
"....................................\n");
48 printf(
"....................................\n");
49 printf(
"We can read the image as a matrix of values.\n");
50 printf(
"This feature is useful to do image processing, e.g:\n");
51 printf(
"histogram equalization, custom filtering, ...\n");
60 printf(
"....................................\n");
61 printf(
"Now the primary array will be read both as an image and as a histogram,\n");
62 printf(
"and they will be shown in a canvas.\n");
TMatrixD * ReadAsMatrix(Int_t layer=0, Option_t *opt="")
Read image HDU as a matrix.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
An abstract interface to image processing library.
void Print(const Option_t *opt="") const
Print metadata.
FITS file interface class.
TH1 * ReadAsHistogram()
Read image HDU as a histogram.
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
void Print(Option_t *name="") const
Print the matrix as a table of elements.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
TString & GetKeywordValue(const char *keyword)
Get the value of a given keyword. Return "" if not found.
TImage * ReadAsImage(Int_t layer=0, TImagePalette *pal=0)
Read image HDU as a displayable image.
const char * Data() const