Skip to content

Commit

Permalink
Merge branch 'main' into lightcurve_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
QRemy committed May 7, 2024
2 parents 3f46cd2 + 850d386 commit 50bbef6
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 38 deletions.
10 changes: 5 additions & 5 deletions docs/development/dev_howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,11 @@ Here's to commands to check for and fix this (see `here <http://stackoverflow.co

.. code-block:: bash
$ git clean -fdx
$ find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix -c mac
$ find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix -c ascii
$ git status
$ cd astropy_helpers && git checkout -- . && cd ..
git clean -fdx
find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix -c mac
find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix -c ascii
git status
cd astropy_helpers && git checkout -- . && cd ..
Making a pull request that requires backport
++++++++++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion docs/development/doc_howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ To check for broken external links you can use ``tox``:

.. code-block:: bash
$ tox -e linkcheck
tox -e linkcheck
Include png files as images
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/development/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ environment with the content present in `environment-dev.yml` see below:

.. code-block:: bash
$ conda env update --file environment-dev.yml --prune
conda env update --file environment-dev.yml --prune
When developing Gammapy you never want to work on the ``main`` branch, but
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Gammapy is a Python package, so you can of course import and use it from Python:

.. code-block:: bash
$ python
python
Python 3.6.0 | packaged by conda-forge | (default, Feb 10 2017, 07:08:35)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Expand All @@ -58,7 +58,7 @@ IPython is nicer to use for interactive analysis:

.. code-block:: bash
$ ipython
ipython
Python 3.6.0 | packaged by conda-forge | (default, Feb 10 2017, 07:08:35)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help.
Expand Down
56 changes: 28 additions & 28 deletions docs/user-guide/scripts/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ To execute the Gammapy CLI, type the command ``gammapy`` at your terminal shell

.. code-block:: bash
$ gammapy --help
gammapy --help
or equivalently, just type this:

.. code-block:: bash
$ gammapy
gammapy
Either way, the command should print some help text to the console and then
exit:
Expand All @@ -60,10 +60,10 @@ exit:
Examples
--------
$ gammapy --help
$ gammapy --version
$ gammapy info --help
$ gammapy info
gammapy --help
gammapy --version
gammapy info --help
gammapy info
Options:
--log-level [debug|info|warning|error]
Expand Down Expand Up @@ -100,19 +100,19 @@ a datastore and producing the reduced datasets.)

.. code-block:: bash
$ gammapy analysis --help
gammapy analysis --help
Usage: gammapy analysis [OPTIONS] COMMAND [ARGS]...
Automation of configuration driven data reduction process.
Examples
--------
$ gammapy analysis config
$ gammapy analysis run
$ gammapy analysis config --overwrite
$ gammapy analysis config --filename myconfig.yaml
$ gammapy analysis run --filename myconfig.yaml
gammapy analysis config
gammapy analysis run
gammapy analysis config --overwrite
gammapy analysis config --filename myconfig.yaml
gammapy analysis run --filename myconfig.yaml
Options:
-h, --help Show this message and exit.
Expand All @@ -121,15 +121,15 @@ a datastore and producing the reduced datasets.)
config Writes default configuration file.
run Performs automated data reduction process.
$ gammapy analysis config
gammapy analysis config
INFO:gammapy.scripts.analysis:Configuration file produced: config.yaml
You can manually edit this produced configuration file and the run the data reduction process::
You can manually edit this produced configuration file and the run the data reduction process:

.. code-block:: text
.. code-block:: bash
$ gammapy analysis run
gammapy analysis run
INFO:gammapy.analysis.config:Setting logging config: {'level': 'INFO', 'filename': None, 'filemode': None, 'format': None, 'datefmt': None}
INFO:gammapy.analysis.core:Fetching observations.
Expand Down Expand Up @@ -186,7 +186,7 @@ execute it via:

.. code-block:: bash
$ python significance.py
python significance.py
If you want, you can also put the line ``#!/usr/bin/env python`` at the top of
the script, make it executable via ``chmod +x significance.py`` and then you'll
Expand All @@ -213,7 +213,7 @@ you to set analysis parameters without having to edit the file, like this:

.. code-block:: bash
$ python significance.py --help
python significance.py --help
Usage: significance.py [OPTIONS] N_OBSERVED MU_BACKGROUND
Compute significance for a Poisson count observation.
Expand All @@ -225,10 +225,10 @@ you to set analysis parameters without having to edit the file, like this:
--value [sqrt_ts|p_value] Square root TS or p_value
--help Show this message and exit.
$ python significance.py 10 4.2
python significance.py 10 4.2
2.39791813
$ python significance.py 10 4.2 --value p_value
python significance.py 10 4.2 --value p_value
0.01648855015875024
In Python, there are several ways to do command line argument parsing and to
Expand Down Expand Up @@ -290,7 +290,7 @@ This usually looks like this:

.. code-block:: bash
$ gammapy
gammapy
-bash: gammapy: command not found
If you just installed Gammapy, search the install log for the message
Expand All @@ -306,7 +306,7 @@ installed, you can try calling it like this instead:

.. code-block:: bash
$ python -m gammapy
python -m gammapy
This also has the advantage that it avoids issues where users have multiple
versions of Python and Gammapy installed and accidentally launch one they don't
Expand All @@ -318,18 +318,18 @@ Gammapy installed:

.. code-block:: bash
$ which python
$ python -c 'import gammapy'
which python
python -c 'import gammapy'
To see more information about your shell environment, these commands might be
helpful:

.. code-block:: bash
$ python -m site
$ python -m gammapy info
$ echo $PATH
$ conda info -a # if you're using conda
python -m site
python -m gammapy info
echo $PATH
conda info -a # if you're using conda
If you're still stuck or have any question, feel free to ask for help with
installation issues on the Gammapy mailing list of Slack any time!
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/scripts/survey_map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ To execute it run:

.. code-block:: bash
$ python survey_example.py
python survey_example.py

0 comments on commit 50bbef6

Please sign in to comment.