How much competition there is for jobs in astronomy compared to other fields of science? I will soon finish a master's degree in computer science. I have been interested in astronomy for some time, which has included playing around with a Newtonian reflector telescope and reading about CCD-cameras.

I checked some local universities, and was amazed that they have only 10 or so graduates each year (1-2 get a PhD and the rest a master's degree). How many jobs are there for these graduates? Compared to other fields, how tough is the competition in astronomy? Is it different for some relatively new areas, e.g. space neuroscience or astrobiology?

I am considering to apply for an astronomy PhD, so any input would be helpful.
The competition for permanent positions in astronomy is very tough.  The field as a whole produces roughly ~200 Ph.Ds per year, but there are usually only a handful (say ~10) tenure-track positions that open up every year.  So perhaps ~5% of Ph.Ds end up in tenure-track positions in astronomy.  There are more permanent positions in astronomy that aren't tenure track positions, but not too many more, probably enough to support about ~20% of Ph.Ds.  

As for non-permanent positions in astronomy, there are plenty of those.  The funding situation for postdoctoral positions is such that, while there is still a great deal of competition for open positions (stemming partially from the fact that almost everyone applies to almost every open job --- I exaggerate, but only slightly), there are enough open positions, that almost all astronomy Ph.Ds who want a postdoc will be able to get one.  But those positions only last for an average of three years.

However the job prospects for astronomy Ph.Ds who decide to leave the field of astronomy (like myself) are quite good.  Those holding an astronomy degree have one of the lowest unemployment rates of anyone (around 0.3%).

Here are a few links to some papers on the state of the job market in astronomy:


http://arxiv.org/abs/0712.2820
http://arxiv.org/abs/0805.2624
http://arxiv.org/abs/1512.02223