Machine learning in Planetary Science: compressing Pluto images with scikit-learn and PCA

In a previous post I showed some of the beautiful new images of Pluto from New Horizon’s mission,  coloured using the new Matplotlib perceptual colormaps:


More recently I was experimenting with Principal Component Analysis in scikit-learn, and one of the things I used it for was compression of some of these Pluto images. Below is an example of the first two components from the False Color Pluto image:


You can take a look at the Python code available on this Jupyter Notebook. There are of course better ways of compressing images, but this was a fun way to play around with PCA.

In a follow-up post I will use image registration and image processing techniques to reproduce from the raw channels NASA’s Psychedelic Pluto Image.



NASA’s beautiful ‘Planet On Fire’ images and video

Please give credit for this item to: NASA's Goddard Space Flight Center and NASA Center for Climate Simulation Australia photo courtesy of Flagstaffotos

Credits: NASA’s Goddard Space Flight Center and NASA Center for Climate Simulation.



Click on the image to watch the original video on NASA’s Visualization Explorer site.

Read the full story on NASA’s Visualization Explorer site.

Going for the Moon


While on a flight to Denmark a couple of years ago I happened to read this interview with Swedish astronaut Christer Fuglesang. Towards the end he talks about feasibility (and proximity) of our future missions to the Moon. This subject always gest me excited. If there’s one thing I’m dying to see is a manned missions to the Moon and Mars in my lifetime (I was born in 1971, so I missed by a split hair the first Moon Landing).

I hope we do it soon Christer!

Why go back?

My personal take is that of the dreamer, the 12 years old: why go back to the Moon? Because it’s there…. I mean look at it (photo credits: my uncle, Andrea Niccoli)!!


Beautiful Moon. In evidence the Mare Crisium, and craters Cleomedes, Langrenus, and Vendelinus.

Red Moon

Beautiful red Moon.

Copernicus - Appennines

Beautiful Moon. In evidence the Sinus Iridum in the top left, the Copernicus crater in the centre of the image, and the Apenninus Montes just North of it with the Eratosthenes crater.

Gassendi - Tycho

Beautiful Moon. In evidence the Gassendi crater in the centre of the image, and the Tycho crater to the right with one of the Rays.

On a more serious note, this is what Lunar scientist Paul Spudis has to say about why we should go back:


Moon exploration resources, and educational and vintage material

Rift valleys rewrite moon’s fiery history


Moon gravity Grail

NASA’s LRO Creating Unprecedented Topographic Map of Moon

Moon composition mosaic Galileo

Recent geological activity Lunar Reconnaissance Orbiter

Fresh Crater

NASA’s Beyond Earth Solar System exploration program

We choose the Moon – Wonderful, interactive recreation of Apollo 11 Lunar Landing  – 40th Anniversary celebration

Raw Video: Restored Video of Apollo 11 Moonwalk

All Apollos’ Lunar Surface Journals

BBC – In video: When man went to the Moon

BBC –Aldrin: I was relieved to be second

Fun / idiotic stuff

Space 1999 (cheesy, but unforgotten ’70s TV show, full pilot) – Moon breaks away from Earth.

Dumb and dumber  – We landed on the moon – pure Jim Carey’s genius!!!.

Beautiful Geology from space

In my post Our Earth truly is art I talked about Earth as Art, NASA’s  e-book collection of wonderful satellite images of our planet, and posted my top 3 picks.

In NASA’s Perpetual Ocean animation I talk about a beautiful convergence of maps and art: The Turbulence of Van Gogh and the Labrador Shelf Current, and NASA’s Perpetual Ocean animation.

Here’s another gem: Van Gogh from Space Landsat 7 Acquired 7/13/2005, winner of NASA’s public contest to select the Top Five ‘Earth as Art’ Winners


Do you know any cool apps?

I’d like to pick up my Apps page, which I sort of abandoned a while back.

If you have any great app to recommend, I’d love to hear about it so please add them in the comment section to this post. I am looking for Apps for Android and iPhone/iPad in the following categories – ideally free or very low-cost, possibly open-source:



Cartography and mapping

Planetary Science

Image Processing


Our Earth truly is art

NASA has published a number of really good e-books on planetary science. Typically, each time I stumbled on one, I added a link on my Books page, but I could not skip writing about the latest one, which I discovered thanks to this post on FlowingData. It’s called Earth as Art, and it’s a fantastic book!

The pictures in this book are truly marvellous, and a thing of art. Here are my three favourites – I am so mesmerised by them I can’t stop looking (particularly the Ugab River one).

Enjoy. Check the book, and let me know which ones you like.


Von Kármán Vortices, Southern Pacific Ocean


Ugab River, Namibia


Shoemaker Crater, Australia