Getting Through GSoC (I guess so)

There are two types of people in this world. The ones who are well with their words and the ones who simply aren’t. Yes, I am referring to the sociable “Irene Adler”s and the mysterious “Sherlock Holmes”s out there. Wait a second, that doesn’t sound quite right. Have you heard that there is always an exception to the rule? Well in this case, there is me, falling in neither category. A testified grandiloquent who can blabber on so much, that by the time you finish reading this, you would probably lose faith in humanity.

Hence,

DISCLAIMER: Those with low patience levels / ADHD / who are prone to being choleric, do not say that I didn’t warn you about the length of this text. Although I must say that you will definitely enjoy reading it (that is what I will be telling myself).  I have been told that I get distracted way too easily. So let me get back on track. I am rather late in posting all of this, but I can assure you that I have been extremely punctual with my work (it is not an option when you take on such herculean tasks). Moving on, I will be rewinding a little bit, to sort of like have a flashback of the past month, solely for the sake of my satisfaction.

The GSoC acceptance day went by with the following exclamatory statements, “OH MY GOD!” *RING* *RING* “I GOT IN!” *RING* *RING* “DID I?” *RING* *RING* “I GUESS SO!” *RING* *RING* “Me to me: STOP IT AARYA, WILL YOU?” and a little bit of dancing around (probably a lot of it). The following days were quite ecstatic, characterised by a lot of galloping around here and there.

Then, the much awaited semester exams (awaited to end) came head on and I should say I got through it (let us all hope that I did). My mentors were amazingly understanding during these days of my woe and I am so happy to have them (not trying to flatter them, really). After a day or two of relief, I eventually had to get back to reality. However, I am the kind of person who hates “not” being busy, so for me it was a win win situation.

Then came the real obstacle, the “Representations of Time Coordinates in FITS” Journal with 22 pages of flexibility for the astronomical community and months of headache for me :). I had to learn about Time, the way it is contemplated by astronomers round the world and the plethora of options available in order to do so.

Calculations in any scientific discipline may involve precise time, but what sets astronomy apart is the number and variety of time scales that have to be used. Although the era of new and precise “Atomic Time” scales is emerging, astronomy continues to deal with the very phenomena that lie behind the seemingly obsolete time scales, in particular the rotation of the Earth and the motion of the planets. Thus, we have our own fossil record of time scales, carbon-dating to the evolution of humans (okay that went a little too far, but I guess you get the point).

Now, you might be wondering what a time scale is. It is simply a specification for measuring time: either the rate at which it passes or points in time; or both. But WHY DO WE NEED IT? Well, the very misconception lies in the faith that a day consists of exactly 86,400 seconds. If we consider the atomic clocks round the world, which are also the official time-keeping standards, they do run at this rate. But the UTC time that we all follow so blindly, does not exactly do so. To my surprise, there is a concept of “leap seconds” where a second is added to a day once in a while : to sort of stop the clock for a second so that it catches up with the earth’s rotation. Why don’t they add multiple such seconds before the day of my exam? (eternal woes of life)

If we could all recollect a little bit of physics that we have learnt so far, we would realise that it all depends on the context or the reference frame. Whether time is based on the Earth’s rotation, which is irregular due to various reasons, making it unsuitable for several cases, or it is the “proper” time at our exact location, it all really does matter. After all, precision might be the better half of an astronomer’s life (probably because the universe makes it so difficult to have this idealistic thought). The concept of absolute time, as we all know, has been scraped off by General Relativity and it does make a difference whether your calculations are associated with the Geocentre (The Earth) or the Barycentre (The Sun) or just an ordinary observatory location. Frankly, I feel a sense of enlightenment when I talk about the universe and things like general relativity (partly because I find it extremely cool). But we don’t want me to die while writing this. I will thus conclude this part by saying that time is, in itself, an extremely intriguing concept. A big shout out to GSoC for making me understand it all so vividly.

The weekly conference calls with my mentors are when I actually unfold the extent of this problem and they have been rather amazing I must tell you. I have fairly restrained myself from being this chatty there, as I do not want them to miss their meetings (I am very much capable of doing so) but I think that will soon change.

