Commit 997a7f46cc3862b85e9a281408c33fc95bcc165b
Merge branch 'master' into 3532-clarification-devel
# Conflicts: # ChangeLog # NEWS # README.md # configure.ac # doc/Doxyfile # doc/source/admin/release_history/index.rst # doc/source/conf.py # sonar-project.properties
Showing
25 changed files
with
160 additions
and
111 deletions
ChangeLog
| ... | ... | @@ -12,6 +12,14 @@ |
| 12 | 12 | Add support of rectangular On/Off regions (#3248) |
| 13 | 13 | |
| 14 | 14 | |
| 15 | +2020-12-02 | |
| 16 | + | |
| 17 | + * Bug fix version 1.7.3 released | |
| 18 | + ================================ | |
| 19 | + | |
| 20 | + Import matplotlib first in example scripts (#3423) | |
| 21 | + | |
| 22 | + | |
| 15 | 23 | 2020-10-15 |
| 16 | 24 | |
| 17 | 25 | * Bug fix version 1.7.2 released | ... | ... |
doc/source/admin/download.rst
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | Download |
| 4 | 4 | ======== |
| 5 | 5 | |
| 6 | -The latest ctools release is ``ctools-1.7.2`` (15 October 2020). | |
| 6 | +The latest ctools release is ``ctools-1.7.3`` (2 December 2020). | |
| 7 | 7 | |
| 8 | 8 | Below a table of ctools releases. Please read the :ref:`sec_release` to |
| 9 | 9 | learn more about new features and corrected bugs in a given release. |
| ... | ... | @@ -11,7 +11,7 @@ learn more about new features and corrected bugs in a given release. |
| 11 | 11 | .. warning:: |
| 12 | 12 | At this stage of the project there is a strict link between the ctools and |
| 13 | 13 | gammalib versions. Please make sure that you have the corresponding gammalib |
| 14 | - version installed before installing ctools. The Mac OS X binary packages | |
| 14 | + version installed before installing ctools. The Mac OS binary packages | |
| 15 | 15 | comprise both ctools and gammalib. |
| 16 | 16 | |
| 17 | 17 | .. |
| ... | ... | @@ -22,7 +22,10 @@ learn more about new features and corrected bugs in a given release. |
| 22 | 22 | |
| 23 | 23 | * - ctools |
| 24 | 24 | - gammalib |
| 25 | - - Mac OS X (10.7+) binary disk image | |
| 25 | + - Mac OS (10.7+) binary disk image | |
| 26 | + * - `1.7.3 <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-1.7.3.tar.gz>`_ | |
| 27 | + - `1.7.3 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-1.7.3.tar.gz>`_ | |
| 28 | + - `ctools-1.7.3-macosx10.7.dmg <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-1.7.3-macosx10.7.dmg>`_ | |
| 26 | 29 | * - `1.7.2 <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-1.7.2.tar.gz>`_ |
| 27 | 30 | - `1.7.2 <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-1.7.2.tar.gz>`_ |
| 28 | 31 | - `ctools-1.7.2-macosx10.7.dmg <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-1.7.2-macosx10.7.dmg>`_ | ... | ... |
doc/source/admin/install_binary.rst
| ... | ... | @@ -3,15 +3,15 @@ |
| 3 | 3 | Installing as binary package |
| 4 | 4 | ============================ |
| 5 | 5 | |
| 6 | -Mac OS X | |
| 7 | --------- | |
| 6 | +Mac OS | |
| 7 | +------ | |
| 8 | 8 | |
| 9 | -After :ref:`downloading the Mac OS X binary disk image <sec_download>` | |
| 9 | +After :ref:`downloading the Mac OS binary disk image <sec_download>` | |
| 10 | 10 | double-click on the image to mount the disk |
| 11 | 11 | |
| 12 | 12 | .. image:: macosx-disk-image.jpg |
| 13 | 13 | :height: 300px |
| 14 | - :alt: Mac OS X binary disk image | |
| 14 | + :alt: Mac OS binary disk image | |
| 15 | 15 | :align: center |
| 16 | 16 | |
| 17 | 17 | Now open the installer package by right-clicking (ctrl-click) on the installer | ... | ... |
doc/source/admin/install_devel.rst
| ... | ... | @@ -3,36 +3,36 @@ |
| 3 | 3 | Installing the development version |
| 4 | 4 | ================================== |
| 5 | 5 | |
| 6 | -The current development version of the code can be downloaded as source | |
| 7 | -tarballs, Mac OS X binaries, or directly from the `Git <https://git-scm.com/>`_ | |
| 8 | -repository. | |
| 6 | +Alternatively to stable releases you can also install the development version | |
| 7 | +of the code which includes the latest features that will become available | |
| 8 | +with the next stable release. Installing the development version is recommended if | |
| 9 | +you want to use latest code features and if you cannot wait for the next | |
| 10 | +stable release. The current ctools development release is ``ctools-2.0.0.dev``. | |
| 9 | 11 | |
| 10 | -The current ctools development release is ``ctools-2.0.0.dev``. | |
| 12 | +Installing the development version is also necessary **if you want to contribute | |
| 13 | +to code development. In that case please follow the instructions on** | |
| 14 | +:ref:`using_git` **and ignore the rest of this page.** | |
| 11 | 15 | |
| 12 | 16 | |
| 13 | -Source tarballs | |
| 14 | ---------------- | |
| 15 | - | |
| 16 | -Download the source tarballs from the following links | |
| 17 | - | |
| 18 | -- `ctools <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-2.0.0.dev.tar.gz>`_ | |
| 19 | -- `GammaLib <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-2.0.0.dev.tar.gz>`_ | |
| 20 | - | |
| 21 | -and follow the instructions on :ref:`sec_install_source`. | |
| 17 | +Getting the development version | |
| 18 | +------------------------------- | |
| 22 | 19 | |
| 20 | +The first step is to get the development version of the code. There are three | |
| 21 | +options for that first step: either get the source tarball or clone the | |
| 22 | +source code from the `Git <https://git-scm.com/>`_ repository or download | |
| 23 | +the binary installers for Mac OS. | |
| 23 | 24 | |
| 24 | -Binary packages | |
| 25 | ---------------- | |
| 26 | 25 | |
| 27 | -Download the installer image from the following link | |
| 26 | +Getting the source tarball | |
| 27 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 28 | 28 | |
| 29 | -- `Mac OS X (10.7+) <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-2.0.0.dev-macosx10.7.dmg>`_ | |
| 30 | - | |
| 31 | -and follow the instructions on :ref:`sec_install_binary`. | |
| 29 | +Download the source tarballs from the following links | |
| 32 | 30 | |
| 31 | +- `ctools <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-2.0.0.dev.tar.gz>`_ | |
| 32 | +- `GammaLib <http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-2.0.0.dev.tar.gz>`_ | |
| 33 | 33 | |
| 34 | -Git repository | |
| 35 | --------------- | |
| 34 | +Cloning the Git repository | |
| 35 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 36 | 36 | |
| 37 | 37 | To clone the gammalib and ctools source codes, type |
| 38 | 38 | |
| ... | ... | @@ -55,19 +55,52 @@ or |
| 55 | 55 | |
| 56 | 56 | $ git config --global http.sslverify "false" |
| 57 | 57 | |
| 58 | -before retrieving the code. | |
| 59 | -Before you will be able to compile the code you need to generate the | |
| 60 | -configuration file using the ``autogen.sh`` script. | |
| 61 | -Also make sure that you're actually on the devel branch of the git | |
| 62 | -repository. GammaLib and ctools can be compiled and configured using | |
| 63 | -the following command sequence (the code will be installed into the | |
| 64 | -``/usr/local/gamma`` directory): | |
| 58 | +before retrieving the code. Before you will be able to compile the code directly | |
| 59 | +you need to generate the configuration file using the ``autogen.sh`` script. | |
| 60 | +Also make sure that you're actually on the devel branch of the git repository. | |
| 61 | +You do this by typing: | |
| 65 | 62 | |
| 66 | 63 | .. code-block:: bash |
| 67 | 64 | |
| 68 | 65 | $ cd gammalib |
| 69 | 66 | $ git checkout devel |
| 70 | 67 | $ ./autogen.sh |
| 68 | + $ cd ../ctools | |
| 69 | + $ git checkout devel | |
| 70 | + $ ./autogen.sh | |
| 71 | + | |
| 72 | + | |
| 73 | +Downloading Mac OS binary packages | |
| 74 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 75 | + | |
| 76 | +You can download the Mac OS installer image from the following link | |
| 77 | + | |
| 78 | +- `Mac OS (10.7+) <http://cta.irap.omp.eu/ctools/releases/ctools/ctools-2.0.0.dev-macosx10.7.dmg>`_ | |
| 79 | + | |
| 80 | +and follow the instructions on :ref:`sec_install_binary`. | |
| 81 | + | |
| 82 | + | |
| 83 | +Compiling the development version | |
| 84 | +--------------------------------- | |
| 85 | + | |
| 86 | +The second step is to compile the development version. You do not need to | |
| 87 | +compile the code in case that you installed the Mac OS binary packages. | |
| 88 | + | |
| 89 | +For code compilation, you can either compile the code directly using ``make`` | |
| 90 | +or you can build a conda package. The latter is preferred if you want to use | |
| 91 | +ctools in a conda environment. We do not recommend to compile the development | |
| 92 | +version directly against a conda version of Python. | |
| 93 | + | |
| 94 | + | |
| 95 | +Compiling the development version | |
| 96 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 97 | + | |
| 98 | +ctools and GammaLib can be compiled and configured using the following sequence | |
| 99 | +of commands (the code will be installed into the ``/usr/local/gamma`` directory): | |
| 100 | + | |
| 101 | +.. code-block:: bash | |
| 102 | + | |
| 103 | + $ cd gammalib | |
| 71 | 104 | $ ./configure |
| 72 | 105 | $ make |
| 73 | 106 | $ make check |
| ... | ... | @@ -75,8 +108,6 @@ the following command sequence (the code will be installed into the |
| 75 | 108 | $ export GAMMALIB=/usr/local/gamma |
| 76 | 109 | $ source $GAMMALIB/bin/gammalib-init.sh |
| 77 | 110 | $ cd ../ctools |
| 78 | - $ git checkout devel | |
| 79 | - $ ./autogen.sh | |
| 80 | 111 | $ ./configure |
| 81 | 112 | $ make |
| 82 | 113 | $ make check |
| ... | ... | @@ -93,34 +124,21 @@ on how to install ctools. |
| 93 | 124 | not stored in the Git repository but are built using |
| 94 | 125 | `swig <http://www.swig.org/>`_ from interface files located in the |
| 95 | 126 | pyext folder. However, you do not need `swig <http://www.swig.org/>`_ |
| 96 | - when fetching a release as the Python wrappers are bundled with the | |
| 97 | - release tarballs. | |
| 127 | + when fetching a tarball as the Python wrappers are bundled with the | |
| 128 | + tarballs. | |
| 98 | 129 | |
| 130 | +Building a conda package | |
| 131 | +~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 99 | 132 | |
| 100 | -Making a conda package | |
| 101 | ----------------------- | |
| 102 | - | |
| 103 | -To create a conda package for the development version, clone the gammalib and | |
| 104 | -ctools source codes using | |
| 105 | - | |
| 106 | -.. code-block:: bash | |
| 107 | - | |
| 108 | - $ git clone https://cta-gitlab.irap.omp.eu/gammalib/gammalib.git | |
| 109 | - $ git clone https://cta-gitlab.irap.omp.eu/ctools/ctools.git | |
| 110 | - | |
| 111 | -and type the following to create the conda packages (make sure that anaconda is | |
| 112 | -included in your ``$PATH`` environment): | |
| 133 | +Alternatively you can create a conda package using the following sequence | |
| 134 | +of commands (make sure that anaconda is included in your ``$PATH`` environment): | |
| 113 | 135 | |
| 114 | 136 | .. code-block:: bash |
| 115 | 137 | |
| 116 | 138 | $ cd gammalib |
| 117 | - $ git checkout devel | |
| 118 | - $ ./autogen.sh | |
| 119 | 139 | $ ./configure |
| 120 | 140 | $ conda-build dev/conda.recipe |
| 121 | 141 | $ cd ../ctools |
| 122 | - $ git checkout devel | |
| 123 | - $ ./autogen.sh | |
| 124 | 142 | $ ./configure |
| 125 | 143 | $ conda-build dev/conda.recipe |
| 126 | 144 | |
| ... | ... | @@ -133,6 +151,11 @@ version as follows: |
| 133 | 151 | $ source activate ctools-devel |
| 134 | 152 | $ conda install --use-local ctools=2.0.0.dev |
| 135 | 153 | |
| 136 | -Note that you can choose between Python 2.7, 3.5, 3.6, 3.7 and 3.8 for your | |
| 137 | -conda environment. | |
| 154 | +Note that you can choose between Python 2.7, 3.5, 3.6, 3.7, 3.8 and 3.9 for | |
| 155 | +your conda environment. If you only need the conda package for one specific | |
| 156 | +Python version you can build the conda package as follows: | |
| 157 | + | |
| 158 | +.. code-block:: bash | |
| 159 | + | |
| 160 | + $ conda-build dev/conda.recipe --python 3.6 | |
| 138 | 161 | ... | ... |
doc/source/admin/release_history/1.7.3.rst
0 → 100644
| 1 | +.. _1.7.3: | |
| 2 | + | |
| 3 | +ctools 1.7.3 release (2 December 2020) | |
| 4 | +====================================== | |
| 5 | + | |
| 6 | +Overview | |
| 7 | +-------- | |
| 8 | + | |
| 9 | +ctools 1.7.3 is a bug fix release for ctools release 1.7. | |
| 10 | + | |
| 11 | +The following bugs were fixed: | |
| 12 | + | |
| 13 | +* [`3423 <https://cta-redmine.irap.omp.eu/issues/3423>`_] - | |
| 14 | + Import matplotlib first in example scripts | ... | ... |
doc/source/admin/release_history/index.rst
examples/show_butterfly.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows butterfly diagram created with ctbutterfly |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2014-2019 Michael Mayer | |
| 5 | +# Copyright (C) 2014-2020 Michael Mayer | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # ======================================== # | ... | ... |
examples/show_irf.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display Instrument Response Function |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2017-2018 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2017-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -20,8 +20,6 @@ |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | 22 | import math |
| 23 | -import gammalib | |
| 24 | -import cscripts | |
| 25 | 23 | try: |
| 26 | 24 | import matplotlib.pyplot as plt |
| 27 | 25 | from matplotlib import ticker |
| ... | ... | @@ -31,6 +29,8 @@ try: |
| 31 | 29 | except (ImportError, RuntimeError): |
| 32 | 30 | print('This script needs the "matplotlib" module') |
| 33 | 31 | sys.exit() |
| 32 | +import gammalib | |
| 33 | +import cscripts | |
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | # ========= # | ... | ... |
examples/show_lightcurve.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display lightcurve generated by cslightcrv |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2017-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # =============== # | ... | ... |
examples/show_model.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows the photon spectrum of a model |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2015-2016 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2015-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # ======================= # | ... | ... |
examples/show_obs.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display summary of observation definition XML file |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2016 Michael Mayer | |
| 5 | +# Copyright (C) 2016-2020 Michael Mayer | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # ==================== # | ... | ... |
examples/show_pha.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Show a spectrum in PHA format |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2013-2016 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2013-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -20,8 +20,6 @@ |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | 22 | import math |
| 23 | -import gammalib | |
| 24 | -import cscripts | |
| 25 | 23 | try: |
| 26 | 24 | import matplotlib.pyplot as plt |
| 27 | 25 | plt.figure() |
| ... | ... | @@ -29,6 +27,8 @@ try: |
| 29 | 27 | except (ImportError, RuntimeError): |
| 30 | 28 | print('This script needs the "matplotlib" module') |
| 31 | 29 | sys.exit() |
| 30 | +import gammalib | |
| 31 | +import cscripts | |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | # ================= # | ... | ... |
examples/show_phases.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display phase information from event list |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2017-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # =========== # | ... | ... |
examples/show_pointings.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display pointings in observation definition XML file |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2017-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # =============================== # | ... | ... |
examples/show_pull_evolution.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows the evolution of the mean and rms pull |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2015-2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2015-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,7 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import cscripts | |
| 23 | 22 | try: |
| 24 | 23 | import matplotlib.pyplot as plt |
| 25 | 24 | plt.figure() |
| ... | ... | @@ -32,6 +31,7 @@ try: |
| 32 | 31 | except ImportError: |
| 33 | 32 | print('This script needs the "numpy" module') |
| 34 | 33 | sys.exit() |
| 34 | +import cscripts | |
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | # =================== # | ... | ... |
examples/show_pull_histogram.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows the pull histogram |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2011-2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2011-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,7 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import cscripts | |
| 23 | 22 | try: |
| 24 | 23 | import matplotlib.pyplot as plt |
| 25 | 24 | plt.figure() |
| ... | ... | @@ -32,6 +31,7 @@ try: |
| 32 | 31 | except ImportError: |
| 33 | 32 | print('This script needs the "numpy" module') |
| 34 | 33 | sys.exit() |
| 34 | +import cscripts | |
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | # =================== # | ... | ... |
examples/show_residuals.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display residuals generated by csresspec |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2017-2019 Luigi Tibaldo | |
| 5 | +# Copyright (C) 2017-2020 Luigi Tibaldo | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -20,8 +20,6 @@ |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | 22 | import math |
| 23 | -import gammalib | |
| 24 | -import cscripts | |
| 25 | 23 | try: |
| 26 | 24 | import matplotlib.pyplot as plt |
| 27 | 25 | plt.figure() |
| ... | ... | @@ -29,6 +27,8 @@ try: |
| 29 | 27 | except (ImportError, RuntimeError): |
| 30 | 28 | print('This script needs the "matplotlib" module') |
| 31 | 29 | sys.exit() |
| 30 | +import gammalib | |
| 31 | +import cscripts | |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | # ======================= # | ... | ... |
examples/show_response.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows one or several CTA response functions. |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2014-2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2014-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -20,8 +20,6 @@ |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | 22 | import math |
| 23 | -import gammalib | |
| 24 | -import cscripts | |
| 25 | 23 | try: |
| 26 | 24 | import matplotlib.pyplot as plt |
| 27 | 25 | plt.figure() |
| ... | ... | @@ -29,6 +27,8 @@ try: |
| 29 | 27 | except (ImportError, RuntimeError): |
| 30 | 28 | print('This script needs the "matplotlib" module') |
| 31 | 29 | sys.exit() |
| 30 | +import gammalib | |
| 31 | +import cscripts | |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | # ================================== # | ... | ... |
examples/show_rmf.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display Redistribution Matrix File |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2018-2019 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2018-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # ======== # | ... | ... |
examples/show_sensitivity.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display differential sensitivity plot generated by cssens |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2015-2017 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2015-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -20,8 +20,6 @@ |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | 22 | import math |
| 23 | -import gammalib | |
| 24 | -import cscripts | |
| 25 | 23 | try: |
| 26 | 24 | import matplotlib.pyplot as plt |
| 27 | 25 | plt.figure() |
| ... | ... | @@ -29,6 +27,8 @@ try: |
| 29 | 27 | except (ImportError, RuntimeError): |
| 30 | 28 | print('This script needs the "matplotlib" module') |
| 31 | 29 | sys.exit() |
| 30 | +import gammalib | |
| 31 | +import cscripts | |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | # ===================== # | ... | ... |
examples/show_significance_distribution.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows the distribution of significances in a given significance map. |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2018-2019 Andreas Specovius | |
| 5 | +# Copyright (C) 2018-2020 Andreas Specovius | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -46,8 +46,6 @@ |
| 46 | 46 | # ========================================================================== |
| 47 | 47 | import sys |
| 48 | 48 | import math |
| 49 | -import gammalib | |
| 50 | -import cscripts | |
| 51 | 49 | try: |
| 52 | 50 | import matplotlib.pyplot as plt |
| 53 | 51 | plt.figure() |
| ... | ... | @@ -60,6 +58,8 @@ try: |
| 60 | 58 | except ImportError: |
| 61 | 59 | print('This script needs the "numpy" module') |
| 62 | 60 | sys.exit() |
| 61 | +import gammalib | |
| 62 | +import cscripts | |
| 63 | 63 | |
| 64 | 64 | |
| 65 | 65 | # ======================= # | ... | ... |
examples/show_spectrum.py
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -33,6 +31,8 @@ try: |
| 33 | 31 | except ImportError: |
| 34 | 32 | print('This script needs the "numpy" module') |
| 35 | 33 | sys.exit() |
| 34 | +import gammalib | |
| 35 | +import cscripts | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | # ===================================== # | ... | ... |
examples/show_ts_distribution.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Display TS distribution generated by cstsdist |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2011-2017 Jurgen Knodlseder | |
| 5 | +# Copyright (C) 2011-2020 Jurgen Knodlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -21,7 +21,6 @@ |
| 21 | 21 | import sys |
| 22 | 22 | import csv |
| 23 | 23 | import math |
| 24 | -import cscripts | |
| 25 | 24 | try: |
| 26 | 25 | import matplotlib.pyplot as plt |
| 27 | 26 | plt.figure() |
| ... | ... | @@ -34,6 +33,7 @@ try: |
| 34 | 33 | except ImportError: |
| 35 | 34 | print('This script needs the "numpy" module') |
| 36 | 35 | sys.exit() |
| 36 | +import cscripts | |
| 37 | 37 | |
| 38 | 38 | |
| 39 | 39 | # ==================== # | ... | ... |
examples/show_variability_evolution.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Shows source variability evolution created with ctfindvar |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2018 Simon Bonnefoy | |
| 5 | +# Copyright (C) 2018-2020 Simon Bonnefoy | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # ========================== # | ... | ... |
examples/show_viscube.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # Show visibility cube |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2019 Juergen Knoedlseder | |
| 5 | +# Copyright (C) 2019-2020 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -19,8 +19,6 @@ |
| 19 | 19 | # |
| 20 | 20 | # ========================================================================== |
| 21 | 21 | import sys |
| 22 | -import gammalib | |
| 23 | -import cscripts | |
| 24 | 22 | try: |
| 25 | 23 | import matplotlib.pyplot as plt |
| 26 | 24 | plt.figure() |
| ... | ... | @@ -28,6 +26,8 @@ try: |
| 28 | 26 | except (ImportError, RuntimeError): |
| 29 | 27 | print('This script needs the "matplotlib" module') |
| 30 | 28 | sys.exit() |
| 29 | +import gammalib | |
| 30 | +import cscripts | |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | # =========================== # | ... | ... |