The other day I came across a very awesome graph of the entire universe. It shows more-or-less every object in space we know about on a logarithmic scale from the center of the earth to the edge of the visible universe. It got me thinking about what you can do with large datasets so I decided to play around a little with the tycho-2 catalog. This is a famous catalog in the astronomy world. It contains the position and brightness and some other information of more than 2.5 million stars. That's about 99% of all the stars brighter than 11th magnitude (about 100 times fainter than what you can see with the naked eye!).
I used processing.org as my programming language and wrote a short piece of code to parse through the giant 2,539,913 line datafile and draw a pixel for every star with the brightness of the pixel based on the brightness of the star. And it looked pretty cool. But there was more work to be done. I wanted to use the color information in the catalog to make a color picture of the sky. This is not as straightforward as it might seem. The tycho-2 catalog has the relative brightness of each star measured using a standard blue filter (B) and a standard green filter (V — for historical reasons). Somehow I had to turn that into a color for a computer screen. Luckily a lot of the hard work has been done for me! I found a person who had already worked out screen colors for stars! All I had to do was write a function to approximate a screen color for a given color index (B-V). Sure made that sound easy didn't I?
Now I can map the sky with all the stars and their color and brightness. It looks something like this:
The bright snake-y thing is the milky way. Since we are in the middle of a galaxy when we look through the plane of galaxy we see most of the other stars in that same plane. Think about standing in the middle of a giant disk of dust, if you look straight up you see out of the disk and through a small amount of dust, but if you look right into the disk you see all the dust in a thick cloud. This is the milky way. The dark patches are clouds of gas thick enough to obscure the stars behind them.
The reason it looks like a curve in this picture is because I printed it in equatorial coordinates. These are sky coordinates based on the earth. The middle of the image is directly overhead the equator and the top and bottom are the North and South poles respectively. The milky way is a straight line in the sky, but if you unwrap a spherical map to rectangular coordinates you get all kind of distortion. As an alternative I can also make a map in galactic coordinates. These are coordinates locked to the milky way itself and looks like this:
I'm not sure what to do with these pictures but I am surprised how easy it was to make. I am thinking of other large datasets that might be interesting to play with. Any suggestions?
Here are the full size images and the code I used to make them:
- The Tycho-2 Catalog at CDS
- My processing.org code.
Tycho.pde - Equatorial Map (4096x2048), 6.4 MB -
tycho-equatorial.png - Galactic Map (4096x2048), 5.9 MB -
tycho-galactic.png
If you would like to use the images feel free (this site is published under Creative Commons), drop me a line if you use them for something cool!



