moonmask

Gets moon visualizations courtesy of Ernie Wright and uses them for artistic collages


Keywords
MOON, ART
License
MIT
Install
pip install moonmask==2.3

Documentation

    _..._           _..._            _..._            _..._            _..._
  .:::::::.       .::::. `.        .::::  `.        .::'   `.        .'     `.
 :::::::::::     :::::::.  :      ::::::    :      :::       :      :         :  
 :::::::::::     ::::::::  :      ::::::    :      :::       :      :         :
 `:::::::::'     `::::::' .'      `:::::   .'      `::.     .'      `.       .'
   `':::''         `'::'-'         `'::.-'           `':..-'          `-...-'

    _..._           _..._           _..._            _..._            _..._
  .'     `.       .'   `::.       .'  ::::.        .' .::::.        .:::::::.
 :         :     :       :::     :    ::::::      :  ::::::::      ::::::::::: 
 :         :     :       :::     :    ::::::      :  ::::::::      :::::::::::
 `.       .'     `.     .::'     `.   :::::'      `. '::::::'      `:::::::::'
   `-...-'         `-..:''         `-.::''          `-.::''          `':::''

moon ascii art courtesy of jsg

moonmask

This is a small library that uses numpy, opencv and Ernie Wright's moon visualizations from the Nasa Visualization Studio to create artistic renderings of moonphases.

intended usage (mac/linux instructions):

  1. First, make sure that pip and python3 are installed. A virtual environment would be a good idea, though would be optional.

  2. Next, install this package. Open terminal or another command line interface on your computer and then install the package by typing:

pip install moonmask
  1. Now to use this package and make an image, open up a python interactive shell by typing:
python
  1. You can now run these commands to simply see the current moon phase:
>>> from moonmask.terminal_ui import TerminalUi 
>>> ui = TerminalUi()
>>> ui.set_moon("moon_today") #"moon_today" could be any key you'd like
>>> ui.show_image("moon_today"

You can add a few commands to use it in a collage made up of different images:

>>> ui.start_new_collage("collage1")
>>> ui.load_new_image("image1", url="SOME_URL")
>>> ui.load_new_image("image2", filename="SOME_FILENAME")
>>> ui.image_to_mask("moon_today", "moon_today_mask")
>>> ui.selected_collage.set_mask(ui.mask_store["moon_today_mask"])
>>> ui.selected_collage.set_positive_space(ui.image_store["image1"])
>>> ui.selected_collage.set_negative_space(ui.image_store["image2"])
>>> ui.selected_collage.combine()
>>> ui.show_collage("collage1")

Updates

There will be updates to this package soon. It is actively being maintained as of March 12, 2019, so please feel free to post bugs and feature requests on this repo.

Resources: