import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from IPython.display import HTML 
HTML('../style/course.css') #apply general CSS

"""
Explanation: Outline
Glossary
1. Radio Science using Interferometric Arrays
Previous: 1.3 Radiation transport
Next: 1.5 Black body radiation 




Import standard modules:
End of explanation
"""


from IPython.display import Image

"""
Explanation: Import section specific modules:
End of explanation
"""


Image(filename='figures/cyg_A_optical.png', width=500)

"""
Explanation: 1.4 Radio Regime<a id='science:sec:radio_regime'></a>
All of us are familiar with the night sky. In fact, when we think of astronomy, the first picture that comes to mind is that of the star-strewn sky (with a few planets thrown in). People looking at less light-poluted skies are also able to make out details such as the milky band of our own galaxy. 
We must remember that this view of the sky is a results of the natural limits of our vision - we can only perceive radiation in a narrow range in wavelength. We can't see beyond infrared or ultraviolet frequencies. This is the reason the earliest advances in astronomy were in visible range - the branch of astronomy known as optical astronomy.
However, over time we have been successful in sampling a large range of the electromagnetic spectrum. On one end is Gamma-ray astronomy, where individual photons have much larger energy than those in the visible range (and correspondingly much higher frequency) but far fewer numbers. On the other end is radio astronomy, where the photons are plentiful, but their individual energy is much smaller, with much smaller frequency than those in the visible range. 
The sky at radio frequencies is very different from that at the optical frequncies. Let us take the example of Cygnus A, which is the brightest extragalactic radio source. It is about ~ 230 Mpc (where $1$ Mpc = $10^6$ pc = $3.08\times10^{18}$ m, parsec, denoted by 'pc' is the distance unit of choice for astronomers) away from us. In optical, we see what may seem as a typical sky-field with stars and galaxies:
End of explanation
"""


Image(filename='figures/cyg_A_composite.png', width=500)

"""
Explanation: Figure 1.2.3.2: Sky in the direction of Cygnus A in optical frequencies. Credits: Digitized Sky Survey &#10548;<a id='science:fig:cyg_a_comp'></a> <!--\label{science:fig:cyg_a_comp}-->
If we look at it at radio frequencies, however, we see much more detail:
End of explanation
"""


Image(filename='figures/m81-nature.png', width=500)

"""
Explanation: Figure 1.2.3.2: Cygnus A, radio and optical view. <a id='science:fig:cyg_a_comp'></a> <!--\label{science:fig:cyg_a_comp}-->
The above image is an example of what are called composite images. These are images formed by combining two or more images, generally from different parts of the electromagnetic spectrum. In this example we have combined what we see in radio as well as optical frequencies. The object seen in the radio is Cygnus A, a radio galaxy (the closest such object to us). These are huge objects, generated through the activity happening at the centre of a galaxy, through the agency of a supermassive black hole. The latter creates the jets going in opposite directions to create large blobs of plasma called lobes, which radiate at radio frequncies - and are invisible in other parts of the electromagnetic spectrum. These objects are of cosmological importance; they affect the process of cosmological structure formation at various scales and as such are of great importance in our understanding of the Cosmos. 
Another noteworthy case might be that of the M81 system. This is system of three galaxies which form a group (which means they are gravitationally bound). But the extent of the interaction among the group is not clear until one takes a peek at them at radio frequencies:
End of explanation
"""


Image(filename='figures/M33_rotation_curve_HI.png', width=500)

"""
Explanation: Figure 1.2.3.3: On right is the optical view of the M81 system, on left the radio one. <a id='science:fig:m81'></a> <!--\label{science:fig:m81}-->
In the radio image the bridges containing the three galaxies are clearly visible. This does not show up in optical because the gas which forms the bridge does not emit radiation in optical bands. A similar case is that of the rotation curves. Rotation curves are plots of orbital velocities of stuff in a galaxy, against the radial distance from the centre of the galaxy. The idea is to use the orbital velocity to infer the mass in the galaxy inside the particular radius (we expect $v \propto r^{-1/2}$, in case all the mass is already enclosed inside the radius). In fact, we would expect the orbital velocity to decrease beyond the visible disk, since most of the mass would be inside the radius of the disk. However, in practice we do not see the expected behaviour for the rotation curves- indicating that not all the mass is enclosed within the visible disk. Radio observations of the neutral hydrogen gas, which extends far beyond the visible extent of the galaxy, allow us to trace the rotation curve to large radii. The figure below (courtesy of : https://en.wikipedia.org/wiki/Galaxy_rotation_curve) illustrates the measurements through 'optical' (stars) and 'radio' (21 cm) measurements:
End of explanation
"""


Image(filename='figures/Atmospheric_electromagnetic_transmittance_or_opacity.jpg', width=500)

"""
Explanation: These observations were some of the first evidence indicating the presence of 'dark matter' (most of the matter in the Universe is believed to be dark matter), and observations in the radio regime played a crucial part.
Now that we have seen that the radio regime is indeed a window to new and exciting (and important) aspects of astronomy, let us take a look at the part of the electromagnetic spectrum which is generally available for radio astronomy. With ground-based observations (the overwhelming majority of telescopes in radio regime are these), we are limited by Earth's atmosphere. The figure below indicates the situation (courtesy of : https://en.wikipedia.org/wiki/Radio_telescope):
End of explanation
"""


