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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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