ROOT
Version master
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
v6.04
Reference Guide
►
ROOT
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
FITS_tutorial3.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_FITS
3
/// \notebook -draw
4
/// Open a FITS file and retrieve the first plane of the image array
5
/// as a TImage object.
6
///
7
/// \macro_image
8
/// \macro_code
9
/// \macro_output
10
///
11
/// \author Claudi Martinez
12
13
void
FITS_tutorial3
()
14
{
15
// We open a FITS file that contains several image
16
// extensions. The primary HDU contains no data.
17
// Data copyright: NASA
18
19
// Open extensions 1 to 5 from file
20
TString
dir =
gROOT
->GetTutorialDir();
21
22
auto
c
=
new
TCanvas
(
"c1"
,
"FITS tutorial #1"
, 800, 700);
23
c
->Divide(2, 3);
24
for
(
auto
i :
ROOT
::
TSeqI
(1, 6)) {
25
TFITSHDU
hdu
(dir +
"/io/fitsio/sample3.fits"
, i);
26
27
TImage
*
im
= (
TImage
*)
hdu
.ReadAsImage(0);
28
c
->cd(i);
29
im
->Draw();
30
}
31
}
c
#define c(i)
Definition
RSha256.hxx:101
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
gROOT
#define gROOT
Definition
TROOT.h:406
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TFITSHDU
FITS file interface class.
Definition
TFITS.h:35
TImage
An abstract interface to image processing library.
Definition
TImage.h:29
TString
Basic string class.
Definition
TString.h:139
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition
EExecutionPolicy.hxx:4
ROOT::TSeqI
TSeq< int > TSeqI
Definition
TSeq.hxx:203
tutorials
io
fitsio
FITS_tutorial3.C
ROOT master - Reference Guide Generated on Mon Mar 3 2025 04:37:55 (GVA Time) using Doxygen 1.10.0