Skip to main content

Generate a Keogram from a directory of images

Project description

GitHub Workflow Status Codecov Sonar Quality Gate GitHub GitHub release (latest SemVer)

Keogram

A Keogram is generated from the center slice 1px wide from a series of images and stitched together to generate an image that shows the sky throughout the captured period. A keogram is a way of displaying the intensity of an auroral display, taken from a narrow part of a screen recorded by a camera, more specifically and ideally in practice a "whole sky camera". This allows one to easily realize the general activity of the display that night, whether it had been interrupted by weather conditions or not, and allows the determination of the regions in which the aurora was seen in terms of latitude and longitude of the area.

However, the initial case that this module was created was to create a keogram of general night skies to judge how clear the night sky was on the night.

Features

  • Generates a keogram from a sorted list of files from a given directory.
  • Saves information about the keogram alongside the image in json format.
  • Can generate a keogram from a mixture of image formats ignoring non image formats.

Installing

pip install keogram

Usage

To generate a keogram with checks on the source directory, and creation of the destination directory call the following. The first parameter is the folder that contains the images that you want to use for the keogram, the second parameter is the destination folder for the keogram. The third parameter (optional) is the filename of the resulting keogram image. Be sure to include the file type extension. The default is "keogram.jpg" The final parameter is weather to save a metadata json file alongside the generated keogram, this is optional and defaults to False. The method returns the MetaData of the file, even if not asked to save it locally.

import keogram

metadata = keogram.create("input_directory", "output_directory", "filename", True)

Running Tests

There are a few ways to run the tests the usual way is to use tox from the top level of the repository

tox

If you already have the dependencies in your python environment you can just use pytest if extra arguments for code coverage

pytest --cov=src

Contributing

Please first raise an issue then fork the repository referencing the issue in commits and raise a Pull Request.

License

Licensed under the MIT. Copyright 2023 Night Works. Copy of the license.

A list of the Licenses of the dependencies of the project can be found at the bottom of the Libraries Summary.

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

keogram-1.0.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

keogram-1.0.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file keogram-1.0.0.tar.gz.

File metadata

  • Download URL: keogram-1.0.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for keogram-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e293e2de78f86b76fd5df72cbb2d67f8d8a43932f52764be52eaf998705449dc
MD5 9e371923a3b1278c84749acdbe1ac02b
BLAKE2b-256 72fada8adb4d5450a7be8040614263c0f23f1da91206a22107695e1f7b6b67fb

See more details on using hashes here.

File details

Details for the file keogram-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: keogram-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for keogram-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4328c7768bc1ce8eb8b1c08ade655652fe4fe98aee761c30aa135a35b346e764
MD5 0dbacaa21462f2a28070420ac3f97a4c
BLAKE2b-256 c230fdd1f1c713cf5df88c441789c3eb3fbfff11ba5d006d119c1f086546d9ab

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