Commit f356e83ed9a86242173cdb15186d43806b775300

Authored by Jürgen Knödlseder
1 parent 7f2f1e64

Update the Python description

doc/source/user_manual/getting_started/python.rst
... ... @@ -20,7 +20,7 @@ generally not very useful.
20 20  
21 21 .. warning::
22 22  
23   - The GammaLib module needs to be imported before the ctools
  23 + The GammaLib module needs to be imported **before** the ctools
24 24 module so that GammaLib class types are handled correctly.
25 25 So make sure that you **always import the GammaLib module before the ctools
26 26 module.**
... ... @@ -114,11 +114,12 @@ To see what kind of object you actually got, use:
114 114 >>> type(sim.obs()[0].events())
115 115 <class 'gammalib.cta.GCTAEventList'>
116 116  
117   -The CTA event list is implement as the ``GCTAEventList`` class in the
  117 +The CTA event list is implement by the ``GCTAEventList`` class in the
118 118 ``cta`` module of GammaLib.
119 119 To visualise the individual events you can iterate over the events using a
120 120 for loop.
121   -This will show the simulated celestial coordinates (RA, DEC), energies and
  121 +This will show the simulated celestial coordinates (RA, DEC), the
  122 +coordinate in the camera system [DETX, DETY], energies and
122 123 terrestrial times (TT) of all events.
123 124  
124 125 .. code-block:: python
... ... @@ -178,11 +179,11 @@ Where are the user parameters?
178 179 :ref:`ctlike` doesn't in fact need any as all the relevant information is
179 180 already contained in the observation container produced by the
180 181 :ref:`ctobssim` class.
181   -And you make have recognised that we constructed the :ref:`ctlike`
  182 +And you may have recognised that we constructed the :ref:`ctlike`
182 183 instance by using the :ref:`ctobssim` observation container as
183 184 constructor argument.
184 185  
185   -To check how the fit went you may inspect the optimiser class used by
  186 +To check how the fit went you can inspect the optimiser used by
186 187 :ref:`ctlike`:
187 188  
188 189 .. code-block:: python
... ... @@ -198,8 +199,10 @@ To check how the fit went you may inspect the optimiser class used by
198 199 Number of iterations ......: 2
199 200 Lambda ....................: 1e-05
200 201  
201   -Apparently, the fit converged after fitting 4 parameters in 3 iterations.
202   -To inspect the fit results you may print the model container that is a
  202 +Apparently, the fit converged after 2 iterations.
  203 +Out of 10 parameters in the model 4 have been fitted (the others were kept
  204 +fixed).
  205 +To inspect the fit results you can print the model container that is a
203 206 member of the observation container:
204 207  
205 208 .. code-block:: python
... ... @@ -298,7 +301,7 @@ the ``fix()`` method.
298 301 is okay as the ``ctools.ctlike(sim.obs())`` constructor will create
299 302 a copy of the observation container that lives within the :ref:`ctlike`
300 303 instance.
301   - To preserve an observation container after a ctools object went out
  304 + To preserve an observation container after a ctools object goes out
302 305 of scope you have to create a local copy of the container using the
303 306 ``copy()`` method:
304 307  
... ... @@ -327,8 +330,8 @@ Here an example of how to use ``obsutils``:
327 330 >>> import ctools
328 331 >>> from ctools import obsutils
329 332 >>> pattern = obsutils.set_obs_patterns("four", ra=83.63, dec=22.01, offset=1.0)
330   - >>> obs = obsutils.set_obs_list(pattern, duration=1800, emin=0.1, emax=100.0, rad=5.0, caldb="dummy", irf="cta_dummy_irf")
331   - >>> print(like.obs())
  333 + >>> obs = obsutils.set_obs_list(pattern, duration=1800, emin=0.1, emax=100.0, rad=5.0, caldb="prod2", irf="South_50h")
  334 + >>> print(obs)
332 335 === GObservations ===
333 336 Number of observations ....: 4
334 337 Number of predicted events : 0
... ... @@ -339,7 +342,7 @@ Here an example of how to use ``obsutils``:
339 342 >>> print(like.obs().models())
340 343 === GModels ===
341 344 Number of models ..........: 2
342   - Number of parameters ......: 9
  345 + Number of parameters ......: 10
343 346 ...
344 347  
345 348 The module is imported using the ``from ctools import obsutils`` directive.
... ...