Skip to main content


Showing posts from 2013

A couple of things i found on Python

Used to clear and history on the terminal and on the iPython console, i feel frustrated working on the native python interpreter on a terminal.
So while looking for solutions, i found these - 

import os

clear = lambda: os.system('clear')

will do what clear will does on the terminal.

We can just replace clear in os.system('clear') with ls, pwd or other common unix commands. It was useful for me because i was going through checking through multiple files and defining ls() in python was easier than changing between two tabs on the terminal.

import readline

for i in xrange(readline.get_current_history_length()):

will do what history does on the terminal.

Further, you one could append the output to a log file.

Just saying...


Instead of

pwd = lambda: os.system('pwd') 

you could use the already defined


And note, cd = lambda:os.system('cd') doesn't work.

Instead, use os.chdir('')

Pulsars and the Ooty Radio Telescope

Well, there's enough content about Quasars on my blog. It's about time i talked about Pulsars - though they sound similar, they are in no way related to one another! Simply put, Pulsars are a Galactic phenomenon i.e they are found in the Milky way galaxy and Quasars are an Extra-Galactic phenomenon i.e they are found in galaxies outside out own galaxy - the Milky way galaxy! 
And, pardon the technical jargon, Pulsars are rapidly spinning neutron stars which emit radiation from their polar regions. And since their spin axis is different from their magnetic axis, the radiation is perceived/observed only when the magnetic axis is aligned to our line of sight! 
Basically, a Pulsar is like a light house. Light is only observed periodically and if you're not standing right in the place - you might not be able to observe it! In the case of the Pulsar, the cone of light is much smaller and the period of the pulses is very small - of the other of milli seconds. 
I was recently par…

Magnetic Bottles.

Okay, firstly, sorry for not having posted in the last month or so. I'm just sending this apology into the vast expenses of the world wide web as i don't really know who follows my blog and who doesn't. Y'all need to comment more and give me feedback! And I promised myself last summer that the only articles on this blog will be ones on science or at the very least related to the pursuit science and technology. And lately, I have been a bit involved with my course work and the like. So, I was looking for the right topic to blog on. And whatdoyaknow, I stopped looking for the right topic and started making a topic the right one! So, here is something interesting I learnt a couple of weeks back.

As part of a course on Radiative Processes in Astrophysics here at IIT Madras, I was studying the behavior of particles in uniform Electric and Magnetic fields. Something most of us studied during our 12th and maybe in a bit more detail in college, if you pursued science i.e. Anywa…

Quasars - An Overview

I promise, this is the last post on quasars. I'll move on after this one! 
This post is an attempt to consolidate my summer work and explain it in easier terms - better than how my posts have been so far. So, any comments on the writing style or any questions are welcome. 
so, moving on... 

What are Quasars?! 

Quasars are super massive black holes at the center of galaxies. These black holes are what are called active black holes - they feed on the surrounding gas and dust in the galaxy and emit radiation! You might then ask "Don't all galaxies have black holes at their center?". Damn right, they do. But these are inactive galaxies - because there isn't any (more) free gas lying around for the black hole to feed on. You see, over the course of evolution of a galaxy, gas starts to condense to form stars. So, a very young galaxy with a super massive black hole is what we are calling a Quasar. Quasars are categorized under AGN - Active Galactic Nuclei. The other types …

Animation using GNUPlot

Animation using GNUPlotI've been trying to create an animation depicting a quasar spectrum moving across the 5 SDSS pass bands with respect to redshift. It is important to visualise what emission lines are moving in and out of bands to be able to understand the color-redshift plots and the changes in it.
I've tried doing this using the animate function in matplotlib, python but i wasn't able to make it work - meaning i worked on it for a couple of days and then i gave up, not having found solutions for my problems on the internet.
And then i came across this site, where the gunn-peterson trough and the lyman alpha forest have been depicted - in a beautiful manner. And this got me interested in using js and d3 to do the animations and make it dynamic - using sliders etc.
In the meanwhile, i thought i'd look up and see if there was a way to create animations in gnuplot and whoopdedoo, what do i find but nirvana!

In the image, you see 5 static curves and one dynam…

Week 8 - Quasars & Future work

Well, i'm back in chennai again, back at IIT Madras and back to, let's say, a *normal* college life. But I'm still interested in following what i started last summer.

As you can see from my report here, and the blogposts from my previousweeks - I've mostly reproduced results from the first paper on my list - Richards et al. (2001). The next papers on the list are on Photometric Redshifts of Quasars by Richards et al (2001), Composite Quasar Spectrum from the SDSS by Vanden Berk et al (2001) and Simulated colors of objects in the SDSS color space by Fan et al (1999).
All three of these papers feed off one another and complement each other! 
A composite quasar spectrum i used to simulate the colors of a quasar at various redshifts - inorder to do this we need the band structures of the 5 bands - u, g, r, i, z of the SDSS. These can be obtained here. The loop side though is that this data is from 2001 and i haven't been able to find a more recent data pertaining to t…

Week 5

Sorry for the late update but I've been swamped. Literally swamped with data! Never have i worked on a data set that is 30GB in size, so do accept my apology. Nonetheless, here's what happened in Week 5!

So, getting to the end of my work at IIST - i'd worked on the colors of quasars and reproducing the results of a 2001 paper on the same! And the last week at IIST was just to wrap things up and finish the reports! But as you can see from my previous post here, i'd stumbled upon a peculiar (in my opinion) set of quasars! So, i was very interested in understanding them.

Hereis my report on the colors of quasars. I'm now tired of making corrections to it and adding more things to it! There will always be something interesting to add or ways to make it easier to understand but i only have so much time! So, yesterday was that day - my final edits to the report!

I've also shared a more detailed post on how i acquired the data and analyzed it here. This was one other …

Colors of Quasars- Data Acquisition and Analysis

Over the course of my project, i've had to work with multiple data sets. Two of the important data sets were the original data set used by Richards et al in their paper and a new data set that i acquired - data set whose samples are constrained by the same conditions as mentioned in the richards et al paper.
Part of the original data used in the paper can be acquired from browsed from the vizier archived data, SIMBAD object list and NED object list. These data sets can be found through a simple search for the paper on SAO/NASA ADS.
As mentioned, this is just a part of the original data set i.e data pertaining to only 898 of the 2625 quasars used in the original paper are available for download through these links. The location for the rest of the sample set is still elusive - maybe they were released as part of the SDSS Data Release 1 which is why they weren't specifically included in this data set. This conclusion is based on the fact that none of these 898 objects are c…