Skip to main content

Utility lib for the Sungrazer project.

Project description

gecko

It's a small tool for working with 'SOHO' mission images. Aims to help the "Sungrazer" comet hunting project.

Currently available features:

  • image data loader
import datetime
from gecko.data import JPEGDataLoader


loader = JPEGDataLoader(camera='c3')  # instantiate data loader with specified camera (c2/c3)

# choose your datetime slice
start_datetime = datetime.datetime(2008, 7, 8, 7, 41, 0)
end_datetime = datetime.datetime(2008, 7, 8, 15, 45, 0)

images_paths = loader.ls_images(start_datetime, end_datetime)  # list all images available for the period
images = [loader.get_image(x) for x in images_paths]  # load them as PIL.JpegImagePlugin.JpegImageFile objects

first_image = images[0]
first_image  # when in Jupyter Notebook you'll be able to render the image just like that
  • simplify image
from gecko.transform import Simplifier

# this thing inverts colors to only white and black to keep the picture simple.
#   `level=150` this tells the handler to whit out the pixel if its 'brightness' (RGB channels) is below this level (integer, 0 < level < 255)
#   `add_pixels=<NUMBER_OF_PIXELS>` adds additional pixels around black ones so it's easier to track them with your eyes
simplifier = Simplifier(level=150, add_pixels=0)  
simplified_images = [simplifier.transform(x) for x in images]  # suppose we have `images` list of objects from the example above

first_simplified_image = simplified_images[0]
first_simplified_image  # when in Jupyter Notebook you'll be able to render the image just like that
  • create gif
from gecko.utils import create_gif

create_gif(images, 'test.gif')  # suppose we have `images` list of objects from the example above
  • display gif
from gecko.utils import display_gif

display_gif('test.gif')  # display the gif inside the Jupyter Notebook

Working on:

  • automated search
  • validator
  • report generator

Contacts: artkrasnyy@gmail.com

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

gecko_soho-0.0.8.tar.gz (18.4 MB view details)

Uploaded Source

Built Distribution

gecko_soho-0.0.8-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file gecko_soho-0.0.8.tar.gz.

File metadata

  • Download URL: gecko_soho-0.0.8.tar.gz
  • Upload date:
  • Size: 18.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for gecko_soho-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a4268ab688584088d0a2b11d0ba6556f843d53613dfbd33b52466b5d200d1a1d
MD5 6594d201b239753b75c18c70473c2d52
BLAKE2b-256 942b23432aef707f91a7c3fb3c8437c2c6e86833ee87ccb59469a79c0f59a0fd

See more details on using hashes here.

File details

Details for the file gecko_soho-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: gecko_soho-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for gecko_soho-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f757166397ccf4d8112a589de3795f508cdc2eaef99db7324645b937aef18491
MD5 1b11ee19b2ee98caf950202a0fc75481
BLAKE2b-256 fc3380ff8aa1226baa68566928a24190cf6a77e7f86f8362de818f60e5a11140

See more details on using hashes here.

Supported by

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