Commit c82682ce350a13ef732a53d0b218dab641e8d9f6

Authored by knodlseder
1 parent e2281f5f

update for ctatools-00-02-03

doc/html/about.html
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2   -<html>
3   -<head>
4   -
5   - <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
6   - <title>About</title>
7   -
8   -
9   - <link rel="stylesheet" type="text/css" media="screen,print" href="ctatools.css">
  2 +<html><head>
  3 +<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>About</title>
10 4  
  5 +<link rel="stylesheet" type="text/css" media="screen,print" href="ctatools.css">
11 6 </head>
12 7  
13   -
14 8 <body>
15   -
16 9 <p class="Header">About</p>
17   -
18 10 <p style="padding-top: 0pt; text-align: left;" class="Body">ctatools
19 11 are a set of ftools-like executables needed for the scientific analysis
20 12 of Cherenkov Telescope Array data. ctatools are based on GammaLib, a
21 13 versatile toolbox for the high-level analysis of
22 14 astronomical gamma-ray data.</p>
23   -
24 15 <br>
25   -
26 16 <p style="padding-top: 0pt; text-align: left;" class="Body">ctatools
27 17 are&nbsp;implemented in C++ and are fully scriptable using the
28 18 Python scripting language.</p>
29   -
30 19 <br>
31   -
32 20 <p style="padding-top: 0pt; text-align: left;" class="Body">The
33 21 ctatools development is led by the Insitut de Recherche en
34 22 Astrophysique et Plan&eacute;tologie
35 23 (IRAP), a mixed CNRS / Universit&eacute; Paul Sabatier laboratory
36 24 in Toulouse, France.</p>
37   -
38 25 <br>
39   -
40   -<br>
41   -
42   -</body>
43   -</html>
  26 +<hr size="1">
  27 +<p class="Body">Last updated by: J&uuml;rgen
  28 +Kn&ouml;dlseder 9 July
  29 +2011
  30 +</p>
  31 +</body></html>
44 32 \ No newline at end of file
... ...
doc/html/documentation.html
... ... @@ -2,7 +2,8 @@
2 2 <html><head>
3 3 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Documentation</title>
4 4  
5   -<link rel="stylesheet" type="text/css" media="screen,print" href="ctatools.css"></head>
  5 +<link rel="stylesheet" type="text/css" media="screen,print" href="ctatools.css">
  6 +</head>
6 7 <body>
7 8 <p class="Header">Documentation</p>
8 9 <br>
... ... @@ -17,8 +18,8 @@ references
17 18 </ul>
18 19 <br>
19 20 <hr size="1">
20   -<p class="Body">Last updated by: J&uuml;rgen Kn&ouml;dlseder 8 March
  21 +<p class="Body">Last updated by: J&uuml;rgen
  22 +Kn&ouml;dlseder 8 March
21 23 2011
22 24 </p>
23   -<br>
24 25 </body></html>
25 26 \ No newline at end of file
... ...
doc/html/download.html
... ... @@ -7,8 +7,8 @@
7 7 <body>
8 8 <p class="Header">Download</p>
9 9 <p style="padding-top: 0pt; text-align: left;" class="Body">
10   -The latest ctatools release is <a href="releases/ctatools-00-02-01.tar.gz">ctatools-00-02-01</a>
11   -(February 24, 2011).</p>
  10 +The latest ctatools release is <a href="releases/ctatools-00-02-01.tar.gz">ctatools-00-02-03</a>
  11 +(July 9, 2011).</p>
12 12 <br>
13 13 <br>
14 14 <p class="Header">Latest release</p>
... ... @@ -19,14 +19,36 @@ and gammalib versions.&lt;/p&gt;
19 19 <tbody>
20 20 <tr class="Body">
21 21 <td>ctatools</td>
22   -<td><a href="releases/ctatools-00-02-01.tar.gz">00-02-01</a></td>
  22 +<td>gammalib</td>
23 23 </tr>
24 24 <tr class="Body">
  25 +<td><a href="releases/ctatools-00-02-03.tar.gz">00-02-03</a></td>
  26 +<td><a href="releases/gammalib-00-04-09.tar.gz">00-04-09</a></td>
  27 +</tr>
  28 +</tbody>
  29 +</table>
  30 +<br>
  31 +<br>
  32 +<p class="Header">Older releases</p>
  33 +<p style="padding-top: 0pt; text-align: left;" class="Body">At
  34 +this early stage of the project there is a strict link between ctatools
  35 +and gammalib versions.</p>
  36 +<table style="text-align: left; width: 200px;" border="1" cellpadding="2" cellspacing="2">
  37 +<tbody>
  38 +<tr class="Body">
  39 +<td>ctatools</td>
25 40 <td>gammalib</td>
  41 +</tr>
  42 +<tr class="Body">
  43 +<td><a href="releases/ctatools-00-02-01.tar.gz">00-02-01</a></td>
26 44 <td><a href="releases/gammalib-00-04-07.tar.gz">00-04-07</a></td>
27 45 </tr>
28 46 </tbody>
29 47 </table>
30   -<p style="padding-top: 0pt; text-align: left;" class="Body"></p>
31   -<p style="padding-top: 0pt; text-align: left;" class="Body"></p>
  48 +<br>
  49 +<hr size="1">
  50 +<p class="Body">Last updated by: J&uuml;rgen
  51 +Kn&ouml;dlseder 9 July
  52 +2011
  53 +</p>
32 54 </body></html>
33 55 \ No newline at end of file
... ...
doc/html/home.html
... ... @@ -2,7 +2,8 @@
2 2 <html><head>
3 3 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Home</title>
4 4  
5   -<link rel="stylesheet" type="text/css" media="screen,print" href="ctatools.css"></head>
  5 +<link rel="stylesheet" type="text/css" media="screen,print" href="ctatools.css">
  6 +</head>
6 7 <body>
7 8 <p class="Header">ctatools</p>
8 9 <p style="padding-top: 0pt; text-align: left;" class="Body">ctatools
... ... @@ -32,7 +33,8 @@ license version 3&lt;/a&gt;. &lt;/p&gt;
32 33 Simulation
33 34 of galactic plane scan, composed of 10 half-hour observations, spaced
34 35 by
35   -2&deg; in Galactic longitude. A single point source with Crab spectrum was
  36 +2&deg; in Galactic longitude. A single point source with Crab
  37 +spectrum was
36 38 simulated at the Galactic centre. The top panel shows the model, the
37 39 bottom panel the simulated data.</td>
38 40 <td style="text-align: center;"></td>
... ... @@ -40,4 +42,9 @@ bottom panel the simulated data.&lt;/td&gt;
40 42 </tbody>
41 43 </table>
42 44 <br>
43   -</body></html>
44 45 \ No newline at end of file
  46 +<hr size="1">
  47 +<p class="Body">Last updated by: J&uuml;rgen
  48 +Kn&ouml;dlseder 9 July
  49 +2011
  50 +<br>
  51 +</p></body></html>
45 52 \ No newline at end of file
... ...
doc/html/installation.html
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 2 <html><head>
  3 +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Installation</title>
3 4  
4   - <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
5   -
6   -
7   -
8   - <title>Installation</title><link href="ctatools.css" media="screen,print" type="text/css" rel="stylesheet"></head>
9   -
  5 +<link href="ctatools.css" media="screen,print" type="text/css" rel="stylesheet"></head>
10 6 <body>
11   -
12 7 <p class="Header">Installation</p>
13   -
14 8 <p style="padding-top: 0pt; text-align: left;" class="Body">
15 9 <a href="#Step_1:_Install_GammaLib">Step 1: Install
16 10 GammaLib</a>
17 11 </p>
18   -
19 12 <p style="padding-top: 0pt; text-align: left;" class="Body">
20 13 <a href="#Step_2:_Setup_environment">Step 2: Setup
21 14 environment</a>
22 15 </p>
23   -
24 16 <p style="padding-top: 0pt; text-align: left;" class="Body">
25 17 <a href="#Step_3:_Install_ctatools">Step 3: Install
26 18 ctatools</a>
27 19 </p>
28   -
29 20 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Known_Problems">Known Problems</a></p>
30   -
31 21 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Getting_Help">Getting Help</a></p>
32   -
33 22 <br>
34   -
35 23 <p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-weight: bold;">
36 24 Note:</span> These installation instructions apply to
37   -ctatools-00-01-00 or later.
  25 +<span style="font-family: Courier New,Courier,monospace;">ctatools-00-02-03</span> or later.
