scripts - Command line tools#

gammapy#

Gammapy command line interface (CLI).

Gammapy is a Python package for gamma-ray astronomy.

Use --help to see available sub-commands, as well as the available arguments and options for each sub-command.

For further information, see https://gammapy.org/ and https://docs.gammapy.org/

Examples
——–
$ gammapy –help
$ gammapy –version
$ gammapy info –help
$ gammapy info
gammapy [OPTIONS] COMMAND [ARGS]...

Options

--log-level <log_level>#

Logging verbosity level.

Options

debug | info | warning | error

--ignore-warnings#

Ignore warnings?

--version#

Print version and exit.

analysis#

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 [OPTIONS] COMMAND [ARGS]...

config#

Writes default configuration file.

gammapy analysis config [OPTIONS]

Options

--filename <filename>#

Filename to store the default configuration values.

Default

config.yaml

--overwrite#

Overwrite existing file.

run#

Performs automated data reduction process.

gammapy analysis run [OPTIONS]

Options

--filename <filename>#

Filename with default configuration values.

Default

config.yaml

--out <out>#

Output folder where reduced datasets are stored.

Default

datasets

--overwrite#

Overwrite existing datasets.

check#

Run checks for Gammapy

gammapy check [OPTIONS] COMMAND [ARGS]...

logging#

Check logging

gammapy check logging [OPTIONS]

download#

Download notebooks and datasets.

Download notebooks published in the Gammapy documentation as well as the
related datasets needed to execute them.
- The option notebooks will download the notebook files into a gammapy-notebooks
folder created at the current working directory.
- The option datasets will download the datasets used in the documentation into a
gammapy-datasets folder created at the current working directory.
Examples
——–
$ gammapy download datasets –out localfolder
$ gammapy download notebooks –release 0.18 –out localfolder
gammapy download [OPTIONS] COMMAND [ARGS]...

datasets#

Download datasets

gammapy download datasets [OPTIONS]

Options

--release <release>#

Number of stable release - ex: 0.18.2)

Default

1.1

--out <out>#

Destination folder.

Default

gammapy-datasets

notebooks#

Download notebooks

gammapy download notebooks [OPTIONS]

Options

--release <release>#

Number of stable release - ex: 0.18.2)

Default

1.1

--out <out>#

Path where the versioned notebook files will be copied.

Default

gammapy-notebooks

info#

Display information about Gammapy

gammapy info [OPTIONS]

Options

--system, --no-system#

Show system info

--version, --no-version#

Show version

--dependencies, --no-dependencies#

Show dependencies

--envvar, --no-envvar#

Show environment variables