Possibility of doing Masters in astronomy with only bachelors in CS
I can't speak for all the institutions, but in general, you're out of luck. It's true a lot of modern astronomy is programming, but there's also a lot that isn't. You need to be familiar with things like the Fourier transform, vector calculus, and classical mechanics / general relativity.

Here's an example of the entry requirements for astronomy at Lund University in Sweden.


  Bachelor’s degree of at least 180 credits in physics or the equivalent. The degree must include at least 90 credits in physics. Proficiency in English equivalent to English 6/B from Swedish upper-secondary school.


You'll have to get the physics training if you want to pursue this, unfortunately.