38 26 </p>
39   -
40 27 <br>
41   -
42 28 <p class="Title"><a name="Step_1:_Install_GammaLib"></a>Step
43 29 1: Install GammaLib</p>
44   -
45 30 <p style="padding-top: 0pt; text-align: left;" class="Body">ctatools
46 31 depends on GammaLib and thus GammaLib needs to be installed on your
47 32 system prior to installing ctatools. If you do not have GammaLib
... ... @@ -51,14 +36,10 @@ and
51 36 follow the GammaLib installation instructions on
52 37 <a href="http://gammalib.sourceforge.net/" target="_blank">http://gammalib.sourceforge.net/</a>.
53 38 <br>
54   -
55 39 <br>
56   -
57 40 </p>
58   -
59 41 <p class="Title"><a name="Step_2:_Setup_environment"></a>Step
60 42 2: Setup environment</p>
61   -
62 43 <p style="padding-top: 0pt; text-align: left;" class="Body">Before
63 44 using GammaLib (and ctatools use GammaLib) you have to setup some
64 45 environment variables.
... ... @@ -72,65 +53,50 @@ or &lt;span style=&quot;font-family: Courier New,Courier,monospace;&quot;&gt;$HOME/.profile&lt;/spa
72 53 script on a Linux
73 54 machine:
74 55 </p>
75   -
76 56 <p class="Code">export GAMMALIB=/usr/local/gamma<br>
77   -
78 57 source $GAMMALIB/bin/gammalib-init.sh
79 58 </p>
80   -
81 59 <p style="padding-top: 0pt; text-align: left;" class="Body">If
82 60 you use C shell or a variant then add the following to your
83 61 <span style="font-family: Courier New,Courier,monospace;">.cshrc</span>
84 62 or <span style="font-family: Courier New,Courier,monospace;">.tcshrc</span>
85 63 script:
86 64 </p>
87   -
88 65 <p class="Code">setenv GAMMALIB /usr/local/gamma<br>
89   -
90 66 source $GAMMALIB/bin/gammalib-init.csh </p>
91   -
92 67 <br>
93   -
94 68 <br>
95   -
96 69 <p class="Title"><a name="Step_3:_Install_ctatools"></a>Step
97 70 3: Install ctatools</p>
98   -
99 71 <p style="padding-top: 0pt; text-align: left;" class="Body">After
100 72 downloading the ctatools tarball, save it in an appropriate location
101 73 (for example <span style="font-family: Courier New,Courier,monospace;">/usr/local/gamma/src</span>),
102 74 and type</p>
103   -
104 75 <p class="Code">
105   -&gt; tar xvfz ctatools-00-01-00.tar.gz
  76 +&gt; tar xvfz ctatools-00-02-03.tar.gz
106 77 </p>
107   -
108 78 <p style="padding-top: 0pt; text-align: left;" class="Body">Step
109 79 in the created directory using
110 80 </p>
111   -
112 81 <p class="Code">
113 82 &gt; cd ctatools
114 83 </p>
115   -
116 84 <p style="padding-top: 0pt; text-align: left;" class="Body">
117 85 and build and install ctatools by typing</p>
118   -
119 86 <p class="Code">
120 87 &gt; ./configure<br>
121   -
122 88 &gt; make<br>
123   -
  89 +&gt; make check<br>
124 90 &gt; make install
125 91 </p>
126   -
127 92 <p style="padding-top: 0pt; text-align: left;" class="Body">
128 93 at the operating system prompt.
129 94 The <span style="font-family: Courier New,Courier,monospace;">./configure</span>
130 95 command customizes the Makefiles for the particular
131 96 system,
132 97 the <span style="font-family: Courier New,Courier,monospace;">make</span>
133   -command compiles the source files and builds the executables, and
  98 +command compiles the source files and builds the executables, the the <span style="font-family: Courier New,Courier,monospace;">make
  99 +check</span> command performs a system test, and
134 100 the <span style="font-family: Courier New,Courier,monospace;">make
135 101 install</span> command installs the executables in the <span style="font-family: Courier New,Courier,monospace;">bin</span>
136 102 directory.
... ... @@ -141,9 +107,7 @@ configuration
141 107 script in the current directory is run and not some other system-wide
142 108 configuration
143 109 script.&nbsp;</p>
144   -
145 110 <br>
146   -
147 111 <p style="padding-top: 0pt; text-align: left;" class="Body">By
148 112 default, the install directory is set to
149 113 <span style="font-family: Courier New,Courier,monospace;">/usr/local/gamma</span>.
... ... @@ -152,54 +116,58 @@ argument should be
152 116 given,
153 117 for example:
154 118 </p>
155   -
156 119 <p class="Code">
157 120 &gt; ./configure --prefix=/usr/local
158 121 </p>
159   -
160 122 <p style="padding-top: 0pt; text-align: left;" class="Body">A
161 123 full list of configuration options can be found using</p>
162   -
163 124 <p class="Code">
164 125 &gt; ./configure --help
165 126 </p>
166   -
167 127 <br>
168   -
169 128 <p class="Title"><a name="Known_Problems"></a>Known
170 129 Problems</p>
171   -
  130 +<p style="padding-top: 0pt; text-align: left;" class="Body">
  131 +<span style="font-weight: bold; font-size: 14px;">Mac OS X</span>
  132 +<br>The Python development package is not installed as default on Mac
  133 +OS X, and consequently, the <span style="font-family: Courier New,Courier,monospace;">Python.h</span> header file is missing that is
  134 +needed to compile in the Python bindings. The <span style="font-family: Courier New,Courier,monospace;">configure</span> script should
  135 +recognise this fact and adjust the build procedure accordingly, but you
  136 +will not be able to use ctatools from Python. So better install the
  137 +Python development package before installing ctatools.</p><p style="padding-top: 0pt; text-align: left;" class="Body"></p><p style="padding-top: 0pt; text-align: left;" class="Body">It
  138 +was also reported that adding of&nbsp;<span style="font-family: Courier New,Courier,monospace;">export
  139 +MACOSX_DEPLOYMENT_TARGET=10.6</span> to the <span style="font-family: Courier New,Courier,monospace;">.bashrc</span> file was necessary one
  140 +some Mac OS X 10.6 installations to make ctatools compile.<br>
  141 +<br>
  142 +</p>
172 143 <p style="padding-top: 0pt; text-align: left;" class="Body">
173 144 <span style="font-weight: bold; font-size: 14px;">Solaris</span>
174 145 <br>
175   -
176 146 ctatools has been compiled successfully on Solaris 2.10 using the Sun
177 147 Studio compiler. However, GammaLib symbols are
178 148 not globally exported due to a strage behaviour of the Sun Studio
179 149 compiler. This prevents for example GammaLib library from catching
180 150 its own exceptions and from registering models. Consequently, many
181 151 functionnalities will not work.</p>
182   -
183 152 <br>
184   -
185 153 <p style="padding-top: 0pt; text-align: left;" class="Body">Using
186 154 gcc (version 3.4.3), ctatools and GammaLib works correctly on Solaris
187 155 2.10, yet loading ctatools or GammaLib as a Python module fails.
188 156 <br>
189   -
190 157 <br>
191   -
192 158 </p>
193   -
194 159 <br>
195   -
196 160 <p class="Title"><a name="Getting_Help"></a>Getting
197 161 Help</p>
198   -
199 162 <p style="padding-top: 0pt; text-align: left;" class="Body">
200 163 Any questions, bug reports, or suggested enhancements related to
201 164 ctatools should be submitted to
202 165 <a href="mailto:knodlseder@cesr.fr">knodlseder@cesr.fr</a>.
203 166 </p>
204   -
  167 +<br>
  168 +<hr size="1">
  169 +<p class="Body">Last updated by: J&uuml;rgen
  170 +Kn&ouml;dlseder 9 July
  171 +2011
  172 +</p>
205 173 </body></html>
206 174 \ No newline at end of file
... ...
doc/html/quickstart.html
1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2   -<html>
3   -<head>
4   -
5   - <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
6   - <title>Getting Started</title>
7   -
8   -
9   - <link href="ctatools.css" media="screen,print" type="text/css" rel="stylesheet">
  2 +<html><head>
  3 +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Getting Started</title>
10 4  
  5 +<link href="ctatools.css" media="screen,print" type="text/css" rel="stylesheet">
