This month went by faster than I expected. Why? It’s because I had too much to do and I was excited enough to write the code and see how things will turn out. Will my ideas to create things in a certain way reflect in my code or not? What would I do if I spent too much time working on the wrong approach? Will I miss the deadline and how would I cope if I did? How my mentors evaluate me until now? Do I reach the full potential of a GSoC student? These things did trouble me a bit but luck was on my side and my mentors were super helpful to guide me through this.
What things I achieved before my first evaluation?
This was the trickiest part of my whole project, an important one too. This is a Julia package with 400+ lines of code which I wrote from scratch with my mentor reviewing my work from time to time.
Why this package?
On a high level, we are trying to achieve a way to represent Astronomical Images in Julia at AstroImages.jl (another new repository I’m working). Astronomical Images are a bit different from our everyday images in JPEG or PNG format, it can be very big in size, carries useful information about the image and comes in its own format i.e FITS. You might have heard about TeraBytes of space required to represent the picture of black-hole. FITS has support in many languages including Python and Julia. The image it carries is usually shipped band-wise. Thus you will get grayscaled images only when you view a band but yes, we can surely do better.
We require an algorithm to process different band data and form a coloured Image and that’s a part of what I’m doing this summer.
The problem is, those grayscaled Images might be taken at different times and with different devices. Many parameters of the sky might have changed. They might have different resolution. So it’s not that simple task to merge 3 bands together and form a coloured RGB image. It obviously requires some processing and this is what this package does.
It simply aligns (i.e reprojection) the band data by a series of steps so that the resulting images can be merged to get an RGB image. It uses interpolation and Sky Coordinates conversions in its backbone to achieve it. The results are somewhat like this. You can see the original image at the left getting aligned and an increase in resolution when a new frame of reference is given.
After achieving a tool to reproject images, next is an algorithm to merge them together into a colourful RGB image. For Astronomical images, we use a different kind of stretch functions while merging 3 or more bands. I wrote down an algorithm which takes 3 FITS images, reprojects them and merge them while applying the chosen stretch function.
PR ref. : #15
The results look like this. You can see 3 grayscaled images getting reprojected into a single coloured image. Different stretch function forms different images. Currently, we support stretch functions like: linear, asinh, log, sqrt.
An Image of Cassiopeia A under different stretch function.
What will I be doing for 2nd month?
Integration of AstroImages.jl with existing plotting libraries in Julia. i.e ability to using plotting features on Astronomical Images.
Integration of AstroImages.jl with Images.jl. Images.jl is a Julia library for interaction with everyday Images and have some cool features in its domain. My focus will be to allow users to use any of its features on AstroImages.
Developing a GUI interface for interaction with AstroImages.