Skip to main content

Enhance data visualisations using the "jet" colormap.

Project description

Jet Killer

Jet Killer converts images using the "jet" colormap to a better one (by default "viridis") by using directly the pixel values, without any knowledge about the underlying data.

It can be used as a tool to enhance data visualizations for which the original dataset is unavailable. Use cases include :

  • enhancing figures from sources who made an unfortunate colormap choice,
  • enhancing graphs for which the original data may be lost,
  • enhancing visualizations without having to regenerate it from the original dataset.

Principle

Installation

The following command installs the jetkiller command and the jetkiller package:

pip install jetkiller

Usage

From the command line

Jet Killer is designed to be used mainly from the command line.

Use the following command to convert input_file to output_file:

jetkiller input_file output_file

If you omit the argument output_file, Jet Killer converts input_file to "output.png" by default:

jetkiller input_file

If the file "output.png" already exists, it is overwritten without any warning.

You can change the output colormap (by default "viridis") with the --colormap option. Any value from the matplotlib colormaps is recognized. Here is an example using the colormap "inferno":

jetkiller input_file output_file --colormap inferno

From Python

If you wish to use Jet Killer from Python, you can import the jetkiller package and use the jetkiller function:

import jetkiller as jk
jk.jetkiller("input_image.png", "output_image.png")

The second argument is optional and defaults to "output.png", so that you can write:

import jetkiller as jk
jk.jetkiller("input_image.png")

If the file "output.png" already exists, it is overwritten without any warning.

You can change the output colormap (by default "viridis") with the colormap arugment. Any value from the matplotlib colormaps is recognized.

import jetkiller as jk
jk.jetkiller("input_image.png", "output_image.png", colormap="inferno")

Release History

All releases of this project are listed on the tag page of this repository.

See CHANGES.md for more details on the content of each release.

Versioning

Jet Killer attempts to follow the Semantic Versioning Specification for its version numbers.

License

Jet Killer is distributed under the MIT License. See LICENSE-MIT for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jetkiller-0.8.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file jetkiller-0.8.0.tar.gz.

File metadata

  • Download URL: jetkiller-0.8.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for jetkiller-0.8.0.tar.gz
Algorithm Hash digest
SHA256 a81bd298034ffe51f3cfdfdb622ba5bc5a8be2cd31bbad0d871c166335c53487
MD5 582548827ff3fd65ef6ba245f9cf78d1
BLAKE2b-256 46a6900f20bb6a4053bac5c6f2036de380b4be1547884564b34a44e9cdd34e09

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page