11 6 </head>
12 7  
13   -
14 8 <body>
15   -
16 9 <p class="Header">Getting started</p>
17   -
18 10 <p class="Title">First steps with ctatools</p>
19   -
20 11 <p style="padding-top: 0pt; text-align: left;" class="Body">
21 12 This page gives provides a step-by-step description of the CTA data
22 13 analysis procedure implemented in ctatools. In this example we will
23 14 simulate data for the Crab nebula, observed on-axis, as a single source
24 15 in the CTA field of view.</p>
25   -
26 16 <br>
27   -
28 17 <p style="padding-top: 0pt; text-align: left;" class="Body">The
29 18 example consists of the following analysis steps:</p>
30   -
31 19 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Simulating_CTA_data">Simulating CTA data</a></p>
32   -
33 20 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Binning_CTA_data">Binning CTA data</a></p>
34   -
35 21 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Fitting_CTA_data">Fitting CTA data</a></p>
36   -
37 22 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Doing_an_unbinned_analysis">Doing an unbinned analysis</a></p>
38   -
39 23 <br>
40   -
41 24 <p style="padding-top: 0pt; text-align: left;" class="Body">And
42 25 please read also:
43 26 </p>
44   -
45 27 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Some_final_remarks">Some final remarks</a></p>
46   -
47 28 <p style="padding-top: 0pt; text-align: left;" class="Body"><a href="#Getting_Help">Getting Help</a></p>
48   -
49 29 <br>
50   -
51 30 <br>
52   -
53 31 <p class="Title"><a name="Simulating_CTA_data"></a>Simulating
54 32 CTA data</p>
55   -
56 33 <p style="padding-top: 0pt; text-align: left;" class="Body">CTA
57 34 data are simulated by the executable <span style="font-family: Courier New,Courier,monospace;">ctobssim</span>.
58 35 To start the executable, type <span style="font-family: Courier New,Courier,monospace;">ctobssim</span>
... ... @@ -62,35 +39,21 @@ work on a system that has been installed in the default directory &lt;span style=&quot;f
62 39 If ctatools have been installed in another directory, please adjust the
63 40 parameter names accordingly.
64 41 </p>
65   -
66 42 <p class="Code">
67 43 &gt; ctobssim<br>
68   -
69 44 Model [test/data/crab_alone.xml] /usr/local/gamma/share/models/crab.xml
70 45 <br>
71   -
72 46 Output event data file [events.fits] <br>
73   -
74 47 Calibration database [test/irf] /usr/local/gamma/share/caldb/cta<br>
75   -
76 48 Instrument response function [kb_E_50h_v3] <br>
77   -
78 49 RA for ROI centre (degrees) (0-360) [83.63] <br>
79   -
80 50 Dec for ROI centre (degrees) (-90-90) [22.01] <br>
81   -
82 51 Radius of ROI (degrees) (0-180) [10.0] <br>
83   -
84 52 Start time (MET in s) (0) [0.0] <br>
85   -
86 53 End time (MET in s) (0) [1800.0] <br>
87   -
88 54 Lower energy limit (TeV) (0) [0.1] <br>
89   -
90 55 Upper energy limit (TeV) (0) [100.0] <br>
91   -
92 56 </p>
93   -
94 57 <p style="padding-top: 0pt; text-align: left;" class="Body">Each
95 58 line represents a query for one parameter. The line starts with a short
96 59 description of the parameter, followed by the default parameter value
... ... @@ -98,9 +61,7 @@ proposed by &lt;span style=&quot;font-family: Courier New,Courier,monospace;&quot;&gt;ctobssim&lt;/
98 61 in squared brackets <span style="font-family: Courier New,Courier,monospace;">[ ]</span>.
99 62 If no parameter is entered (which is the case for the majority of
100 63 parameters shown here), the default parameter will be used.</p>
101   -
102 64 <br>
103   -
104 65 <p style="padding-top: 0pt; text-align: left;" class="Body">The
105 66 CTA instrument properties (effective area, PSF width) are taken for the
106 67 moment from Konrad Bernl&ouml;hrs sensitivity files which are
... ... @@ -108,9 +69,7 @@ stored in &lt;span style=&quot;font-family: Courier New,Courier,monospace;&quot;&gt;/usr/local/g
108 69 To test another CTA configuration you may adapt the instrument response
109 70 function name accordingly (see the <a href="#Some_final_remarks">final
110 71 remarks</a>).</p>
111   -
112 72 <br>
113   -
114 73 <p style="padding-top: 0pt; text-align: left;" class="Body">Events
115 74 are simulated based on the instrument properties and based on a source
116 75 and background model. Only events that fall within the
... ... @@ -119,97 +78,68 @@ position in Right Ascension and Declination (in degrees), will be
119 78 stored in the output event data file. The duration of the simulation is
120 79 taken here to 30 minutes (or 1800 seconds). Events are simulated for
121 80 energies between 0.1 and 100 TeV.</p>
122   -
123 81 <br>
124   -
125 82 <p style="padding-top: 0pt; text-align: left;" class="Body">The
126 83 source and background model is defined by the XML file <span style="font-family: Courier New,Courier,monospace;">/usr/local/gamma/share/models/crab.xml</span>:
127 84 </p>
128   -
129 85 <p class="Code">
130 86 &lt;?xml version="1.0" standalone="no"?&gt;<br>
131   -
132 87 &lt;source_library title="source library"&gt;<br>
133   -
134 88 &nbsp; &lt;source name="MAGIC Crab (Albert et al. 2008, ApJ,
135 89 674, 1037)" type="PointSource"&gt;<br>
136   -
137 90 &nbsp;&nbsp;&nbsp; &lt;spectrum type="PowerLaw"&gt;<br>
138   -
139 91 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
140 92 &lt;parameter name="Prefactor" scale="1e-16" value="5.7"&nbsp;
141 93 min="1e-07" max="1000.0" free="1"/&gt;<br>
142   -
143 94 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
144 95 &lt;parameter name="Index"&nbsp;&nbsp;&nbsp;&nbsp;
145 96 scale="-1"&nbsp;&nbsp;&nbsp; value="2.48"
146 97 min="0.0"&nbsp;&nbsp; max="+5.0"&nbsp;&nbsp;
147 98 free="1"/&gt;<br>
148   -
149 99 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
150 100 &lt;parameter name="Scale"&nbsp;&nbsp;&nbsp;&nbsp;
151 101 scale="1e6"&nbsp;&nbsp; value="0.3"&nbsp;
152 102 min="0.01"&nbsp; max="1000.0" free="0"/&gt;<br>
153   -
154 103 &nbsp;&nbsp;&nbsp; &lt;/spectrum&gt;<br>
155   -
156 104 &nbsp;&nbsp;&nbsp; &lt;spatialModel
157 105 type="SkyDirFunction"&gt;<br>
158   -
159 106 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
160 107 name="RA"&nbsp; scale="1.0" value="83.6331" min="-360" max="360"
161 108 free="0"/&gt;<br>
162   -
163 109 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
164 110 name="DEC" scale="1.0" value="22.0145" min="-90"&nbsp;
165 111 max="90"&nbsp; free="0"/&gt;<br>
166   -
167 112 &nbsp;&nbsp;&nbsp; &lt;/spatialModel&gt;<br>
168   -
169 113 &nbsp; &lt;/source&gt;<br>
170   -
171 114 &nbsp; &lt;source name="Background" type="RadialAcceptance"
172 115 instrument="CTA"&gt;<br>
173   -
174 116 &nbsp;&nbsp;&nbsp; &lt;spectrum type="PowerLaw"&gt;<br>
175   -
176 117 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
177 118 &lt;parameter name="Prefactor" scale="1e-6" value="61.8"
178 119 min="0.0"&nbsp; max="1000.0" free="1"/&gt;<br>
179   -
180 120 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
181 121 &lt;parameter name="Index"&nbsp;&nbsp;&nbsp;&nbsp;
182 122 scale="-1"&nbsp;&nbsp; value="1.85" min="0.0"&nbsp;
183 123 max="+5.0"&nbsp;&nbsp; free="1"/&gt;<br>
184   -
185 124 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
186 125 &lt;parameter name="Scale"&nbsp;&nbsp;&nbsp;&nbsp;
187 126 scale="1e6"&nbsp; value="1.0"&nbsp; min="0.01" max="1000.0"
188 127 free="0"/&gt;<br>
189   -
190 128 &nbsp;&nbsp;&nbsp; &lt;/spectrum&gt;<br>
191   -
192 129 &nbsp;&nbsp;&nbsp; &lt;radialModel
193 130 type="Gaussian"&gt;<br>
194   -
195 131 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
196 132 &lt;parameter name="Sigma" scale="1.0" value="3.0" min="0.01"
197 133 max="10.0" free="1"/&gt;<br>
198   -
199 134 &nbsp;&nbsp;&nbsp; &lt;/radialModel&gt;<br>
200   -
201 135 &nbsp; &lt;/source&gt;<br>
202   -
203 136 &lt;/source_library&gt;
204 137 </p>
205   -
206 138 <p style="padding-top: 0pt; text-align: left;" class="Body">The
207 139 model consists of a source library that contains 2
208 140 "sources":&nbsp;the Crab nebula and an instrumental background
209 141 model.</p>
210   -
211 142 <br>
212   -
213 143 <p style="padding-top: 0pt; text-align: left;" class="Body">The
214 144 Crab nebula is modelled by a factorized sky model that has a spectral
215 145 and a spatial component (tags <span style="font-family: Courier New,Courier,monospace;">&lt;spectrum&gt;</span>
... ... @@ -236,22 +166,16 @@ The &lt;span style=&quot;font-family: Courier New,Courier,monospace;&quot;&gt;min&lt;/span&gt;,
236 166 and <span style="font-family: Courier New,Courier,monospace;">free</span>
237 167 attributes are not relevant here for the simulations, but they will be
238 168 important for the model fitting later.</p>
239   -
240 169 <br>
241   -
242 170 <p style="padding-top: 0pt; text-align: left;" class="Body">The
243 171 spectral intensity <span style="font-family: Courier New,Courier,monospace;">I(E)</span>
244 172 (in units of photons/cm2/s/MeV) of the power law is given by&nbsp;</p>
245   -
246 173 <p style="padding-top: 0pt; text-align: center; font-family: Courier New,Courier,monospace;" class="Body">I(E) = Prefactor * (E/Scale)^Index</p>
247   -
248 174 <p style="padding-top: 0pt; text-align: left;" class="Body">where
249 175 the <span style="font-family: Courier New,Courier,monospace;">E</span>
250 176 and <span style="font-family: Courier New,Courier,monospace;">Scale</span>
251 177 are given in MeV.</p>
252   -
253 178 <br>
254   -
255 179 <p style="padding-top: 0pt; text-align: left;" class="Body">The
256 180 instrumental background of CTA is modelled by a factorized data model
257 181 that has a spectral and a radial component (tags <span style="font-family: Courier New,Courier,monospace;">&lt;spectrum&gt;</span>
... ... @@ -265,9 +189,7 @@ with &lt;span style=&quot;font-weight: bold;&quot;&gt;offset angle squared&lt;/span&gt;,
265 189 direction) which is modelled here by a Gaussian. The only parameter of
266 190 the radial component is the width of the Gaussian <span style="font-family: Courier New,Courier,monospace;">Sigma</span>,
267 191 which is here set to 3 degrees squared.</p>
268   -
269 192 <br>
270   -
271 193 <p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-family: Courier New,Courier,monospace;">ctobssim</span>
272 194 has a couple of hidden parameters, the most important one being
273 195 certainly <span style="font-family: Courier New,Courier,monospace;">seed</span>.
... ... @@ -277,11 +199,8 @@ generator, and changing this parameter will allow to generate
277 199 statistically independent Monte Carlo samples of CTA event data. To
278 200 use for example a seed value of 41 one should type:
279 201 </p>
280   -
281 202 <p class="Code">&gt; ctobssim seed=41<br>
282   -
283 203 </p>
284   -
285 204 <p style="padding-top: 0pt; text-align: left;" class="Body">
286 205 <span style="font-family: Courier New,Courier,monospace;">ctobssim</span>
287 206 will write 2 files in the working directory: <span style="font-family: Courier New,Courier,monospace;">events.fits</span>
... ... @@ -295,64 +214,38 @@ that holds the events (one row per event), and a binary table named &lt;span style=
295 214 holding the Good Time Interval (for the moment a single row with 2
296 215 columns providing the start and the stop time of the simulated time
297 216 interval).</p>
298   -
299 217 <br>
300   -
301 218 <p style="padding-top: 0pt; text-align: left;" class="Body">The
302 219 second file produced by <span style="font-family: Courier New,Courier,monospace;">ctobssim</span>
303 220 is a human readable log file that contains information about
304 221 the job execution. As example, the last lines from this file are shown
305 222 here:</p>
306   -
307 223 <p class="Code">2011-01-31T23:50:39: +==================+<br>
308   -
309 224 2011-01-31T23:50:39: | Simulate photons |<br>
310   -
311 225 2011-01-31T23:50:39: +==================+<br>
312   -
313 226 2011-01-31T23:50:39:&nbsp; Simulated photons .........: 33943<br>
314   -
315 227 2011-01-31T23:50:39:&nbsp; Simulation area ...........: 3.2e+10 cm2<br>
316   -
317 228 2011-01-31T23:50:39:&nbsp; Simulation cone ...........: RA=83.63
318 229 deg, Dec=22.01deg, r=10 deg<br>
319   -
320 230 2011-01-31T23:50:39:&nbsp; Time interval .............: 0 s - 1800 s<br>
321   -
322 231 2011-01-31T23:50:39:&nbsp; Energy range ..............: 100 GeV -
323 232 100 TeV<br>
324   -
325 233 2011-01-31T23:50:39:&nbsp; Random number seed ........: 1<br>
326   -
327 234 2011-01-31T23:50:39: <br>
328   -
329 235 2011-01-31T23:50:39: +=================+<br>
330   -
331 236 2011-01-31T23:50:39: | Simulate events |<br>
332   -
333 237 2011-01-31T23:50:39: +=================+<br>
334   -
335 238 2011-01-31T23:50:39:&nbsp; MC source events ..........: 649<br>
336   -
337 239 2011-01-31T23:50:39:&nbsp; MC background events ......: 3407<br>
338   -
339 240 2011-01-31T23:50:39: <br>
340   -
341 241 2011-01-31T23:50:39: +==========================+<br>
342   -
343 242 2011-01-31T23:50:39: | Save events in FITS file |<br>
344   -
345 243 2011-01-31T23:50:39: +==========================+<br>
346   -
347 244 2011-01-31T23:50:39: <br>
348   -
349 245 2011-01-31T23:50:39: Application "ctobssim" terminated after consuming
350 246 14 seconds of CPU time.<br>
351   -
352 247 <br>
353   -
354 248 </p>
355   -
356 249 <p style="padding-top: 0pt; text-align: left;" class="Body">Each
357 250 line starts with the UTC time at which the line has been written. In
358 251 this
... ... @@ -360,54 +253,34 @@ run, 33943 Crab photons have been thrown over an area of 3.2 square
360 253 kilometres during a time interval of 1800 seconds. 649 of these photons
361 254 have been registered by CTA as events. In the same time
362 255 interval, 3407 background events have been registred by CTA.</p>
363   -
364 256 <br>
365   -
366 257 <br>
367   -
368 258 <p class="Title"><a name="Binning_CTA_data"></a>Binning
369 259 CTA data</p>
370   -
371 260 <p style="padding-top: 0pt; text-align: left;" class="Body">
372 261 As next analysis step the data are binned in a counts map using the
373 262 executable <span style="font-family: Courier New,Courier,monospace;">ctbin</span>.
374 263 A counts map is a 3 dimensional data cube, spanned by Right Ascension
375 264 (or Galactic longitude), Declination (or Galactic latitude), and the
376 265 logarithm (base 10) of energy.</p>
377   -
378 266 <br>
379   -
380 267 <p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-family: Courier New,Courier,monospace;">ctbin</span>
381 268 is executed by typing:</p>
382   -
383 269 <p class="Code">
384 270 &gt; ctbin<br>
385   -
386 271 Event data file name [test/data/crab_events.fits.gz] events.fits<br>
387   -
388 272 Output file name [cntmap.fits] <br>
389   -
390 273 Start value for first energy bin in TeV [0.1] <br>
391   -
392 274 Stop value for last energy bin in TeV [100.0] <br>
393   -
394 275 Number of energy bins [20] <br>
395   -
396 276 Projection method e.g. AIT|ARC|CAR|GLS|MER|NCP|SIN|STG|TAN [CAR] <br>
397   -
398 277 Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [CEL] <br>
399   -
400 278 First coordinate of image center in degrees (RA or galactic l) [83.63] <br>
401   -
402 279 Second coordinate of image center in degrees (DEC or galactic b)
403 280 [22.01] <br>
404   -
405 281 Image scale (in degrees/pixel) [0.02] <br>
406   -
407 282 Size of the X axis in pixels [200] <br>
408   -
409 283 Size of the Y axis in pixels [200] </p>
410   -
411 284 <p style="padding-top: 0pt; text-align: left;" class="Body">
412 285 In this example we adjust the event data file name and accept all the
413 286 remaining parameter defaults as they perfectly
... ... @@ -419,107 +292,73 @@ the cartesian projection is the only valid project available for the
419 292 moment</span>). The counts map has 200 x 200
420 293 spatial pixels of 0.02 x 0.02 degrees in size, hence it covers a total
421 294 area of 4 x 4 degrees.</p>
422   -
423 295 <br>
424   -
425 296 <p style="padding-top: 0pt; text-align: left;" class="Body">A
426 297 set of 20 counts maps will be created, which are logarithmically spaced
427 298 in energy, and which cover the energy range from 0.1 TeV to 100 TeV. In
428 299 this example, the counts map will be saved as <span style="font-family: Courier New,Courier,monospace;">cntmap.fits</span>
429 300 in the
430 301 working directory.
431   -In addition to the counts map, that is stored as the primary image extension, the FITS
  302 +In addition to the counts map, that is stored as the primary image
  303 +extension, the FITS
432 304 file also contains an extension named <span style="font-family: Courier New,Courier,monospace;">EBOUNDS</span>
433 305 that defines the energy boundaries that were used, and an extension <span style="font-family: Courier New,Courier,monospace;">GTI</span>
434 306 that defines the Good Time Intervals that have been used. The following
435   -image shows the resulting FITS file. The <span style="font-family: Courier New,Courier,monospace;">EBOUNDS</span> table has 20 rows, one for each energy bin, while the <span style="font-family: Courier New,Courier,monospace;">GTI</span> table has jusr a single row, indicating the start and stop time of the simulated data.</p>
  307 +image shows the resulting FITS file. The <span style="font-family: Courier New,Courier,monospace;">EBOUNDS</span>
  308 +table has 20 rows, one for each energy bin, while the <span style="font-family: Courier New,Courier,monospace;">GTI</span>
  309 +table has jusr a single row, indicating the start and stop time of the
  310 +simulated data.</p>
436 311 <br>
437   -
438 312 <div style="text-align: center;"><img alt="CTA counts map FITS file" src="images/cntmap-fits.jpg"><br>
439   -
440 313 </div>
441   -
442 314 <br>
443   -
444 315 <p style="padding-top: 0pt; text-align: left;" class="Body">An
445 316 image
446 317 of the first bin, covering the energy range 100 -&nbsp;141 GeV, is
447 318 shown below:
448 319 </p>
449   -
450 320 <div style="text-align: center;"><img style="width: 496px; height: 518px;" alt="CTA counts map" src="images/cntmap-map.jpg"><br>
451   -
452 321 </div>
453   -
454 322 <br>
455   -
456 323 <p style="padding-top: 0pt; text-align: left;" class="Body">For
457 324 illustrating, the last few lines of the log file <span style="font-family: Courier New,Courier,monospace;">ctbin.log</span>
458 325 are shown below:
459 326 </p>
460   -
461 327 <p class="Code">2011-02-01T09:28:05: +=========+<br>
462   -
463 328 2011-02-01T09:28:05: | Binning |<br>
464   -
465 329 2011-02-01T09:28:05: +=========+<br>
466   -
467 330 2011-02-01T09:28:05:&nbsp; Events in list ............: 4056<br>
468   -
469 331 2011-02-01T09:28:05:&nbsp; Events in map .............: 3683<br>
470   -
471 332 2011-02-01T09:28:05:&nbsp; Events outside map area ...: 373<br>
472   -
473 333 2011-02-01T09:28:05:&nbsp; Events outside energy bins : 0<br>
474   -
475 334 2011-02-01T09:28:05: <br>
476   -
477 335 2011-02-01T09:28:05: +============+<br>
478   -
479 336 2011-02-01T09:28:05: | Counts map |<br>
480   -
481 337 2011-02-01T09:28:05: +============+<br>
482   -
483 338 2011-02-01T09:28:05: === GSkymap ===<br>
484   -
485 339 2011-02-01T09:28:05:&nbsp; Number of pixels ..........: 40000<br>
486   -
487 340 2011-02-01T09:28:05:&nbsp; Number of maps ............: 20<br>
488   -
489 341 2011-02-01T09:28:05:&nbsp; X axis dimension ..........: 200<br>
490   -
491 342 2011-02-01T09:28:05:&nbsp; Y axis dimension ..........: 200<br>
492   -
493 343 2011-02-01T09:28:05: === GWcsCAR ===<br>
494   -
495 344 2011-02-01T09:28:05:&nbsp; Coordinate system .........: EQU<br>
496   -
497 345 2011-02-01T09:28:05:&nbsp; Reference coordinate ......: (83.63,
498 346 22.01) deg<br>
499   -
500 347 2011-02-01T09:28:05:&nbsp; Reference pixel ...........: (100.5,
501 348 100.5)<br>
502   -
503 349 2011-02-01T09:28:05:&nbsp; Increment at reference ....: (0.02,
504 350 0.02) deg<br>
505   -
506 351 2011-02-01T09:28:05:&nbsp; Coordinate of North Pole ..: (180, 0) deg<br>
507   -
508 352 2011-02-01T09:28:05:&nbsp; CD matrix .................: [0.02 0][0
509 353 0.02]<br>
510   -
511 354 2011-02-01T09:28:05:&nbsp; Inverse CD matrix .........: [50 -0][-0
512 355 50]<br>
513   -
514 356 2011-02-01T09:28:05:&nbsp; Coordinate of native pole .: (83.63,
515 357 112.01)<br>
516   -
517 358 2011-02-01T09:28:05: <br>
518   -
519 359 2011-02-01T09:28:05: Application "ctbin" terminated after consuming 10
520 360 seconds of CPU time.
521 361 </p>
522   -
523 362 <p style="padding-top: 0pt; text-align: left;" class="Body">From
524 363 the 4056 events that have been simulated and stored in the <span style="font-family: Courier New,Courier,monospace;">events.fits</span>
525 364 file, 3683 lie within the map boundaries and are thus put into the
... ... @@ -527,14 +366,10 @@ resulting counts map. The counts map is stored in a cartesian
527 366 projection in a <a href="http://fits.gsfc.nasa.gov/fits_wcs.html" target="_blank">World Coordinate System (WCS)</a>
528 367 compliant format.
529 368 </p>
530   -
531 369 <br>
532   -
533 370 <br>
534   -
535 371 <p class="Title"><a name="Fitting_CTA_data"></a>Fitting
536 372 CTA data</p>
537   -
538 373 <p style="padding-top: 0pt; text-align: left;" class="Body">
539 374 Now we are ready to fit the simulated data with a model. For simplicity
540 375 we use in this example the same model that we used to simulate the data
... ... @@ -542,23 +377,15 @@ with &lt;span style=&quot;font-family: Courier New,Courier,monospace;&quot;&gt;ctobssim&lt;/span&gt;.
542 377 Model fitting is done using the executable <span style="font-family: Courier New,Courier,monospace;">ctlike</span>,
543 378 and we do the fit by typing:
544 379 </p>
545   -
546 380 <p class="Code">
547 381 &gt; ctlike<br>
548   -
549 382 Maximum likelihood method [BINNED] <br>
550   -
551 383 Calibration database [test/irf] /usr/local/gamma/share/caldb/cta<br>
552   -
553 384 Instrument response function [kb_E_50h_v3] <br>
554   -
555 385 Source model [test/data/crab.xml] /usr/local/gamma/share/models/crab.xml<br>
556   -
557 386 Source model output file [crab_results.xml] <br>
558   -
559 387 Counts map [test/data/crab_cntmap.fits.gz] cntmap.fits
560 388 </p>
561   -
562 389 <p style="padding-top: 0pt; text-align: left;" class="Body">Fitting
563 390 of the data is done in <span style="font-family: Courier New,Courier,monospace;">BINNED</span>
564 391 mode, which means that the events have been binned into a counts map
... ... @@ -570,9 +397,7 @@ log-likelihood is computed directly by summing over all events. We will
570 397 explore
571 398 the <span style="font-family: Courier New,Courier,monospace;">UNBINNED</span>
572 399 mode <a href="#Doing_an_unbinned_analysis">later</a>.</p>
573   -
574 400 <br>
575   -
576 401 <p style="padding-top: 0pt; text-align: left;" class="Body">
577 402 One of the parameters given to <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
578 403 is a source model output file (we specified <span style="font-family: Courier New,Courier,monospace;">crab_results.xml</span>
... ... @@ -582,79 +407,54 @@ addition, the statistical uncertainties are added for each fitted
582 407 parameter using the attribute <span style="font-family: Courier New,Courier,monospace;">error</span>.
583 408 Below we show the XML result file that has been produced by the run:
584 409 </p>
585   -
586 410 <p class="Code">&lt;?xml version="1.0"
587 411 encoding="UTF-8" standalone="no"?&gt;<br>
588   -
589 412 &lt;source_library title="source library"&gt;<br>
590   -
591 413 &nbsp; &lt;source name="MAGIC Crab (Albert et al. 2008, ApJ,
592 414 674, 1037)" type="DiffuseSource"&gt;<br>
593   -
594 415 &nbsp;&nbsp;&nbsp; &lt;spectrum type="PowerLaw"&gt;<br>
595   -
596 416 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
597 417 name="Prefactor" value="5.7765" error="0.243328" scale="1e-16"
598 418 min="1e-07" max="1000" free="1" /&gt;<br>
599   -
600 419 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
601 420 name="Index" value="2.49937" error="0.0330191" scale="-1" min="0"
602 421 max="5" free="1" /&gt;<br>
603   -
604 422 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
605 423 name="Scale" value="0.3" scale="1e+06" min="0.01" max="1000" free="0"
606 424 /&gt;<br>
607   -
608 425 &nbsp;&nbsp;&nbsp; &lt;/spectrum&gt;<br>
609   -
610 426 &nbsp;&nbsp;&nbsp; &lt;spatialModel
611 427 type="SkyDirFunction"&gt;<br>
612   -
613 428 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
614 429 name="RA" value="83.6331" scale="1" min="-360" max="360" free="0"
615 430 /&gt;<br>
616   -
617 431 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
618 432 name="DEC" value="22.0145" scale="1" min="-90" max="90" free="0"
619 433 /&gt;<br>
620   -
621 434 &nbsp;&nbsp;&nbsp; &lt;/spatialModel&gt;<br>
622   -
623 435 &nbsp; &lt;/source&gt;<br>
624   -
625 436 &nbsp; &lt;source name="Background" type="RadialAcceptance"
626 437 instrument="CTA"&gt;<br>
627   -
628 438 &nbsp;&nbsp;&nbsp; &lt;spectrum type="PowerLaw"&gt;<br>
629   -
630 439 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
631 440 name="Prefactor" value="61.7696" error="1.89829" scale="1e-06" min="0"
632 441 max="1000" free="1" /&gt;<br>
633   -
634 442 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
635 443 name="Index" value="1.87195" error="0.0166039" scale="-1" min="0"
636 444 max="5" free="1" /&gt;<br>
637   -
638 445 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
639 446 name="Scale" value="1" scale="1e+06" min="0.01" max="1000" free="0"
640 447 /&gt;<br>
641   -
642 448 &nbsp;&nbsp;&nbsp; &lt;/spectrum&gt;<br>
643   -
644 449 &nbsp;&nbsp;&nbsp; &lt;radialModel
645 450 type="Gaussian"&gt;<br>
646   -
647 451 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter
648 452 name="Sigma" value="3.00467" error="0.071261" scale="1" min="0.01"
649 453 max="10" free="1" /&gt;<br>
650   -
651 454 &nbsp;&nbsp;&nbsp; &lt;/radialModel&gt;<br>
652   -
653 455 &nbsp; &lt;/source&gt;<br>
654   -
655 456 &lt;/source_library&gt;
656 457 </p>
657   -
658 458 <p style="padding-top: 0pt; text-align: left;" class="Body">
659 459 In this example, the <span style="font-family: Courier New,Courier,monospace;">Prefactor</span>
660 460 and <span style="font-family: Courier New,Courier,monospace;">Index</span>
... ... @@ -663,147 +463,89 @@ of the spectral model for the Crab as well as the &lt;span style=&quot;font-family: Cour
663 463 and <span style="font-family: Courier New,Courier,monospace;">Sigma</span>
664 464 parameter of the radial acceptance model have been fitted (all
665 465 parameters having the attribute <span style="font-family: Courier New,Courier,monospace;">free="1"</span>
666   -are fitted). <span style="font-weight: bold;">One could
667   -be tempted to try fitting also the location of the Crab point source,
668   -yet this feature is not yet implemented</span>.
  466 +are fitted).
669 467 </p>
670   -
671 468 <br>
672   -
673 469 <p style="padding-top: 0pt; text-align: left;" class="Body">To
674 470 get more details about the model fitting one can inspect the log file.
675 471 Below
676 472 we show the last lines of the <span style="font-family: Courier New,Courier,monospace;">ctlike.log</span>
677 473 log file that has been produced by this run:
678 474 </p>
679   -
680 475 <p class="Code">2011-02-01T09:53:17:
681 476 +=================================+<br>
682   -
683 477 2011-02-01T09:53:17: | Maximum likelihood optimisation |<br>
684   -
685 478 2011-02-01T09:53:17: +=================================+<br>
686   -
687 479 2011-02-01T09:53:20:&nbsp; Initial iteration: func=18092.1,
688 480 Lambda=0.001<br>
689   -
690 481 2011-02-01T09:53:24:&nbsp; Iteration 1: func=18090, Lambda=0.0001,
691 482 delta=2.08792<br>
692   -
693 483 2011-02-01T09:53:27:&nbsp; Iteration 2: func=18090, Lambda=1e-05,
694 484 delta=0.0021398<br>
695   -
696 485 2011-02-01T09:53:30:&nbsp; Iteration 3: func=18090, Lambda=1e-06,
697 486 delta=4.80215e-06<br>
698   -
699 487 2011-02-01T09:53:34:&nbsp; Iteration 4: func=18090, Lambda=1e-07,
700 488 delta=1.7495e-08<br>
701   -
702 489 2011-02-01T09:53:37: <br>
703   -
704 490 2011-02-01T09:53:37: +=========================================+<br>
705   -
706 491 2011-02-01T09:53:37: | Maximum likelihood optimisation results |<br>
707   -
708 492 2011-02-01T09:53:37: +=========================================+<br>
709   -
710 493 2011-02-01T09:53:37: === GOptimizerLM ===<br>
711   -
712 494 2011-02-01T09:53:37:&nbsp; Optimized function value ..: 18090<br>
713   -
714 495 2011-02-01T09:53:37:&nbsp; Absolute precision ........: 1e-06<br>
715   -
716 496 2011-02-01T09:53:37:&nbsp; Optimization status .......: converged<br>
717   -
718 497 2011-02-01T09:53:37:&nbsp; Number of parameters ......: 11<br>
719   -
720 498 2011-02-01T09:53:37:&nbsp; Number of free parameters .: 5<br>
721   -
722 499 2011-02-01T09:53:37:&nbsp; Number of iterations ......: 4<br>
723   -
724 500 2011-02-01T09:53:37:&nbsp; Lambda ....................: 1e-07<br>
725   -
726 501 2011-02-01T09:53:37:&nbsp; Maximum log likelihood ....: -18090<br>
727   -
728 502 2011-02-01T09:53:37:&nbsp; Npred .....................: 3683<br>
729   -
730 503 2011-02-01T09:53:37: === GModels ===<br>
731   -
732 504 2011-02-01T09:53:37:&nbsp; Number of models ..........: 2<br>
733   -
734 505 2011-02-01T09:53:37:&nbsp; Number of parameters ......: 11<br>
735   -
736 506 2011-02-01T09:53:37: === GModelPointSource ===<br>
737   -
738 507 2011-02-01T09:53:37:&nbsp; Name ......................: MAGIC Crab
739 508 (Albert et al. 2008, ApJ, 674, 1037)<br>
740   -
741 509 2011-02-01T09:53:37:&nbsp; Instruments ...............: all<br>
742   -
743 510 2011-02-01T09:53:37:&nbsp; Number of parameters ......: 6<br>
744   -
745 511 2011-02-01T09:53:37:&nbsp; Number of spatial par's ...: 2<br>
746   -
747 512 2011-02-01T09:53:37:&nbsp;&nbsp; RA .......................:
748 513 83.6331 [-360,360] deg (fixed,scale=1)<br>
749   -
750 514 2011-02-01T09:53:37:&nbsp;&nbsp; DEC ......................:
751 515 22.0145 [-90,90] deg (fixed,scale=1)<br>
752   -
753 516 2011-02-01T09:53:37:&nbsp; Number of spectral par's ..: 3<br>
754   -
755 517 2011-02-01T09:53:37:&nbsp;&nbsp; Prefactor ................:
756 518 5.7765e-16 +/- 2.43328e-17 [1e-23,1e-13] ph/cm2/s/MeV (free,scale=1e-16)<br>
757   -
758 519 2011-02-01T09:53:37:&nbsp;&nbsp; Index ....................:
759 520 -2.49937 +/-&nbsp;0.0330191 [-0,-5]&nbsp; (free,scale=-1)<br>
760   -
761 521 2011-02-01T09:53:37:&nbsp;&nbsp; PivotEnergy ..............:
762 522 300000 [10000,1e+09] MeV (fixed,scale=1e+06)<br>
763   -
764 523 2011-02-01T09:53:37:&nbsp; Number of temporal par's ..: 1<br>
765   -
766 524 2011-02-01T09:53:37:&nbsp;&nbsp; Constant .................: 1
767 525 (relative value) (fixed,scale=1)<br>
768   -
769 526 2011-02-01T09:53:37: === GCTAModelRadialAcceptance ===<br>
770   -
771 527 2011-02-01T09:53:37:&nbsp; Name ......................: Background<br>
772   -
773 528 2011-02-01T09:53:37:&nbsp; Instruments ...............: CTA<br>
774   -
775 529 2011-02-01T09:53:37:&nbsp; Model type ................: "Gaussian"
776 530 * "PowerLaw" * "Constant"<br>
777   -
778 531 2011-02-01T09:53:37:&nbsp; Number of parameters ......: 5<br>
779   -
780 532 2011-02-01T09:53:37:&nbsp; Number of radial par's ....: 1<br>
781   -
782 533 2011-02-01T09:53:37:&nbsp;&nbsp; Sigma ....................:
783 534 3.00467 +/- 0.071261 [0.01,10] deg2 (free,scale=1)<br>
784   -
785 535 2011-02-01T09:53:37:&nbsp; Number of spectral par's ..: 3<br>
786   -
787 536 2011-02-01T09:53:37:&nbsp;&nbsp; Prefactor ................:
788 537 6.17696e-05 +/- 1.89829e-06 [0,0.001] ph/cm2/s/MeV (free,scale=1e-06)<br>
789   -
790 538 2011-02-01T09:53:37:&nbsp;&nbsp; Index ....................:
791 539 -1.87195 +/-&nbsp;0.0166039 [-0,-5]&nbsp; (free,scale=-1)<br>
792   -
793 540 2011-02-01T09:53:37:&nbsp;&nbsp; PivotEnergy ..............:
794 541 1e+06 [10000,1e+09] MeV (fixed,scale=1e+06)<br>
795   -
796 542 2011-02-01T09:53:37:&nbsp; Number of temporal par's ..: 1<br>
797   -
798 543 2011-02-01T09:53:37:&nbsp;&nbsp; Constant .................: 1
799 544 (relative value) (fixed,scale=1)<br>
800   -
801 545 2011-02-01T09:53:37: <br>
802   -
803 546 2011-02-01T09:53:37: Application "ctlike" terminated after consuming 41
804 547 seconds of CPU time.
805 548 </p>
806   -
807 549 <p style="padding-top: 0pt; text-align: left;" class="Body">The
808 550 maximum likelihood optimizer required 4 iterations to converge. This is
809 551 pretty fast, but recall that we used the same model file for the
... ... @@ -816,14 +558,10 @@ will see that the optimizer requires a couple of more iterations, but
816 558 it should converge to the same solution (provided that the initial
817 559 values are not too far of the best fitting values).&nbsp;
818 560 </p>
819   -
820 561 <br>
821   -
822 562 <br>
823   -
824 563 <p class="Title"><a name="Doing_an_unbinned_analysis"></a>Doing
825 564 an unbinned analysis</p>
826   -
827 565 <p style="padding-top: 0pt; text-align: left;" class="Body">As
828 566 gamma-ray events are rare, the counts maps generated by <span style="font-family: Courier New,Courier,monospace;">ctbin</span>
829 567 will in general be sparse, having many empty pixels, in
... ... @@ -832,9 +570,7 @@ of working directly on the event list without binning the events in a
832 570 counts map. We
833 571 will see the benefit of such an analysis later once we re-run <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
834 572 in unbinned mode.</p>
835   -
836 573 <br>
837   -
838 574 <p style="padding-top: 0pt; text-align: left;" class="Body">For
839 575 unbinned analysis we have first to define the data
840 576 space region over which the analysis is done. This is similiar to the <span style="font-family: Courier New,Courier,monospace;">ctbin</span>
... ... @@ -849,9 +585,7 @@ range is covered, and what time interval is spanned by the data. All
849 585 this is done by the executable <span style="font-family: Courier New,Courier,monospace;">ctselect</span>,
850 586 which replaces the <span style="font-family: Courier New,Courier,monospace;">ctbin</span>
851 587 step in an unbinned analysis.</p>
852   -
853 588 <br>
854   -
855 589 <p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-family: Courier New,Courier,monospace;">ctselect</span>
856 590 performs an event selection by choosing only&nbsp;events within a
857 591 given
... ... @@ -863,31 +597,19 @@ called an &lt;span style=&quot;font-weight: bold;&quot;&gt;acceptance cone&lt;/span&gt;.
863 597 The following example shows how <span style="font-family: Courier New,Courier,monospace;">ctselect</span>
864 598 is invoked on the simulated
865 599 test data: </p>
866   -
867 600 <p class="Code">
868 601 &gt; ctselect<br>
869   -
870 602 Input event data file [test/data/crab_events.fits.gz]
871 603 events.fits<br>
872   -
873 604 Output event data file [selected_events.fits] <br>
874   -
875 605 RA for ROI centre (degrees) (0-360) [83.63] <br>
876   -
877 606 Dec for ROI centre (degrees) (-90-90) [22.01] <br>
878   -
879 607 Radius of ROI (degrees) (0-180) [3.0] <br>
880   -
881 608 Start time (MET in s) (0) [0.0] <br>
882   -
883 609 End time (MET in s) (0) [1800.0] <br>
884   -
885 610 Lower energy limit (TeV) (0) [0.1] <br>
886   -
887 611 Upper energy limit (TeV) (0) [100.0]<br>
888   -
889 612 </p>
890   -
891 613 <p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-family: Courier New,Courier,monospace;">ctselect</span>
892 614 takes the input event list <span style="font-family: Courier New,Courier,monospace;">events.fits</span>,
893 615 performs an event selection, and writes the selected event into the
... ... @@ -901,66 +623,44 @@ by respecting the same syntax that has been implemented for Fermi-LAT.
901 623 The following image is a screen dump of the data
902 624 selection keywords that have been written to the <span style="font-family: Courier New,Courier,monospace;">EVENTS</span>
903 625 header in the file <span style="font-family: Courier New,Courier,monospace;">selected_events.fits</span>:</p>
904   -
905 626 <br>
906   -
907 627 <p style="padding-top: 0pt; text-align: center;" class="Body">&nbsp;<img style="width: 456px; height: 310px;" alt="Data selection keywords" src="images/dskeys.jpg">
908 628 </p>
909   -
910 629 <br>
911   -
912 630 <p style="padding-top: 0pt; text-align: left;" class="Body">It
913 631 is important for unbinned analysis that these data selection keywords
914 632 exist. If they don't exist, <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
915 633 will not execute in unbinned mode.</p>
916   -
917 634 <br>
918   -
919 635 <p style="padding-top: 0pt; text-align: left;" class="Body">Below
920 636 we show also for completeness the last few lines of the <span style="font-family: Courier New,Courier,monospace;">ctselect.log</span>
921 637 file. It gives information about the specific data selection that has
922 638 been performed.
923 639 </p>
924   -
925 640 <p class="Code">
926 641 2011-02-01T19:58:34: +=================+<br>
927   -
928 642 2011-02-01T19:58:34: | Event selection |<br>
929   -
930 643 2011-02-01T19:58:34: +=================+<br>
931   -
932 644 2011-02-01T19:58:34:&nbsp; Time range ................: 0-1800<br>
933   -
934 645 2011-02-01T19:58:34:&nbsp; Energy range ..............: 0.1-100 TeV<br>
935   -
936 646 2011-02-01T19:58:34:&nbsp; Acceptance cone centre ....: RA=83.63,
937 647 DEC=22.01 deg<br>
938   -
939 648 2011-02-01T19:58:34:&nbsp; Acceptance cone radius ....: 3 deg<br>
940   -
941 649 2011-02-01T19:58:34:&nbsp; cfitsio selection .........: TIME
942 650 &gt;= 0 &amp;&amp; TIME &lt;= 1800 &amp;&amp;
943 651 ENERGY &gt;= 0.1 &amp;&amp; ENERGY &lt;= 100
944 652 &amp;&amp; ANGSEP(83.63,<br>
945   -
946 653 22.01,RA,DEC) &lt;= 3<br>
947   -
948 654 2011-02-01T19:58:34:&nbsp; FITS filename .............:
949 655 events.fits[EVENTS][TIME &gt;= 0 &amp;&amp; TIME &lt;=
950 656 1800 &amp;&amp; ENERGY &gt;= 0.1 &amp;&amp; ENERGY
951 657 &lt;= <br>
952   -
953 658 100 &amp;&amp; ANGSEP(83.63,22.01,RA,DEC) &lt;= 3]<br>
954   -
955 659 2011-02-01T19:58:34: <br>
956   -
957 660 2011-02-01T19:58:34: Application "ctselect" terminated after consuming
958 661 10 seconds of CPU time.<br>
959   -
960 662 &nbsp;<br>
961   -
962 663 </p>
963   -
964 664 <p style="padding-top: 0pt; text-align: left;" class="Body">Now
965 665 that the event selection has been performed, <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
966 666 can be run in unbinned mode. To do this, you have to type <span style="font-family: Courier New,Courier,monospace;">UNBINNED</span>
... ... @@ -972,24 +672,16 @@ that has been produced by &lt;span style=&quot;font-family: Courier New,Courier,monospac
972 672 To run <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
973 673 in unbinned mode, type the following:
974 674 </p>
975   -
976 675 <p class="Code">
977 676 &gt; ctlike<br>
978   -
979 677 Maximum likelihood method [BINNED] UNBINNED <br>
980   -
981 678 Calibration database [test/irf] /usr/local/gamma/share/caldb/cta<br>
982   -
983 679 Instrument response function [kb_E_50h_v3] <br>
984   -
985 680 Source model [test/data/crab.xml] /usr/local/gamma/share/models/crab.xml<br>
986   -
987 681 Source model output file [crab_results.xml] <br>
988   -
989 682 Event data file name [test/data/crab_events.fits.gz]
990 683 selected_events.fits
991 684 </p>
992   -
993 685 <p style="padding-top: 0pt; text-align: left;" class="Body">You
994 686 will recognise that <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
995 687 runs much faster in unbinned mode compared to binned mode. This is
... ... @@ -1006,9 +698,7 @@ short event lists, unbinned mode is faster. Unbinned &lt;span style=&quot;font-family: C
1006 698 should also be more
1007 699 precise as no binning is performed, hence there is no loss of
1008 700 information due to histogramming.</p>
1009   -
1010 701 <br>
1011   -
1012 702 <p style="padding-top: 0pt; text-align: left;" class="Body">Below
1013 703 you see the corresponding output from the <span style="font-family: Courier New,Courier,monospace;">ctlike.log</span>
1014 704 file. The fitted parameters are essentially identical to the ones found
... ... @@ -1018,151 +708,91 @@ different event sample that has been used for the analysis: while
1018 708 binned likelihood works on rectangular counts maps, unbinned likelihood
1019 709 works on circular event selection regions. It is thus not possible to
1020 710 select exactly the same events for both analyses!</p>
1021   -
1022 711 <p class="Code">
1023 712 2011-02-02T14:32:54: +=================================+<br>
1024   -
1025 713 2011-02-02T14:32:54: | Maximum likelihood optimisation |<br>
1026   -
1027 714 2011-02-02T14:32:54: +=================================+<br>
1028   -
1029 715 2011-02-02T14:32:54:&nbsp; Initial iteration: func=33730.9,
1030 716 Lambda=0.001<br>
1031   -
1032 717 2011-02-02T14:32:54:&nbsp; Iteration 1: func=33728.3,
1033 718 Lambda=0.0001, delta=2.56377<br>
1034   -
1035 719 2011-02-02T14:32:54:&nbsp; Iteration 2: func=33728.3, Lambda=1e-05,
1036 720 delta=0.00443209<br>
1037   -
1038 721 2011-02-02T14:32:54:&nbsp; Iteration 3: func=33728.3, Lambda=1e-06,
1039 722 delta=5.81336e-06<br>
1040   -
1041 723 2011-02-02T14:32:54:&nbsp; Iteration 4: func=33728.3, Lambda=1e-07,
1042 724 delta=1.31549e-08<br>
1043   -
1044 725 2011-02-02T14:32:54: <br>
1045   -
1046 726 2011-02-02T14:32:54: +=========================================+<br>
1047   -
1048 727 2011-02-02T14:32:54: | Maximum likelihood optimisation results |<br>
1049   -
1050 728 2011-02-02T14:32:54: +=========================================+<br>
1051   -
1052 729 2011-02-02T14:32:54: === GOptimizerLM ===<br>
1053   -
1054 730 2011-02-02T14:32:54:&nbsp; Optimized function value ..: 33728.3<br>
1055   -
1056 731 2011-02-02T14:32:54:&nbsp; Absolute precision ........: 1e-06<br>
1057   -
1058 732 2011-02-02T14:32:54:&nbsp; Optimization status .......: converged<br>
1059   -
1060 733 2011-02-02T14:32:54:&nbsp; Number of parameters ......: 11<br>
1061   -
1062 734 2011-02-02T14:32:54:&nbsp; Number of free parameters .: 5<br>
1063   -
1064 735 2011-02-02T14:32:54:&nbsp; Number of iterations ......: 4<br>
1065   -
1066 736 2011-02-02T14:32:54:&nbsp; Lambda ....................: 1e-07<br>
1067   -
1068 737 2011-02-02T14:32:54:&nbsp; Maximum log likelihood ....: -33728.3<br>
1069   -
1070 738 2011-02-02T14:32:54:&nbsp; Npred .....................: 4048<br>
1071   -
1072 739 2011-02-02T14:32:54: === GModels ===<br>
1073   -
1074 740 2011-02-02T14:32:54:&nbsp; Number of models ..........: 2<br>
1075   -
1076 741 2011-02-02T14:32:54:&nbsp; Number of parameters ......: 11<br>
1077   -
1078 742 2011-02-02T14:32:54: === GModelPointSource ===<br>
1079   -
1080 743 2011-02-02T14:32:54:&nbsp; Name ......................: MAGIC Crab
1081 744 (Albert et al. 2008, ApJ, 674, 1037)<br>
1082   -
1083 745 2011-02-02T14:32:54:&nbsp; Instruments ...............: all<br>
1084   -
1085 746 2011-02-02T14:32:54:&nbsp; Number of parameters ......: 6<br>
1086   -
1087 747 2011-02-02T14:32:54:&nbsp; Number of spatial par's ...: 2<br>
1088   -
1089 748 2011-02-02T14:32:54:&nbsp;&nbsp; RA .......................:
1090 749 83.6331 [-360,360] deg (fixed,scale=1)<br>
1091   -
1092 750 2011-02-02T14:32:54:&nbsp;&nbsp; DEC ......................:
1093 751 22.0145 [-90,90] deg (fixed,scale=1)<br>
1094   -
1095 752 2011-02-02T14:32:54:&nbsp; Number of spectral par's ..: 3<br>
1096   -
1097 753 2011-02-02T14:32:54:&nbsp;&nbsp; Prefactor ................:
1098 754 5.83432e-16 +/- 2.44527e-17 [1e-23,1e-13] ph/cm2/s/MeV
1099 755 (free,scale=1e-16)<br>
1100   -
1101 756 2011-02-02T14:32:54:&nbsp;&nbsp; Index ....................:
1102 757 -2.50725 +/- 0.0328297 [-0,-5]&nbsp; (free,scale=-1)<br>
1103   -
1104 758 2011-02-02T14:32:54:&nbsp;&nbsp; PivotEnergy ..............:
1105 759 300000 [10000,1e+09] MeV (fixed,scale=1e+06)<br>
1106   -
1107 760 2011-02-02T14:32:54:&nbsp; Number of temporal par's ..: 1<br>
1108   -
1109 761 2011-02-02T14:32:54:&nbsp;&nbsp; Constant .................: 1
1110 762 (relative value) (fixed,scale=1)<br>
1111   -
1112 763 2011-02-02T14:32:54: === GCTAModelRadialAcceptance ===<br>
1113   -
1114 764 2011-02-02T14:32:54:&nbsp; Name ......................: Background<br>
1115   -
1116 765 2011-02-02T14:32:54:&nbsp; Instruments ...............: CTA<br>
1117   -
1118 766 2011-02-02T14:32:54:&nbsp; Model type ................: "Gaussian"
1119 767 * "PowerLaw" * "Constant"<br>
1120   -
1121 768 2011-02-02T14:32:54:&nbsp; Number of parameters ......: 5<br>
1122   -
1123 769 2011-02-02T14:32:54:&nbsp; Number of radial par's ....: 1<br>
1124   -
1125 770 2011-02-02T14:32:54:&nbsp;&nbsp; Sigma ....................:
1126 771 3.03472 +/- 0.0398509 [0.01,10] deg2 (free,scale=1)<br>
1127   -
1128 772 2011-02-02T14:32:54:&nbsp; Number of spectral par's ..: 3<br>
1129   -
1130 773 2011-02-02T14:32:54:&nbsp;&nbsp; Prefactor ................:
1131 774 6.18897e-05 +/- 1.74306e-06 [0,0.001] ph/cm2/s/MeV (free,scale=1e-06)<br>
1132   -
1133 775 2011-02-02T14:32:54:&nbsp;&nbsp; Index ....................:
1134 776 -1.86369 +/- 0.0156024 [-0,-5]&nbsp; (free,scale=-1)<br>
1135   -
1136 777 2011-02-02T14:32:54:&nbsp;&nbsp; PivotEnergy ..............:
1137 778 1e+06 [10000,1e+09] MeV (fixed,scale=1e+06)<br>
1138   -
1139 779 2011-02-02T14:32:54:&nbsp; Number of temporal par's ..: 1<br>
1140   -
1141 780 2011-02-02T14:32:54:&nbsp;&nbsp; Constant .................: 1
1142 781 (relative value) (fixed,scale=1)<br>
1143   -
1144 782 2011-02-02T14:32:54: <br>
1145   -
1146 783 2011-02-02T14:32:54: Application "ctlike" terminated after consuming 2
1147 784 seconds of CPU time.<br>
1148   -
1149 785 </p>
1150   -
1151 786 <br>
1152   -
1153 787 <br>
1154   -
1155 788 <p class="Title"><a name="Some_final_remarks"></a>Some
1156   -final remarks</p>
1157   -
  789 +final remarks <span style="color: red;">(updated for ctatools-00-02-03)</span></p>
1158 790 <p style="padding-top: 0pt; text-align: left;" class="Body">First
1159 791 you should notice that <span style="font-weight: bold;">ctatools
1160 792 are in the prototyping phase</span>. If GammaLib and ctatools are
1161 793 installed on your system you should be able to run the above example
1162 794 without any problems, and you can do even much more.</p>
1163   -
1164 795 <br>
1165   -
1166 796 <p style="padding-top: 0pt; text-align: left;" class="Body">You
1167 797 may specify longer integration times for the simulation and for the
1168 798 analysis, you can have several point sources in the
... ... @@ -1176,66 +806,52 @@ generator, hence you cannot simulate events for spectral laws different
1176 806 from power laws for the moment. You may try, however, fitting the
1177 807 sources with other spectral laws, yet I have not tried this, and I
1178 808 cannot guarantee that it works.</p>
1179   -
1180 809 <br>
1181   -
1182 810 <p style="padding-top: 0pt; text-align: left;" class="Body">There
1183 811 is also only one radial acceptance model defined so far, and you should
1184 812 use the model definition that is given in the example.</p>
1185   -
1186 813 <br>
1187   -
1188   -<p style="padding-top: 0pt; text-align: left;" class="Body">Also,
1189   -<span style="font-weight: bold;">don't fiddle around with
1190   -other projections and coordinate systems in
1191   -<span style="font-family: Courier New,Courier,monospace;">ctbin</span></span><span style="font-family: Courier New,Courier,monospace;">.</span>
1192   -The cartesian projection is the only one that so far is
1193   -implemented, and galactic coordinates have not been tested so far.</p>
1194   -
  814 +<p style="padding-top: 0pt; text-align: left;" class="Body">So far, there are four projection types supported: <span style="font-family: Courier New,Courier,monospace;">AZP</span>, <span style="font-family: Courier New,Courier,monospace;">CAR</span>, <span style="font-family: Courier New,Courier,monospace;">STG</span>, and <span style="font-family: Courier New,Courier,monospace;">TAN</span>. You can use them in Galactic (<span style="font-family: Courier New,Courier,monospace;">GAL</span>) or celestial (<span style="font-family: Courier New,Courier,monospace;">CEL</span>) coordinates.</p>