Summing up, the community bonding period and the first week of official coding passed by rather too quickly.  To be honest, the golden embellishment to all this “Time Jargon” has been this one statement, that I made sure I tell each and every soul I possibly know or could know, and knowing it has made me so very proud of myself. Don’t worry, I will let you know of this knowledge as well. Here it goes,

“The duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom”, the latter being at 0 K and in zero magnetic field stands for, yes the SI SECOND. *SIGH* This is where I will leave you thinking and wondering about how your entire life has been a lie (please don’t take that too seriously).

Eventually, I did end up condensing the 22 Pages FITS journal into a 4 page vital summary (which took so much time and I believe I did a fantastic job, do not dare say otherwise, *takes a bow*). I also understood the various obstacles that are involved in this project and how each of them contributes to the difficulty of the problem. Quoting my mentors, “This has been an issue for years and people say it is easy. Well, we know it is not”. (they truly understand me, *sobs a little*).

Coming to the technical part, the project is mainly focused on the long-standing issue #3000. This is one part of the aimed seamless interoperability between the three powerful components of AstroPy : coordinates, time and units and the underlying AstroPy Table writers, particularly FITS. So, my task is to allow Time columns in Astropy Tables to be written to FITS as Binary Tables and reading them back with an idealistic goal of 100% round-tripping (that, my friend, is very difficult but I will get there, one day). This would also include reading existing FITS files supporting time coordinate columns which is a pretty tricky job.

I have currently opened a Pull Request which took an arduous effort to make it what it is today. Well, that was bound to happen, since the io.fits sub-package code has made me want to pull my hair out (not kidding). It is a beautifully written code, no doubt, and the flow of control is impeccably organised into multiple cleanly designed classes. But, that just makes my job harder, doesn’t it?

The PR introduces a time module within io.fits, as a preliminary version to write and read AstroPy Tables containing Time columns to and from FITS files. Currently, I have taken care of writing Time by writing it as a (N,2) column with each element as a vector (jd1, jd2) and an explicit AstroPy format keyword. Considerable round-tripping of AstroPy written “FITS Binary Tables containing time coordinate columns” has been achieved. This includes metadata : scale, format and singular location. I have also started work on reading generic FITS Binary Table files, by generic I mean not written by AstroPy.

I reckon it is always the small things in life that make a difference. I cannot express how happy I feel looking at the code that I have produced within the past week or so. It might be simple (I would definitely falsify this if you try to say so), but it is something that I have really loved doing and it does make me utterly butterly happy (in spite of all the cribbing that you just had to go through).

Just because I am too attached to this link for now, I am posting it here for no reason whatsoever : https://github.com/astropy/astropy/pull/6176

Now I have a few failures that I need to solve, because travis never lets you be calm. 🙂 It is also 4 am here and I guess I need to get some sleep. You should be happy, you can finally go now. Or did my idiosyncrasies appeal to you to the point that you would want to listen to more of this? (I will hope that is true). Thus, this is how fast time passes by (maybe the scales aren’t so accurate after all) and that is how people get through. I got through two amazing weeks of coding and I am looking forward to the rest. Till then, Adios mate and wait for my next blog post!

 

 

 

Advertisements

5 thoughts on “Getting Through GSoC (I guess so)

  1. Time… what’s that?? I wonder whether the websites should tell in periods of caesium 133 the “reading time” of blog posts. That would be more precise 🙂

    Aarya, I’ve really enjoyed it!! the whole of it! And yes! I do want to listen more of it!! Keep it coming!!

    Also, don’t forget to pass by the matrix channel, so you can chat with other students!!
    https://riot.im/app/#/room/#openastronomy:matrix.org

    Like

    • Thank you so much David. I’m delighted to know that you enjoyed it and want to listen to more of it :p I’ll put up my next post soon (eeepp)

      And yes, I’ll definitely pass by the matrix channel (lurk around to be precise).

      Like

  2. Pingback: A mixin protocol for seamless interoperability | The theory to my universe

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s