Commit 2ffff33d1cf16bd8375db5e5e5641ec83f03a99a
1 parent
2207cf93
Oversee and update user documentation.
The documentation was not extended, but it was updated for better reading.
Showing
7 changed files
with
384 additions
and
206 deletions
doc/source/_templates/index.html
| ... | ... | @@ -16,8 +16,9 @@ body %} |
| 16 | 16 | abstract data analysis framework that enables simultaneous |
| 17 | 17 | multi-mission analysis. {%endtrans%}</p> |
| 18 | 18 | |
| 19 | -<p>{%trans%} GammaLib does not rely on any third-party software, except | |
| 20 | -of HEASARC's cfitsio library that is used to implement the FITS interface. | |
| 19 | +<p>{%trans%} Except for HEASARC's cfitsio library that is used to implement | |
| 20 | +the FITS interface, GammaLib does not rely on any other third-party | |
| 21 | +software. | |
| 21 | 22 | Large parts of the code treat gamma-ray observations in an abstract |
| 22 | 23 | representation, and do neither depend on the characteristics of the |
| 23 | 24 | employed instrument, nor on the particular formats in which data and | ... | ... |
doc/source/coding/rules.rst
| ... | ... | @@ -150,8 +150,8 @@ Python rules |
| 150 | 150 | ------------ |
| 151 | 151 | |
| 152 | 152 | All code must be compatible with Python 2.6, 2.7 as well as 3.2 or later. |
| 153 | -As of 2014 most users still have Python 2, even though Python 3 has been | |
| 154 | -out for five years, so using Python 3 features is out of the question. | |
| 153 | +As of 2015 most users still have Python 2, even though Python 3 has been | |
| 154 | +out for seven years, so using Python 3 features is out of question. | |
| 155 | 155 | Also GammaLib is mostly a C++ library with only some high-level analysis |
| 156 | 156 | scripts (e.g. running a complete simulation or analysis or plotting some results) |
| 157 | 157 | that are simple Python code and wouldn't profit much from using new Python 3 features. | ... | ... |
doc/source/installation.rst
| 1 | +.. _installation: | |
| 2 | + | |
| 1 | 3 | Installation |
| 2 | 4 | ============ |
| 3 | 5 | |
| 4 | - | |
| 5 | 6 | .. note :: |
| 6 | 7 | |
| 7 | - These installation instructions apply to gammalib-0.10.0 and | |
| 8 | - later. gammalib-0.10.0 has been built, installed and tested | |
| 8 | + These installation instructions apply to gammalib-0.11.0 and | |
| 9 | + later. gammalib-0.11.0 has been built, installed and tested | |
| 9 | 10 | successfully on Debian, Ubuntu, Mandriva, OpenSUSE, Scientific Linux, |
| 10 | - CentOS, gentoo, Mac OS X, FreeBSD, and OpenSolaris (using gcc), so | |
| 11 | + CentOS, Mac OS X, FreeBSD, and OpenSolaris (using gcc), so | |
| 11 | 12 | hopefully it also installs on your distribution. In case you encounter |
| 12 | 13 | problems, please post a report on the bug tracker or send an e-mail to the |
| 13 | - `mailing list <mailto:gammalib-users@lists.soureforge.net>`_. | |
| 14 | + `mailing list <mailto:ctools@irap.omp.eu>`_. | |
| 15 | + | |
| 16 | +.. _getting: | |
| 14 | 17 | |
| 15 | 18 | Getting GammaLib |
| 16 | 19 | ---------------- |
| 17 | 20 | |
| 18 | 21 | The latest version of the GammaLib source code, documentation, and |
| 19 | 22 | example programs are available on the World-Wide Web from |
| 20 | -`https://sourceforge.net/projects/gammalib/ <https://sourceforge.net/projects/gammalib/>`_. | |
| 23 | +`http://cta.irap.omp.eu/ctools/download.html <http://cta.irap.omp.eu/ctools/download.html>`_. | |
| 24 | + | |
| 25 | +.. _prerequisits: | |
| 21 | 26 | |
| 22 | 27 | Prerequisites |
| 23 | 28 | ------------- |
| 24 | 29 | |
| 25 | -GammaLib should compile on every modern Unix system without any need to | |
| 26 | -install other libraries. To enable support for FITS file handling, | |
| 27 | -however, the cfitsio library from HEASARC needs to be installed. cfitsio | |
| 28 | -exists on many distributions as a prebuilt library, so in general you | |
| 29 | -can directly install it using your package manager. Make sure that you | |
| 30 | +GammaLib should compile on every modern Unix system and on Mac OS X, | |
| 31 | +Windows is not supported. To enable support for FITS file handling | |
| 32 | +the cfitsio library from HEASARC needs to be installed. cfitsio exists | |
| 33 | +on many Linux distributions as a prebuilt library, so in general you | |
| 34 | +can directly install it using your package manager. Make sure that you | |
| 30 | 35 | install the library and the development package, as the cfitsio header |
| 31 | -file (which usually comes in the development package) is needed to | |
| 32 | -compiling GammaLib. | |
| 36 | +file (which usually comes only in the development package) is needed | |
| 37 | +to compiling GammaLib. | |
| 33 | 38 | |
| 34 | 39 | If cfitsio is not available as a prebuilt package, or if you encounter |
| 35 | 40 | some problems with the prebuilt package, cfitsio can be downloaded from |
| 36 | 41 | `http://heasarc.gsfc.nasa.gov/fitsio <http://heasarc.gsfc.nasa.gov/fitsio>`_ |
| 37 | -and be installed from the source (for details, please refer to the | |
| 42 | +and installed from the source files (for details, please refer to the | |
| 38 | 43 | installation instructions on the |
| 39 | 44 | `HEASARC <http://heasarc.gsfc.nasa.gov/fitsio>`_ site). We recommend |
| 40 | 45 | installation of cfitsio in the default GammaLib install directory as a |
| ... | ... | @@ -49,19 +54,54 @@ provides line-editing and history capabilities for text input (GammaLib |
| 49 | 54 | offers however also full functionality without having readline |
| 50 | 55 | installed). readline (which depends on ncurses) is available on most |
| 51 | 56 | system as a prebuilt library, so also here we recommend to use your |
| 52 | -package manager to install the libraries. Also here, the readline (and | |
| 53 | -ncurses) development packages are required, so that the header files | |
| 54 | -become available and the symbolic links are set correctly. | |
| 57 | +package manager to install the libraries if they are not already there. | |
| 58 | +Also here, the readline (and ncurses) development packages are required, | |
| 59 | +so that the header files become available. | |
| 55 | 60 | |
| 56 | 61 | If readline and ncurses are not available as a prebuilt package, or if |
| 57 | 62 | you encounter some problems with the prebuilt packages, both libraries |
| 58 | 63 | can be downloaded from |
| 59 | -`http://ftp.gnu.org/gnu/ <http://ftp.gnu.org/gnu/>`_. | |
| 64 | +`http://ftp.gnu.org/gnu/ <http://ftp.gnu.org/gnu/>`_ | |
| 65 | +and installed from the source files. We recommend to put also those in the | |
| 66 | +default GammaLib install directory ``/usr/local/gamma``. | |
| 67 | + | |
| 68 | +.. _build: | |
| 60 | 69 | |
| 61 | 70 | Building GammaLib |
| 62 | 71 | ----------------- |
| 63 | 72 | |
| 64 | -Download the latest source tarball, save it in an appropriate location, | |
| 73 | +.. note :: | |
| 74 | + | |
| 75 | + You will now learn how to build the GammaLib library from the source files. | |
| 76 | + For Mac OS X there exist also binary packages that are bundled together | |
| 77 | + with ctools, and we recommend using directly these binary packages. The | |
| 78 | + Mac OS X binary packages can be downloaded | |
| 79 | + `here <http://cta.irap.omp.eu/ctools/download.html>`_. | |
| 80 | + | |
| 81 | +.. note :: | |
| 82 | + | |
| 83 | + If you need the latest source code from the git repository that has not | |
| 84 | + yet been released you may also clone the gammalib git repository using :: | |
| 85 | + | |
| 86 | + $ git clone https://cta-git.irap.omp.eu/gammalib | |
| 87 | + | |
| 88 | + In case you encounter an SSL certificat problem, type :: | |
| 89 | + | |
| 90 | + $ export GIT_SSL_NO_VERIFY=true | |
| 91 | + | |
| 92 | + before cloning from git. Step then in the cloned ``gammalib`` directory | |
| 93 | + and type :: | |
| 94 | + | |
| 95 | + $ git checkout devel | |
| 96 | + $ ./autogen.sh | |
| 97 | + | |
| 98 | + This will make sure that you use the validated development trunk and | |
| 99 | + creates the configuration file that is needed to configure | |
| 100 | + GammaLib before compilation. Continue then with the procedure below | |
| 101 | + starting with ``./configure``. | |
| 102 | + | |
| 103 | +To build GammaLib from the source files, download the latest release | |
| 104 | +tarball, save it in an appropriate location, | |
| 65 | 105 | and type :: |
| 66 | 106 | |
| 67 | 107 | $ tar xvfz gammalib-x.y.z.tar.gz |
| ... | ... | @@ -77,14 +117,13 @@ and build GammaLib by typing :: |
| 77 | 117 | $ make |
| 78 | 118 | |
| 79 | 119 | at the operating system prompt. The configuration command customizes the |
| 80 | -Makefiles for the particular system, the make command compiles the | |
| 81 | -source files and builds the library, and the make install command | |
| 82 | -installs the library in the install directory. Type ``./configure`` and not | |
| 83 | -simply configure to ensure that the configuration script in the current | |
| 84 | -directory is run and not some other system-wide configuration script. By | |
| 85 | -default, the install directory is set to ``/usr/local/gamma``. To change the | |
| 86 | -install directory an optional ``--prefix`` argument should be given, for | |
| 87 | -example :: | |
| 120 | +Makefiles for your particular system, the make command compiles the | |
| 121 | +source files and builds the C++ library and Python module. Type | |
| 122 | +``./configure`` and not simply ``configure`` to ensure that the configuration | |
| 123 | +script in the current directory is used and not some other system-wide | |
| 124 | +configuration script. By default, the install directory is set to | |
| 125 | +``/usr/local/gamma``. To change the install directory an optional | |
| 126 | +``--prefix`` argument should be given, for example :: | |
| 88 | 127 | |
| 89 | 128 | $ ./configure --prefix=/usr/local |
| 90 | 129 | |
| ... | ... | @@ -99,10 +138,13 @@ A full list of configuration options can be found using :: |
| 99 | 138 | |
| 100 | 139 | $ ./configure --help |
| 101 | 140 | |
| 141 | +.. _test: | |
| 142 | + | |
| 102 | 143 | Testing GammaLib |
| 103 | 144 | ---------------- |
| 104 | 145 | |
| 105 | -GammaLib should be tested by typing:: | |
| 146 | +Before you install GammaLib you should test the C++ library and Python | |
| 147 | +module by typing:: | |
| 106 | 148 | |
| 107 | 149 | $ make check |
| 108 | 150 | |
| ... | ... | @@ -118,22 +160,23 @@ locations. In this case, add the library directories to the |
| 118 | 160 | ``LD_LIBRARY_PATH`` environment variables (``DYLD_LIBRARY_PATH`` on Mac OS |
| 119 | 161 | X), e.g. :: |
| 120 | 162 | |
| 121 | - export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH | |
| 122 | - | |
| 123 | -or :: | |
| 124 | - | |
| 125 | - setenv LD_LIBRARY_PATH /opt/local/lib:$LD_LIBRARY_PATH | |
| 163 | + $ export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH | |
| 126 | 164 | |
| 127 | -on C shell variants. | |
| 165 | +.. _install: | |
| 128 | 166 | |
| 129 | 167 | Installing GammaLib |
| 130 | 168 | ------------------- |
| 131 | 169 | |
| 132 | -Install GammaLib by typing :: | |
| 170 | +Now you are ready to install GammaLib by typing :: | |
| 133 | 171 | |
| 134 | 172 | $ make install |
| 135 | 173 | |
| 136 | -at the operating system prompt. | |
| 174 | +at the operating system prompt. You may need to prepend a ``sudo`` in | |
| 175 | +case that you need administrator privileges to access the install | |
| 176 | +directory. If you do not have such privileges, chose an install directory | |
| 177 | +that you can access using the ``--prefix`` option. | |
| 178 | + | |
| 179 | +.. _setup: | |
| 137 | 180 | |
| 138 | 181 | Setting up your environment |
| 139 | 182 | --------------------------- |
| ... | ... | @@ -143,20 +186,36 @@ will be done automatically by an initialisation script that will be |
| 143 | 186 | installed in the bin directory. Assuming that you have installed |
| 144 | 187 | GammaLib in the default directory ``/usr/local/gamma`` you need to add the |
| 145 | 188 | following to your ``$HOME/.bashrc`` or ``$HOME/.profile`` script on a Linux |
| 146 | -machine:: | |
| 189 | +machine: | |
| 190 | + | |
| 191 | +.. code-block:: bash | |
| 147 | 192 | |
| 148 | 193 | export GAMMALIB=/usr/local/gamma |
| 149 | 194 | source $GAMMALIB/bin/gammalib-init.sh |
| 150 | 195 | |
| 151 | 196 | If you use C shell or a variant then add the following to your |
| 152 | -``$HOME/.cshrc`` or ``$HOME/.tcshrc`` script:: | |
| 197 | +``$HOME/.cshrc`` or ``$HOME/.tcshrc`` script: | |
| 198 | + | |
| 199 | +.. code-block:: csh | |
| 153 | 200 | |
| 154 | 201 | setenv GAMMALIB /usr/local/gamma |
| 155 | 202 | source $GAMMALIB/bin/gammalib-init.csh |
| 156 | 203 | |
| 204 | +.. _documentation: | |
| 205 | + | |
| 157 | 206 | Installing documentation |
| 158 | 207 | ------------------------ |
| 159 | 208 | |
| 209 | +.. note :: | |
| 210 | + | |
| 211 | + The documentation of the latest GammaLib release can be found at | |
| 212 | + `http://cta.irap.omp.eu/gammalib/ <http://cta.irap.omp.eu/gammalib/>`_. | |
| 213 | + The documentation corresponding to the git development branch can be | |
| 214 | + found at | |
| 215 | + `http://cta.irap.omp.eu/gammalib-devel/ <http://cta.irap.omp.eu/gammalib-devel/>`_. | |
| 216 | + You can however also install the GammaLib documentation locally on your | |
| 217 | + machine, and this section describes how to do that. | |
| 218 | + | |
| 160 | 219 | The GammaLib documentation is shipped together with the source code and |
| 161 | 220 | will be installed in the directory ``$(prefix)/share/doc/gammalib/html``, |
| 162 | 221 | where ``$(prefix)`` is the installation base path, by default |
| ... | ... | @@ -173,8 +232,8 @@ on your system |
| 173 | 232 | the Doxygen package). |
| 174 | 233 | Doxygen will scan the source files for code annotations, and compiles a |
| 175 | 234 | complete documentation of the implemented C++ classes in a set of html |
| 176 | -pages. In addition, it will create a set of man files that can be used by | |
| 177 | -the man command. | |
| 235 | +pages. In addition, it will create a set of man files that can be accessed | |
| 236 | +using the ``man`` command. | |
| 178 | 237 | |
| 179 | 238 | To build and install all documentation, type the following:: |
| 180 | 239 | |
| ... | ... | @@ -204,40 +263,78 @@ To check man support, type for example :: |
| 204 | 263 | |
| 205 | 264 | and you should see the documentation for the GObservations C++ class. |
| 206 | 265 | |
| 207 | -Known Problems | |
| 208 | --------------- | |
| 266 | +.. _issues: | |
| 267 | + | |
| 268 | +Known issues | |
| 269 | +------------ | |
| 270 | + | |
| 271 | +.. topic:: Many (but not all) unit tests fails | |
| 209 | 272 | |
| 210 | -* cfitsio library not found | |
| 211 | 273 | Occasionally it may happen that the cfitsio library is not found when |
| 212 | - configuring GammaLib. This will result is lots of errors during the | |
| 213 | - unit tests. If you are sure that cfitsio is installed, but the path | |
| 214 | - where the library and the path where the fitsio.h reside are | |
| 215 | - non-standard, you may add the paths explicitly during configuration | |
| 216 | - using:: | |
| 274 | + configuring GammaLib. The library will compile successfully without | |
| 275 | + cfitsio, but in that case FITS I/O will not be supported. Consequently, | |
| 276 | + many unit tests will fail. If you are sure that cfitsio is installed, | |
| 277 | + but the path where the library and the path where the ``fitsio.h`` header | |
| 278 | + reside are non-standard, you may add the paths explicitly during | |
| 279 | + configuration using:: | |
| 217 | 280 | |
| 218 | 281 | $ ./configure LDFLAGS='-L/path/to/cftsio/library' CPPFLAGS='-I/path/to/fitsio.h/header' |
| 219 | 282 | |
| 220 | 283 | The same logic applies for finding the readline and ncurses libraries, |
| 221 | - thought these libraries are not manadatory for getting the full | |
| 222 | - GammaLib functionnalities. | |
| 223 | - | |
| 224 | -* Python support | |
| 225 | - GammaLib comes with Python wrappers so that all classes can be directly | |
| 226 | - used from Python. To compile-in Python support, GammaLib needs the | |
| 227 | - Python.h header file, which on many distributions is not installed by | |
| 228 | - default. To make Python.h available, install the Python developer | |
| 229 | - package in your distribution using the package manager. Otherwise you | |
| 230 | - will not be able to use GammaLib from Python. | |
| 231 | - | |
| 232 | -* Mac OS X | |
| 233 | - The Python development package is not installed as default on Mac OS X, | |
| 234 | - and consequently, the Python.h header file is missing that is needed to | |
| 235 | - compile in the Python bindings. The configure script recognises this | |
| 236 | - fact and adjust the build procedure accordingly, but you will not be | |
| 237 | - able to use GammaLib from Python. So better install the Python | |
| 238 | - development package before installing GammaLib (see above). | |
| 239 | - | |
| 240 | -* Solaris | |
| 284 | + although these libraries are not manadatory for getting the full | |
| 285 | + GammaLib functionalities. | |
| 286 | + | |
| 287 | +.. topic:: Python module does not work | |
| 288 | + | |
| 289 | + GammaLib includes a Python module that is built from so called wrapper | |
| 290 | + files that are autogenerated using the `swig <http://www.swig.org/>`_ | |
| 291 | + tool. These wrapper files are shipped with a GammaLib release, but if | |
| 292 | + you use the code from git you need `swig <http://www.swig.org/>`_ | |
| 293 | + to generate the wrapper files during the build step. In any case, | |
| 294 | + to compile the Python module GammaLib needs the ``Python.h`` header file | |
| 295 | + which may not necessarily be installed on your system. Check the output | |
| 296 | + of ``./configure`` to examine the configuration that GammaLib has | |
| 297 | + detected. You may see the following:: | |
| 298 | + | |
| 299 | + * Python (yes) | |
| 300 | + * Python.h (yes) | |
| 301 | + * Python wrappers (yes) | |
| 302 | + * swig (yes) | |
| 303 | + | |
| 304 | + Recall, if the wrappers exist you do not need `swig <http://www.swig.org/>`_, | |
| 305 | + but if the wrappers don't exist you need `swig <http://www.swig.org/>`_. | |
| 306 | + If the ``Python.h`` header file does not exist then install the Python | |
| 307 | + development package. | |
| 308 | + | |
| 309 | +.. topic:: Python unit test fail on El Capitan | |
| 310 | + | |
| 311 | + On Mac OS X 10.11 (El Capitan) the Python unit tests fail when GammaLib | |
| 312 | + is not installed due to the way the ``DYLD_LIBRARY_PATH`` environment | |
| 313 | + variable is handled by the operating system. A (not very elegant) | |
| 314 | + workaround is to install GammaLib before running the unit test using | |
| 315 | + ``make check``. | |
| 316 | + | |
| 317 | + | |
| 318 | +.. topic:: Mac OS X | |
| 319 | + | |
| 320 | + Dependent on the Mac OS X version you are using, not everything that | |
| 321 | + is needed to install GammaLib may be available (e.g. automake, libtool, | |
| 322 | + etc...). The easiest way to get the needed software is using a package | |
| 323 | + management system such as `MacPorts <https://www.macports.org/>`_ or | |
| 324 | + `Homebrew <http://brew.sh/>`_. On a fresh El Capitan install you need | |
| 325 | + for example the following from `Homebrew <http://brew.sh/>`_:: | |
| 326 | + | |
| 327 | + $ brew install automake | |
| 328 | + $ brew install libtool | |
| 329 | + $ brew install cfitsio | |
| 330 | + $ brew install swig | |
| 331 | + | |
| 332 | + `swig <http://www.swig.org/>`_ is only necessary if you installed the | |
| 333 | + code from git. Dependening on your system, you also may need to install | |
| 334 | + the Python development package. | |
| 335 | + | |
| 336 | +.. topic:: Solaris | |
| 337 | + | |
| 241 | 338 | Although GammaLib builds on Solaris using the Sun compiler, there are |
| 242 | 339 | problems with global symbols in shared libraries and exception catching, |
| 243 | 340 | which prevents the FITS interface to work correctly. GammaLib has |
| ... | ... | @@ -248,26 +345,28 @@ Known Problems |
| 248 | 345 | and are likely to be solved in the future. For the time being, it is |
| 249 | 346 | recommended to use cfitsio version 3.250 on Solaris. |
| 250 | 347 | |
| 251 | -* OpenSolaris | |
| 348 | +.. topic:: OpenSolaris | |
| 349 | + | |
| 252 | 350 | On OpenSolaris, the same problems concerning the SunStudio compiler |
| 253 | 351 | occur as for Solaris, and also here, the GNU compiler is the recommended |
| 254 | 352 | tool to build GammaLib. Also here, cfitsio version 3.250 is the |
| 255 | 353 | recommended library as more recent version feature relocation |
| 256 | 354 | problems. GammaLib has been tested using gcc 4.3.2 on OpenSolaris |
| 257 | - 2009.06. Make sure to create the symbolic links :: | |
| 355 | + 2009.06. Make sure to create the following symbolic links if they do | |
| 356 | + not yet exist on your system :: | |
| 258 | 357 | |
| 259 | 358 | $ ln -s /usr/bin/gcc4.3.2 /usr/bin/gcc |
| 260 | 359 | $ ln -s /usr/bin/g++4.3.2 /usr/bin/g++ |
| 261 | 360 | |
| 262 | - which are not there by default to avoid excess warnings during | |
| 263 | - compilation. | |
| 361 | + They avoid excess warnings during compilation. | |
| 264 | 362 | |
| 363 | +.. _help: | |
| 265 | 364 | |
| 266 | 365 | Getting Help |
| 267 | 366 | ------------ |
| 268 | 367 | |
| 269 | 368 | Any questions, bug reports, or suggested enhancements related to |
| 270 | 369 | GammaLib should be submitted via the |
| 271 | -`issue tracker <https://cta-redmine.irap.omp.eu/projects/gammalib>`_ | |
| 370 | +`issue tracker <https://cta-redmine.irap.omp.eu/projects/gammalib/issues/new>`_ | |
| 272 | 371 | or the |
| 273 | -`mailing list <mailto:gammalib-users@lists.soureforge.net>`_. | |
| 274 | 372 | \ No newline at end of file |
| 373 | +`mailing list <mailto:ctools@irap.omp.eu>`_. | |
| 275 | 374 | \ No newline at end of file | ... | ... |
doc/source/quickstart.rst
| 1 | +.. _quickstart: | |
| 2 | + | |
| 1 | 3 | Getting started |
| 2 | 4 | =============== |
| 3 | 5 | |
| 6 | +.. _firststeps: | |
| 7 | + | |
| 4 | 8 | First steps with GammaLib |
| 5 | 9 | ------------------------- |
| 6 | 10 | |
| 7 | 11 | GammaLib comes with a Python interface, and as first step you should |
| 8 | 12 | verify that the Python interface works correctly. You do this by |
| 9 | -typing:: | |
| 13 | +typing: | |
| 14 | + | |
| 15 | +.. code-block:: python | |
| 10 | 16 | |
| 11 | 17 | >>> import gammalib |
| 18 | + >>> gammalib.test() | |
| 12 | 19 | |
| 13 | -If everything works fine you should just get a new Python prompt after | |
| 14 | -importing GammaLib. If you get an error message, make sure that you've | |
| 15 | -setup correctly the GammaLib environment. You basically need the | |
| 20 | +The first command loads the GammaLib Python module, the second command | |
| 21 | +executes the Python unit tests. If all tests are ok the GammaLib Python | |
| 22 | +module has been installed successfully. In case of problems, make sure | |
| 23 | +that you've setup correctly the GammaLib environment. You basically need the | |
| 16 | 24 | ``PYTHONPATH`` variable set to GammaLib's Python site-package, and you also |
| 17 | 25 | have to make sure that GammaLib and any dependent library (cfitsio, |
| 18 | 26 | readline, ncurses) is in the library load path (eventually you may need |
| 19 | -to adjust ``LD_LIBRARY_PATH``). This is all done automatically if you set | |
| 20 | -up the environment as described | |
| 21 | -`here <installation.html#Setting_up_your_environment>`_. | |
| 27 | +to adjust ``LD_LIBRARY_PATH``, or ``DYLD_LIBRARY_PATH`` if you are on Mac | |
| 28 | +OS X). This is all done automatically if you set up the environment as | |
| 29 | +described :ref:`here <setup>`. | |
| 30 | + | |
| 31 | +Now try: | |
| 22 | 32 | |
| 23 | -Now try:: | |
| 33 | +.. code-block:: python | |
| 24 | 34 | |
| 25 | 35 | >>> models = gammalib.GModels() |
| 26 | 36 | >>> print(models) |
| ... | ... | @@ -31,7 +41,9 @@ Now try:: |
| 31 | 41 | You just alloacted your first GammaLib object, which is an empty model |
| 32 | 42 | container. |
| 33 | 43 | |
| 34 | -Now let's append a model to this container. For this, type:: | |
| 44 | +Now let's append a model to this container. For this, type: | |
| 45 | + | |
| 46 | +.. code-block:: python | |
| 35 | 47 | |
| 36 | 48 | >>> pos = gammalib.GSkyDir() |
| 37 | 49 | >>> pos.radec_deg(83.6331, 22.0145) |
| ... | ... | @@ -68,8 +80,8 @@ spatial component of a sky model using ``GModelSpatialPointSource``. As the name |
| 68 | 80 | suggests, the spatial component is a point source. Next, you defined the |
| 69 | 81 | spectral component using ``GModelSpactralPlaw``: a power law with |
| 70 | 82 | normalisation of 1 and a spectral index of -2. Then, you combined the spatial |
| 71 | -and spectral components in a point source model using ``GModelSky``. And | |
| 72 | -finally you appended the point source to the model container allocated | |
| 83 | +and spectral components in a sky model using ``GModelSky``. And | |
| 84 | +finally you appended the sky model to the model container allocated | |
| 73 | 85 | previously using the append method. When you then print the model |
| 74 | 86 | container you see that is contains now one model with 6 parameters. |
| 75 | 87 | Among them, you find the specified source position (parameters ``RA`` and |
| ... | ... | @@ -79,7 +91,9 @@ normalisation has been set to 100 MeV (parameter ``PivotEnergy``) |
| 79 | 91 | and the temporal component has been set by default to a constant (parameter ``Constant``). |
| 80 | 92 | |
| 81 | 93 | Suppose you want to change one of these parameters, such as the |
| 82 | -``PivotEnergy`` that you want to set to 1 TeV. This can be done using:: | |
| 94 | +``PivotEnergy`` that you want to set to 1 TeV. This can be done using: | |
| 95 | + | |
| 96 | +.. code-block:: python | |
| 83 | 97 | |
| 84 | 98 | >>> models[0]['PivotEnergy'].value(1e6) |
| 85 | 99 | >>> print(models) |
| ... | ... | @@ -95,11 +109,15 @@ the container using ``models[0]`` (counting in GammaLib always starts from |
| 95 | 109 | value of a particular parameter. |
| 96 | 110 | |
| 97 | 111 | After all this hard work, you may save your model into a XML file by |
| 98 | -typing:: | |
| 112 | +typing: | |
| 113 | + | |
| 114 | +.. code-block:: python | |
| 99 | 115 | |
| 100 | 116 | >>> models.save('test.xml') |
| 101 | 117 | |
| 102 | -and you can load it from an XML file in memory using:: | |
| 118 | +and you can load it from an XML file in memory using: | |
| 119 | + | |
| 120 | +.. code-block:: python | |
| 103 | 121 | |
| 104 | 122 | >>> new_models = gammalib.GModels('test.xml') |
| 105 | 123 | >>> print(new_models) |
| ... | ... | @@ -117,6 +135,6 @@ Getting Help |
| 117 | 135 | |
| 118 | 136 | Any questions, bug reports, or suggested enhancements related to |
| 119 | 137 | GammaLib should be submitted via the |
| 120 | -`issue tracker <https://cta-redmine.irap.omp.eu/projects/gammalib>`_ | |
| 138 | +`issue tracker <https://cta-redmine.irap.omp.eu/projects/gammalib/issues/new>`_ | |
| 121 | 139 | or the |
| 122 | -`mailing list <mailto:gammalib-users@lists.soureforge.net>`_. | |
| 140 | +`mailing list <mailto:ctools@irap.omp.eu>`_. | ... | ... |
doc/source/user_manual/getting.rst
| 1 | +.. _um_getting: | |
| 2 | + | |
| 1 | 3 | Getting GammaLib |
| 2 | 4 | ================ |
| 3 | 5 | |
| ... | ... | @@ -63,11 +65,12 @@ Installing cfitsio |
| 63 | 65 | HEASARC's cfitsio library comes on many Linux distributions as |
| 64 | 66 | pre-compiled binary, and there are good chances that the package is |
| 65 | 67 | already installed on your system. For Mac OS X, cfitsio can be installed |
| 66 | -from Mac Ports. If you use a pre-compiled binary, make sure that also | |
| 67 | -the developer package is installed on your system. The developer package | |
| 68 | -provides the ``cfitsio.h`` header file which is needed to compile in FITS | |
| 69 | -file support in GammaLib. Please refer to the documentation of your Linux | |
| 70 | -distribution to learn how to install pre-compiled binary packages (note | |
| 68 | +from `MacPorts <https://www.macports.org/>`_ or | |
| 69 | +`Homebrew <http://brew.sh/>`_. If you use a pre-compiled binary, make sure | |
| 70 | +that also the developer package is installed on your system. The developer | |
| 71 | +package provides the ``cfitsio.h`` header file which is needed to compile | |
| 72 | +in FITS file support in GammaLib. Please refer to the documentation of your | |
| 73 | +Linux distribution to learn how to install pre-compiled binary packages (note | |
| 71 | 74 | that the installation of pre-compiled binary packages usually requires |
| 72 | 75 | system administrator privileges). |
| 73 | 76 | |
| ... | ... | @@ -75,12 +78,12 @@ If you need (or prefer) to install cfitsio from source, you can download |
| 75 | 78 | the latest source code from http://heasarc.gsfc.nasa.gov/fitsio. |
| 76 | 79 | Detailed installation instructions can also be found on this site. We |
| 77 | 80 | recommend that you install cfitsio as a shared library in the same |
| 78 | -directory in which you will install , so that cfitsio is automatically | |
| 81 | +directory in which you will install GammaLib, so that cfitsio is automatically | |
| 79 | 82 | found by the GammaLib configure script. By default, GammaLib gets installed |
| 80 | 83 | into the directory ``/usr/local/gamma``. |
| 81 | 84 | |
| 82 | -You can install version 3.290 of cfitsio (the latest version that was | |
| 83 | -available during writing this manual) by executing the following command | |
| 85 | +You can install version 3.290 of cfitsio (the version that was | |
| 86 | +available when writing this manual) by executing the following command | |
| 84 | 87 | sequence ($ denotes the UNIX shell prompt):: |
| 85 | 88 | |
| 86 | 89 | $ wget ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3290.tar.gz |
| ... | ... | @@ -140,12 +143,13 @@ Downloading |
| 140 | 143 | ~~~~~~~~~~~ |
| 141 | 144 | |
| 142 | 145 | To get the latest version of GammaLib, please visit the site |
| 143 | -https://sourceforge.net/projects/gammalib/. The code can be downloaded | |
| 144 | -from this site by clicking on the download button. Alternatively, the | |
| 145 | -code can be downloaded and unpacked from the UNIX prompt using:: | |
| 146 | +http://cta.irap.omp.eu/ctools/download.html. The code can be downloaded | |
| 147 | +from this site by selection the gammalib package from the table. | |
| 148 | +Alternatively, the code can be downloaded and unpacked from the UNIX prompt | |
| 149 | +using:: | |
| 146 | 150 | |
| 147 | - $ wget --no-check-certificate https://downloads.sourceforge.net/project/gammalib/gammalib/gammalib-0.10.0.tar.gz | |
| 148 | - $ tar xfz gammalib-0.10.0.tar.gz | |
| 151 | + $ wget --no-check-certificate http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-0.11.0.tar.gz | |
| 152 | + $ tar xfz gammalib-0.11.0.tar.gz | |
| 149 | 153 | |
| 150 | 154 | The GammaLib source code can also be cloned using git. This method is |
| 151 | 155 | recommended if you plan to contribute to the development of the GammaLib |
| ... | ... | @@ -154,11 +158,13 @@ GammaLib using:: |
| 154 | 158 | |
| 155 | 159 | $ git clone https://cta-git.irap.omp.eu/gammalib |
| 156 | 160 | |
| 157 | -In case that you get:: | |
| 161 | +In case that you get: | |
| 162 | + | |
| 163 | +.. code-block:: bash | |
| 158 | 164 | |
| 159 | 165 | error: SSL certificate problem, verify that the CA cert is OK. |
| 160 | 166 | |
| 161 | -you may add:: | |
| 167 | +you should add:: | |
| 162 | 168 | |
| 163 | 169 | $ export GIT_SSL_NO_VERIFY=true |
| 164 | 170 | |
| ... | ... | @@ -175,7 +181,7 @@ source code directory and type :: |
| 175 | 181 | $ ./configure |
| 176 | 182 | |
| 177 | 183 | to configure the library for compilation. Make sure that you type |
| 178 | -``./configure`` and not simply configure to ensure that the configuration | |
| 184 | +``./configure`` and not simply ``configure`` to ensure that the configuration | |
| 179 | 185 | script in the current directory is invoked and not some other |
| 180 | 186 | system-wide configuration script. |
| 181 | 187 | |
| ... | ... | @@ -223,7 +229,7 @@ gives the directories in which the cfitsio library and the header file |
| 223 | 229 | resides), whether readline and ncurses have been found, and whether |
| 224 | 230 | Python including the Python.h header file is available. Although none of |
| 225 | 231 | these items is mandatory, we highly recommend to install cfitsio to |
| 226 | -support FITS file reading and writing (see section [sec:cfitsio]), and | |
| 232 | +support FITS file reading and writing (see :ref:`sec_cfitsio`), and | |
| 227 | 233 | to install Python to enable GammaLib scripting. |
| 228 | 234 | |
| 229 | 235 | If cfitsio is installed on your system but not found by the configure |
| ... | ... | @@ -245,16 +251,16 @@ has to prefix the header file path. With the same method, you may |
| 245 | 251 | specify any non-standard location for the readline and ncurses |
| 246 | 252 | libraries. |
| 247 | 253 | |
| 248 | -The configuration script also checks for the presence of swig, which is | |
| 249 | -used for building the Python wrapper files. Normally, swig is not needed | |
| 250 | -to create the Python bindings as the necessary wrapper files are shipped | |
| 251 | -with the GammaLib source code. If you plan, however, to modify or to extend the | |
| 252 | -Python interface, you will need swig to rebuild the Python wrappers | |
| 253 | -following changes to the interface. | |
| 254 | +The configuration script also checks for the presence of `swig <http://www.swig.org/>`_, | |
| 255 | +which is used for building the Python wrapper files. Normally, | |
| 256 | +`swig <http://www.swig.org/>`_ is not needed to create the Python bindings as the | |
| 257 | +necessary wrapper files are shipped with the GammaLib source code. If you plan, however, | |
| 258 | +to modify or to extend the Python interface, you will need `swig <http://www.swig.org/>`_ | |
| 259 | +to rebuild the Python wrappers following changes to the interface. | |
| 254 | 260 | |
| 255 | 261 | The configuration summary informs also about all instrument dependent |
| 256 | 262 | interfaces that will be compiled into the GammaLib library. By default, all |
| 257 | -available interfaces (multi-wavelength, *Fermi*-LAT, COMPTEL and CTA) will be | |
| 263 | +available interfaces (multi-wavelength, Fermi/LAT, COMPTEL and CTA) will be | |
| 258 | 264 | compiled into GammaLib. If you wish to disable a particular interface, you may |
| 259 | 265 | use the configure options ``--without-mwl``, ``--without-lat``, |
| 260 | 266 | ``--without-com`` or ``--without-cta``. |
| ... | ... | @@ -262,17 +268,16 @@ For example, :: |
| 262 | 268 | |
| 263 | 269 | $ ./configure --without-mwl --without-lat --without-com |
| 264 | 270 | |
| 265 | -will compile GammaLib without the multi-wavelength, the *Fermi*-LAT and | |
| 271 | +will compile GammaLib without the multi-wavelength, the Fermi/LAT and | |
| 266 | 272 | the COMPTEL interfaces. In this case, only CTA data analysis will be supported. |
| 267 | 273 | |
| 268 | -GammaLib uses `Doxygen <http://www.doxygen.org/>`_ for code documentation, | |
| 269 | -and the latest GammaLib reference manual can be found at | |
| 270 | -http://gammalib.sourceforge.net/doxygen/. In case that you want to | |
| 271 | -install the reference manual also locally on your machine, Doxygen is | |
| 272 | -needed to create the reference manual from the source code. Doxygen is | |
| 274 | +GammaLib uses `Doxygen <http://www.doxygen.org/>`_ for code documentation. | |
| 275 | +In case that you want to install the reference manual also locally on your | |
| 276 | +machine, `Doxygen <http://www.doxygen.org/>`_ is needed to create the reference | |
| 277 | +manual from the source code. `Doxygen <http://www.doxygen.org/>`_ is | |
| 273 | 278 | also needed if you plan to modify or extend the GammaLib library to allow |
| 274 | 279 | rebuilding the reference documentation after changes. Please read see |
| 275 | -section [sec:doxygen] to learn how to build and to install the reference | |
| 280 | +:ref:`sec_doxygen` to learn how to build and to install the reference | |
| 276 | 281 | manual locally. |
| 277 | 282 | |
| 278 | 283 | Finally, there exist a number of options that define how exactly GammaLib |
| ... | ... | @@ -398,8 +403,8 @@ Testing |
| 398 | 403 | ~~~~~~~ |
| 399 | 404 | |
| 400 | 405 | GammaLib comes with an extensive unit test that allows to validate the library |
| 401 | -prior to installation. **We highly recommend to run this unit test | |
| 402 | -before installing the library (see section [sec:install]).** | |
| 406 | +prior to installation. We highly recommend to run this unit test | |
| 407 | +before installing the library (see :ref:`sec_install`). | |
| 403 | 408 | |
| 404 | 409 | To run the unit test type:: |
| 405 | 410 | |
| ... | ... | @@ -407,9 +412,9 @@ To run the unit test type:: |
| 407 | 412 | |
| 408 | 413 | This will start a test of all GammaLib modules by using dedicated executables |
| 409 | 414 | which will print some progress and success information into the |
| 410 | -terminal. After completion of all tests (and assuming that all | |
| 415 | +console. After completion of all tests (and assuming that all | |
| 411 | 416 | instrument dependent modules are enabled), you should see the following |
| 412 | -message in your terminal:: | |
| 417 | +message in your console:: | |
| 413 | 418 | |
| 414 | 419 | =================== |
| 415 | 420 | All 20 tests passed |
| ... | ... | @@ -491,8 +496,8 @@ as this would considerably increase the size of the tarball. In case |
| 491 | 496 | that you want to install the reference manual also locally on your |
| 492 | 497 | machine, you first have to create the documentation using Doxygen. |
| 493 | 498 | |
| 494 | -Assuming that Doxygen is available on your machine (see section | |
| 495 | -:ref:`sec_configure`) you can create the reference documentation by typing :: | |
| 499 | +Assuming that Doxygen is available on your machine (see :ref:`sec_configure`) | |
| 500 | +you can create the reference documentation by typing :: | |
| 496 | 501 | |
| 497 | 502 | $ make doxygen |
| 498 | 503 | |
| ... | ... | @@ -532,35 +537,87 @@ requested class. |
| 532 | 537 | Getting support |
| 533 | 538 | --------------- |
| 534 | 539 | |
| 535 | -Any question, bug report, or suggested enhancement related to GammaLib should be | |
| 536 | -submitted via the Tracker on https://cta-redmine.irap.omp.eu/projects/gammalib | |
| 537 | -or by sending an e-mail to the mailing list. | |
| 540 | +Any questions, bug reports, or suggested enhancements related to | |
| 541 | +GammaLib should be submitted via the | |
| 542 | +`issue tracker <https://cta-redmine.irap.omp.eu/projects/gammalib/issues/new>`_ | |
| 543 | +or the | |
| 544 | +`mailing list <mailto:ctools@irap.omp.eu>`_. | |
| 538 | 545 | |
| 539 | 546 | .. _sec_known_problems: |
| 540 | 547 | |
| 541 | -Known problems | |
| 542 | --------------- | |
| 543 | - | |
| 544 | -* Python support | |
| 545 | - GammaLib comes with Python wrappers so that all classes can be directly | |
| 546 | - used from Python. To compile-in Python support, GammaLib needs the | |
| 547 | - Python.h header file, which on many distributions is not installed by | |
| 548 | - default. To make Python.h available, install the Python developer | |
| 549 | - package in your distribution using the package manager. Otherwise you | |
| 550 | - will not be able to use GammaLib from Python. | |
| 551 | - | |
| 552 | -* Mac OS X | |
| 553 | - The Python development package is not installed as default on Mac OS X, | |
| 554 | - and consequently, the Python.h header file is missing that is needed to | |
| 555 | - compile in the Python bindings. The configure script recognises this | |
| 556 | - fact and adjust the build procedure accordingly, but you will not be | |
| 557 | - able to use GammaLib from Python. So better install the Python | |
| 558 | - development package before installing GammaLib (see above). | |
| 559 | - | |
| 560 | -* Solaris | |
| 561 | - Although GammaLib builds on Solaris using the Sun compiler, there are | |
| 548 | +Known issues | |
| 549 | +------------ | |
| 550 | + | |
| 551 | +.. topic:: Many (but not all) unit tests fails | |
| 552 | + | |
| 553 | + Occasionally it may happen that the cfitsio library is not found when | |
| 554 | + configuring GammaLib. The library will compile successfully without | |
| 555 | + cfitsio, but in that case FITS I/O will not be supported. Consequently, | |
| 556 | + many unit tests will fail. If you are sure that cfitsio is installed, | |
| 557 | + but the path where the library and the path where the ``fitsio.h`` header | |
| 558 | + reside are non-standard, you may add the paths explicitly during | |
| 559 | + configuration using:: | |
| 560 | + | |
| 561 | + $ ./configure LDFLAGS='-L/path/to/cftsio/library' CPPFLAGS='-I/path/to/fitsio.h/header' | |
| 562 | + | |
| 563 | + The same logic applies for finding the readline and ncurses libraries, | |
| 564 | + although these libraries are not manadatory for getting the full | |
| 565 | + GammaLib functionalities. | |
| 566 | + | |
| 567 | +.. topic:: Python module does not work | |
| 568 | + | |
| 569 | + GammaLib includes a Python module that is built from so called wrapper | |
| 570 | + files that are autogenerated using the `swig <http://www.swig.org/>`_ | |
| 571 | + tool. These wrapper files are shipped with a GammaLib release, but if | |
| 572 | + you use the code from git you need `swig <http://www.swig.org/>`_ | |
| 573 | + to generate the wrapper files during the build step. In any case, | |
| 574 | + to compile the Python module GammaLib needs the ``Python.h`` header file | |
| 575 | + which may not necessarily be installed on your system. Check the output | |
| 576 | + of ``./configure`` to examine the configuration that GammaLib has | |
| 577 | + detected. You may see the following:: | |
| 578 | + | |
| 579 | + * Python (yes) | |
| 580 | + * Python.h (yes) | |
| 581 | + * Python wrappers (yes) | |
| 582 | + * swig (yes) | |
| 583 | + | |
| 584 | + Recall, if the wrappers exist you do not need `swig <http://www.swig.org/>`_, | |
| 585 | + but if the wrappers don't exist you need `swig <http://www.swig.org/>`_. | |
| 586 | + If the ``Python.h`` header file does not exist then install the Python | |
| 587 | + development package. | |
| 588 | + | |
| 589 | +.. topic:: Python unit test fail on El Capitan | |
| 590 | + | |
| 591 | + On Mac OS X 10.11 (El Capitan) the Python unit tests fail when GammaLib | |
| 592 | + is not installed due to the way the ``DYLD_LIBRARY_PATH`` environment | |
| 593 | + variable is handled by the operating system. A (not very elegant) | |
| 594 | + workaround is to install GammaLib before running the unit test using | |
| 595 | + ``make check``. | |
| 596 | + | |
| 597 | + | |
| 598 | +.. topic:: Mac OS X | |
| 599 | + | |
| 600 | + Dependent on the Mac OS X version you are using, not everything that | |
| 601 | + is needed to install GammaLib may be available (e.g. automake, libtool, | |
| 602 | + etc...). The easiest way to get the needed software is using a package | |
| 603 | + management system such as `MacPorts <https://www.macports.org/>`_ or | |
| 604 | + `Homebrew <http://brew.sh/>`_. On a fresh El Capitan install you need | |
| 605 | + for example the following from `Homebrew <http://brew.sh/>`_:: | |
| 606 | + | |
| 607 | + $ brew install automake | |
| 608 | + $ brew install libtool | |
| 609 | + $ brew install cfitsio | |
| 610 | + $ brew install swig | |
| 611 | + | |
| 612 | + `swig <http://www.swig.org/>`_ is only necessary if you installed the | |
| 613 | + code from git. Dependening on your system, you also may need to install | |
| 614 | + the Python development package. | |
| 615 | + | |
| 616 | +.. topic:: Solaris | |
| 617 | + | |
| 618 | + Although GammaLib builds on Solaris using the Sun compiler, there are | |
| 562 | 619 | problems with global symbols in shared libraries and exception catching, |
| 563 | - which prevents the FITS interface to work correctly. GammaLib has | |
| 620 | + which prevents the FITS interface to work correctly. GammaLib has | |
| 564 | 621 | however been built and tested successfully using the GNU compiler, and |
| 565 | 622 | this is the only build method that is currently supported. Problems have |
| 566 | 623 | also been encountered when compiling cfitsio versions more recent than |
| ... | ... | @@ -568,16 +625,17 @@ Known problems |
| 568 | 625 | and are likely to be solved in the future. For the time being, it is |
| 569 | 626 | recommended to use cfitsio version 3.250 on Solaris. |
| 570 | 627 | |
| 571 | -* OpenSolaris | |
| 628 | +.. topic:: OpenSolaris | |
| 629 | + | |
| 572 | 630 | On OpenSolaris, the same problems concerning the SunStudio compiler |
| 573 | 631 | occur as for Solaris, and also here, the GNU compiler is the recommended |
| 574 | - tool to build GammaLib. Also here, cfitsio version 3.250 is the | |
| 632 | + tool to build GammaLib. Also here, cfitsio version 3.250 is the | |
| 575 | 633 | recommended library as more recent version feature relocation |
| 576 | - problems. GammaLib has been tested using gcc 4.3.2 on OpenSolaris | |
| 577 | - 2009.06. Make sure to create the symbolic links :: | |
| 634 | + problems. GammaLib has been tested using gcc 4.3.2 on OpenSolaris | |
| 635 | + 2009.06. Make sure to create the following symbolic links if they do | |
| 636 | + not yet exist on your system :: | |
| 578 | 637 | |
| 579 | 638 | $ ln -s /usr/bin/gcc4.3.2 /usr/bin/gcc |
| 580 | 639 | $ ln -s /usr/bin/g++4.3.2 /usr/bin/g++ |
| 581 | 640 | |
| 582 | - which are not there by default to avoid excess warnings during | |
| 583 | - compilation. | |
| 641 | + They avoid excess warnings during compilation. | ... | ... |
doc/source/user_manual/introduction.rst
| 1 | +.. _um_intro: | |
| 2 | + | |
| 1 | 3 | Introduction |
| 2 | 4 | ============ |
| 3 | 5 | |
| 4 | 6 | Scope |
| 5 | 7 | ----- |
| 6 | 8 | |
| 7 | -This User Manual provides a complete description of the GammaLib C++ library. | |
| 8 | -It is equally well suited for beginners as for experienced users. | |
| 9 | +This User Manual provides a complete description of the GammaLib C++ library | |
| 10 | +and its Python module. It is equally well suited for beginners as for | |
| 11 | +experienced users. | |
| 9 | 12 | |
| 10 | 13 | Overview |
| 11 | 14 | -------- |
| 12 | 15 | |
| 13 | 16 | GammaLib is a self-contained, instrument independent, open source, |
| 14 | -multi-platform C++ library that implements all code required for the | |
| 15 | -scientific analysis of astronomical gamma-ray data. GammaLib works with | |
| 16 | -high-level data, which are data that are already calibrated and that | |
| 17 | -generally come in form of event lists or histograms. | |
| 18 | - | |
| 19 | -GammaLib does not rely on any third-party software, with the only exception of | |
| 20 | -the cfitsio library from HEASARC that is used to implement the FITS | |
| 21 | -interface. This makes GammaLib basically independent of any other software | |
| 17 | +multi-platform C++ library and Python module that implements all code | |
| 18 | +required for the scientific analysis of astronomical gamma-ray data. | |
| 19 | +GammaLib works with high-level data, which are data that are already | |
| 20 | +calibrated and that generally come in form of event lists or histograms. | |
| 21 | + | |
| 22 | +Except for HEASARC's cfitsio library that is used to implement the FITS | |
| 23 | +interface, GammaLib does not rely on any other third-party software. | |
| 24 | +This makes GammaLib basically independent of any other software | |
| 22 | 25 | package, increasing the maintainability and enhancing the portability of |
| 23 | 26 | the library. |
| 24 | 27 | |
| 25 | -GammaLib potentially supports any gamma-ray astronomy instrument. Large parts of | |
| 26 | -the code treat gamma-ray observations in an abstract representation, and | |
| 27 | -do neither depend on the characteristics of the employed instrument, nor | |
| 28 | -on the particular formats in which data and instrument response | |
| 28 | +GammaLib potentially supports any gamma-ray astronomy instrument. Large | |
| 29 | +parts of the code treat gamma-ray observations in an abstract representation, | |
| 30 | +and do neither depend on the characteristics of the employed instrument, | |
| 31 | +nor on the particular formats in which data and instrument response | |
| 29 | 32 | functions are delivered. Instrument specific aspects are implemented as |
| 30 | 33 | isolated and well defined modules that interact with the rest of the |
| 31 | 34 | library through a common interface. This philosophy also enables the |
| 32 | 35 | joint analysis of data from different instruments, providing a framework |
| 33 | 36 | that allows for consistent broad-band spectral fitting or imaging. |
| 34 | 37 | |
| 35 | -GammaLib source code is freely available under the GNU General Public license | |
| 36 | -version 3. The latest source code can be downloaded from | |
| 37 | -https://sourceforge.net/projects/gammalib/. | |
| 38 | -The issue tracker can be found at | |
| 39 | -https://cta-redmine.irap.omp.eu/projects/gammalib/issues. | |
| 40 | -Further information and documentation on GammaLib can be found at | |
| 41 | -http://cta.irap.omp.eu/gammalib/. | |
| 42 | -The present document applies to GammaLib version 0.10. | |
| 38 | +GammaLib source code is freely available under the GNU General Public | |
| 39 | +license version 3. Relevant links for download, issues and documentation | |
| 40 | +are: | |
| 41 | + | |
| 42 | +* Download: http://cta.irap.omp.eu/ctools/download.html | |
| 43 | +* Issue tracker: https://cta-redmine.irap.omp.eu/projects/gammalib/issues | |
| 44 | +* Documentation: http://cta.irap.omp.eu/gammalib/ | |
| 45 | + | |
| 46 | +The present document applies to GammaLib version 0.11. | |
| 43 | 47 | |
| 44 | 48 | GammaLib is designed to compile on any POSIX compliant platform. So far, |
| 45 | 49 | GammaLib has been successfully compiled and tested on Mac OS X, OpenBSD, OpenSolaris |
| ... | ... | @@ -66,12 +70,6 @@ correspond to the folders in the source code distribution): |
| 66 | 70 | (model), sky maps and sky coordinates (sky), and for the generation |
| 67 | 71 | of analysis executables in form of ftools (app). |
| 68 | 72 | |
| 69 | -- **Instrument specific modules** | |
| 70 | - | |
| 71 | - GammaLib support the analysis of data from the Cherenkov Telescope Array | |
| 72 | - (cta), the *Fermi*/LAT telescope (lat), the COMPTEL telescope (com), | |
| 73 | - and any multi-wavelength information in form of spectral data points (mwl). | |
| 74 | - | |
| 75 | 73 | - **Core services** |
| 76 | 74 | |
| 77 | 75 | GammaLib comprise modules for numerical computations (numerics), linear |
| ... | ... | @@ -81,22 +79,29 @@ correspond to the folders in the source code distribution): |
| 81 | 79 | - **Interfaces** |
| 82 | 80 | |
| 83 | 81 | are implemented for reading and writing of FITS files (fits), XML |
| 84 | - files (xml), Xspec data (xspec) and Virtual Observatory | |
| 85 | - interoperability (vo). | |
| 82 | + files (xml), and Virtual Observatory interoperability (vo). | |
| 83 | + | |
| 84 | +- **Instrument specific modules** | |
| 85 | + | |
| 86 | + GammaLib support the analysis of data from the Cherenkov Telescope Array | |
| 87 | + (cta), the Fermi/LAT telescope (lat), the COMPTEL telescope (com), | |
| 88 | + and any multi-wavelength information in form of spectral data points (mwl). | |
| 86 | 89 | |
| 87 | 90 | .. _fig_structure: |
| 88 | 91 | |
| 89 | 92 | .. figure:: structure.png |
| 90 | - :width: 100% | |
| 93 | + :width: 75% | |
| 94 | + :align: center | |
| 91 | 95 | |
| 92 | - GammaLib structure | |
| 96 | + *GammaLib structure* | |
| 93 | 97 | |
| 98 | +GammaLib is developed by a team of enthousiastic gamma-ray | |
| 99 | +astronomers with support from engineers. | |
| 100 | +We regularily organise | |
| 101 | +`coding sprints <https://cta-redmine.irap.omp.eu/projects/ctools/wiki/Coding_sprints>`_ | |
| 102 | +where key developers but also newcomers meet to discuss the developments | |
| 103 | +and next steps, and advance with the coding of the software. | |
| 94 | 104 | |
| 95 | -GammaLib can be used as C++ application program interface (API) or as a Python | |
| 96 | -module (provided that Python is installed on your system). The GammaLib Python | |
| 97 | -bindings were built using `swig <http://www.swig.org/>`_ version 3.0.2, and are | |
| 98 | -shipped together with the source code. This enables using all | |
| 99 | -GammaLib functionalities from within Python. | |
| 100 | 105 | |
| 101 | 106 | The development of GammaLib has been initiated by scientists from `IRAP (Institut |
| 102 | 107 | de Recherche en Astrophysique et Planetologie) <http://www.irap.omp.eu/>`_, an |
| ... | ... | @@ -104,11 +109,8 @@ astrophysics laboratory of CNRS and of the `University Paul Sabatier |
| 104 | 109 | <http://www.univ-tlse3.fr/>`_ situated in |
| 105 | 110 | Toulouse, France. GammaLib is based on past experience gained in developing |
| 106 | 111 | software for gamma-ray space missions, such as the COMPTEL telescope |
| 107 | -aboard *CGRO*, the SPI telescope aboard *INTEGRAL*, and the LAT | |
| 108 | -telescope aboard *Fermi*. Initial elements of GammaLib can be found in the | |
| 109 | -``spi_toolslib`` that is part of the Off-line Science Analysis (OSA) | |
| 110 | -software distributed by ISDC for the science analysis of *INTEGRAL* | |
| 111 | -data. The development of GammaLib is nowadays mainly driven by the advances in | |
| 112 | -ground-based gamma-ray astronomy, and in particular by the development | |
| 113 | -of the CTA observatory. | |
| 112 | +aboard CGRO, the SPI telescope aboard INTEGRAL, and the LAT | |
| 113 | +telescope aboard Fermi. Today, the development of GammaLib is mainly driven | |
| 114 | +by the needs in ground-based gamma-ray astronomy, and in particular by the | |
| 115 | +development of the CTA observatory. | |
| 114 | 116 | ... | ... |
doc/source/user_manual/structure.png