1195 815 <br>
1196   -
1197 816 <p style="padding-top: 0pt; text-align: left;" class="Body">The
1198 817 instrument response function that has been implemented so far in
1199 818 GammaLib (yes, it is in GammaLib, not in ctatools) is very simple. It
1200   -just reads Konrad's effective area files to get an <span style="font-weight: bold;">effective area that is so far
1201   -independent of offset angle</span>. <span style="font-family: Courier New,Courier,monospace;">ctobssim</span>
  819 +just reads Konrad's effective area files to get the onaxis effective
  820 +area. It is assumed that the effective area varies with offset angle,
  821 +and a Gaussian as function of offset angle squared has been implemented
  822 +for the functional form of this variation. By default, the <span style="font-family: Courier New,Courier,monospace;">sigma</span> of this Gaussian is fixed to 3 deg<sup>2</sup>.
  823 +This value can not be modified using the ctatools, but it can be
  824 +altered using the Python interface. In any case, this treatment of the
  825 +offset angle dependence is only preliminary and <span style="font-weight: bold;">will be changed as soon as a format has been defined for the CTA response functions</span>.</p><p style="padding-top: 0pt; text-align: left;" class="Body"></p><p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-family: Courier New,Courier,monospace;">ctobssim</span>
1202 826 and <span style="font-family: Courier New,Courier,monospace;">ctlike</span>
1203 827 query for the name of the instrument response function file, and you
1204 828 may specify different
1205   -response files if you like. To see what is available, type (adjust the
  829 +response files if you want to study the impact of array configuration on the results. To see what is available, type (adjust the
1206 830 path corresponding to your installation directory):
1207 831 </p>
1208   -
1209 832 <p class="Code">&gt; ls
1210 833 /usr/local/gamma/share/caldb/cta<br>
1211   -
1212 834 kb_A_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1213 835 kb_D_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1214 836 kb_G_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1215 837 kb_J_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1216 838 kb_NB_50h_v3.dat<br>
1217   -
1218 839 kb_B_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1219 840 kb_E_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1220 841 kb_H_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1221 842 kb_K_50h_v3.dat<br>
1222   -
1223 843 kb_C_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1224 844 kb_F_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1225 845 kb_I_50h_v3.dat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1226 846 kb_NA_50h_v3.dat<br>
1227   -
1228 847 </p>
1229   -
1230 848 <p style="padding-top: 0pt; text-align: left;" class="Body">The
1231 849 point spread function (PSF) definition is also read from these files.
1232 850 So far, the <span style="font-weight: bold;">PSF is a
1233 851 simple&nbsp;Gaussian</span>. The energy dependent Gaussian
1234 852 width is defined by
1235 853 the r68 parameter in Konrad's response files.</p>
1236   -
1237 854 <br>
1238   -
1239 855 <p style="padding-top: 0pt; text-align: left;" class="Body"><span style="font-weight: bold;">Lifetime
1240 856 is assumed to be 100%</span>. I'm not sure whether lifetime is
1241 857 folded in the
... ... @@ -1243,37 +859,33 @@ effective areas of Konrad&#39;s response files, if not, a corresponding
1243 859 correction should be applied to all source fluxes obtained with the
1244 860 ctatools.
1245 861 </p>
1246   -
1247 862 <br>
1248   -
1249 863 <p style="padding-top: 0pt; text-align: left;" class="Body">Finally,
1250 864 if
1251 865 you want to have the log file also dumped to the screen as the
1252 866 executable runs, add <span style="font-family: Courier New,Courier,monospace;">debug=yes</span>
1253 867 on the command line, e.g.
1254 868 </p>
1255   -
1256 869 <p class="Code">&gt; ctlike debug=yes
1257 870 </p>
1258   -
1259 871 <p style="padding-top: 0pt; text-align: left;" class="Body">
1260 872 And now: <span style="font-weight: bold;">enjoy playing
1261 873 with ctatools</span>.
1262 874 </p>
1263   -
1264 875 <br>
1265   -
1266 876 <br>
1267   -
1268 877 <p class="Title"><a name="Getting_Help"></a>Getting
1269 878 Help</p>
1270   -
1271 879 <p style="padding-top: 0pt; text-align: left;" class="Body">
1272 880 Any questions, bug reports, or suggested enhancements related to
1273 881 ctatools and GammaLib&nbsp;should be submitted
1274 882 to <a href="mailto:knodlseder@cesr.fr">knodlseder@cesr.fr</a>
1275 883 .
1276 884 </p>
1277   -
1278   -</body>
1279   -</html>
  885 +<br>
  886 +<hr size="1">
  887 +<p class="Body">Last updated by: J&uuml;rgen
  888 +Kn&ouml;dlseder 9 July
  889 +2011
  890 +</p>
  891 +</body></html>
1280 892 \ No newline at end of file
... ...