After two weeks of writing a Fortran code to select hypervelocity stars, my results didn’t get any closer to Anthony‘s result. So, on a Thursday (the usual day of a meeting with my research supervisors), after a few hours of sleep, I went to Yuri‘s office and then Anthony said, “well, your report said that you have a different results with mine. So let’s keep the discussion short. We’ll compare our codes side by side and trace our errors. Here’s a print-out of my code.” Anthony wrote in Java, and added, “Well, I don’t guarantee that my code is all correct.”

The next day Anthony came over to my office and we compare our codes. There are three results that we have to calculate (skip this if you’re not familliar with astronomical jargons): 1) coordinate transform from equatorial to galactic coordinates, 2) transformation of proper motion from equatorial to galactic coordinates, 3) computed parallax from proper motion, and finally 4) galactocentric radial velocity. We checked the first result column, and no problem here. The second column show different results. There was some small arguments, and I began to worry: To calculate this transformation thing, I’m using my old code that I used to make by bachelor thesis. If the code is wrong then my results are wrong. Whew, ITB could revoke my diploma! Then Anthony starts deriving the equations he used on the whiteboard and began to notice that there are something wrong with his code. He said, “hang on…” and after a few words said, “20 minutes and I’ll be back,” and walked back to his office. After twenty minutes, he returned and check his results: it matched with mine! Okay, I was relieved and told my worry, to which he replied: 1) You musn’t wholly trust your supervisor, and 2) even if my code is wrong, they will not take my degree for such a small mistake.

Okay…on to the second column, which once again Anthony made a programming mistake: He put a minus sign when on the paper it should be positive. “The classical mistake,” he said. “Ten minutes,” and he walked back to his office and returned back the same results as mine.

The fourth and final mistake is mine. It’s a conceptual mistake: 1) I made an error in correcting for the solar motion, and 2) I should be using the computed parallax instead of the observed one. In the end, we finally converged to more or less the same result.

More or less? Why is that so? In the end, with my code I can select 5020 hypervelocity star (HVS) candidates, while Anthony’s code select 5018 stars. What gives? We checked these two stars, and these stars doesn’t enter Anthony’s list (and enter into mine) because they are on the floating point. They are on the threshold, their computed parallax is close to zero (my computed parallax is E(-8) (ten to the power of minus eight) while Anthony’s is -E(-8) (minus ten to the power of minus eight), which is actually a very close value! Anthony’s conclusion is: this is all depends on what programming language we use.

Okay…so? After two hours, our results have converged (with minor differences), and we can know move forward into the analysis. We all glad and relieved, I’m relieved because my old code is actually correct and Anthony is glad that not all the programming error is his. I’ll put the analysis on hold because I have a real lack of sleep and I need to enjoy my weekend first. Beer, please!

Hey hold on! What makes this experience worthwhile to write? Well….you might already notice that Anthony is also a writing the same code as me (although he wrote in different language and different algorithm), which means that eventhough he’s extremely busy he’s also working the same thing as me and not just sit in and wait for my results to come in. He’s also working with me, that is the thing I haven’t experienced or heard in my undergraduate years.

Okay, there might be some other thing now: How we can now be sure that our results is now correct? Does convergence guarantee a correctness? Well…it can means two thing now: either we’re both correct or we’re both wrong. So how can we be sure that we’re both correct instead of both wrong? Here’s the thing: we have the different methods in doing the transformation thing and for other calculations we both have the same equations but we applied the equations to the code in different algorithm, and yet it produces the same results for all 118 218 stars in the catalogue. I think we’re in the right track.

Okay, I’m off to catch some shut-eye and then goes to find some beers.

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: