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.7.tar.gz
(20.8 MB
view hashes)
Built Distribution
Close
Hashes for gecko_soho-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d286f83f0265ba9b0d2a0d12c083a0eee1fd5d66046c0218f9050622e354c9d0 |
|
MD5 | 11585c9aa5e0b5362c629d82315cf2b8 |
|
BLAKE2b-256 | ac19c462b01f04ed9e269b9a0792df114a93adef027a1a9179151f484c816bc7 |