Skip to content

Commit

Permalink
Merge pull request #93 from ratt-ru/master
Browse files Browse the repository at this point in the history
Kshitij
  • Loading branch information
Trienko authored Feb 4, 2017
2 parents 9cf9828 + 9cad019 commit 5cd23cc
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 19 deletions.
69 changes: 69 additions & 0 deletions 5_Imaging/5_4_imaging_weights.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"source": [
"import matplotlib.image as mpimg\n",
"from IPython.display import Image\n",
"from ipywidgets import HBox\n",
"from astropy.io import fits\n",
"import aplpy\n",
"\n",
Expand Down Expand Up @@ -600,6 +601,74 @@
"A robust weighting with $R = -2$ results in an approximately uniform weighting, and $R = 2$ results in an approximately natural weighting. The robust weighting formalization also allows for $|R| > 2$. An $R > 2$ overweights the most oversampled visibility (from the shorter baselines), this will result in lower resolution than natural weighting and smoother sidelobe characteristics, this may be useful when one is interested in imaging large, diffuse structure. An $R < -2$ will up-weight the least sampled visibilities (longest baselines) which results in a a higher resolution image than uniform weighting but also with higher sidelobe characteristics. This may be useful if one is imaging a field which has high signal to noise sources and wish to better resolve those sources."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the case where baselines are relatively evenly spread out (such as the KAT-7 example above) the choise of density weighting function is not too important. However, when imaging on core-dense arrays such as MeerKAT array release 1, and in the future SKA MID, it plays an important role. In both these cases a large portion of the baselines falls in the low spatial frequency region, thereby effectively over-emphasising measurements taken in that region. You can see the effect this has on the PSF. In these instances choosing natural weighting will create a halo-like structure around sources, whereas uniform weighting will significantly increase angular resolution."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Image(filename=\"figures/meerkat_AR1.png\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Image(filename=\"figures/meerkat_16hr_1.1ghz.png\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Figure: Antenna positions of MeerKAT array release 1 and its associated UV coverage at 1.1GHz for a 6 hour observation. This configuration is especially core dense compared to, for example, the JVLA and KAT-7*"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import collections\n",
"psfDict = collections.OrderedDict()\n",
"psfDict['2.0'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs2.0-psf.fits'\n",
"psfDict['1.0'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs1.0-psf.fits'\n",
"psfDict['0.5'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs0.5-psf.fits'\n",
"psfDict['0.0'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs0-psf.fits'\n",
"psfDict['-0.5'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs-0.5-psf.fits'\n",
"psfDict['-1.0'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs-1-psf.fits'\n",
"psfDict['-2.0'] = '../data/fits/psfs/meerkat_16_6hr_1.1ghz_briggs-2-psf.fits'\n",
"\n",
"fig = plt.figure(figsize=(16, 6))\n",
"for key in psfDict:\n",
" fh = fits.open(psfDict[key])\n",
" img = fh[0].data\n",
" psfSlice = img[0,0,int(img.shape[2]/2.)] #take central slice\n",
" subPsfSlice = psfSlice[int(2.*psfSlice.shape[0]/5.):int(3.*psfSlice.shape[0]/5.)] #take inner fifth\n",
" norm = (float(key) + 2.)/4.\n",
" c = [norm, 1.0-norm, 0.0]\n",
" plt.plot(subPsfSlice, label=key, color=c)\n",
"plt.title('PSF Cross-section')\n",
"plt.xlim(0, subPsfSlice.shape[0]-1)\n",
"plt.legend()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
145 changes: 126 additions & 19 deletions 5_Imaging/5_5_widefield_effect.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"metadata": {},
"source": [
"The two-dimensional interferometer has two major advantages over its one-dimensional east-west counterpart:\n",
"1. Improved u,v coverage at observation angles near the horizon, as plotted below.\n",
"1. Improved u,v coverage at lower declinations, as plotted below.\n",
"2. Recall that the interferometer response is maximum when the phase-reference centre is orthogonal to the baseline. At lower observation angles it is desirable to have baseline components that are not aligned from east-to-west."
]
},
Expand Down Expand Up @@ -361,7 +361,7 @@
" V(u,v,w) \\approx {\\int\\int{I(l,m)(e^{2\\pi i/\\lambda wl^2/2}e^{2\\pi i /\\lambda wm^2/2})e^{-2\\pi i /\\lambda(ul+vm)}\\frac{dldm}{n}}}\n",
"\\end{equation}\n",
"\n",
"Since $w$ can be rewritten as a complex relationship of $u,v$ and time-variant elevation and azimuth angles we expect to see a time- and baseline-variant shift in source position. This relative position shift also grows roughly quadratically with the source offsets in l and m. The images below show how sources are smeared over large areas during long observations."
"Since $w$ can be rewritten as a complex relationship of $u,v$ and time-variant elevation and azimuth angles we expect to see a time- and baseline-variant shift in source position. This relative position shift also grows roughly quadratically with the source offsets in l and m. The images below show how sources are smeared over large areas during long observations first on the data captured with the JVLA and then on a simulated MeerKAT observation."
]
},
{
Expand All @@ -372,19 +372,50 @@
},
"outputs": [],
"source": [
"fig = plt.figure(figsize=(8, 8))\n",
"\n",
"gc1 = aplpy.FITSFigure('../data/fits/wterm/MeerKAT_6h60s_dec-30_10MHz_10chans_uniform_n3000_w0-image.fits', \\\n",
" figure=fig)\n",
"Image(filename=\"figures/vla_uncorrected.png\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Figure: Uncorrected image of the 8 hour observation of the supernova reminant G55.7+3.4 on the JVLA in D-configuration. Notice the eliptical smearing around the point source.*"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Image(filename=\"figures/vla_wproj.png\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Figure: W-projection image of the 8 hour observation of the supernova reminant G55.7+3.4 on the JVLA in D-configuration.*"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"gc1 = aplpy.FITSFigure('../data/fits/wterm/MeerKAT_6h60s_dec-30_10MHz_10chans_uniform_n3000_w0-image.fits')\n",
"cpx = gc1.pixel2world(256, 256)\n",
"gc1.recenter(cpx[0], cpx[1], radius=0.2)\n",
"gc1.show_colorscale(vmin=-0.2, vmax=1., cmap='viridis')\n",
"gc1.hide_axis_labels()\n",
"gc1.hide_tick_labels()\n",
"plt.title('MeerKAT Observation (Not Corrected)')\n",
"gc1.add_colorbar()\n",
"\n",
"fig.canvas.draw()"
"gc1.add_colorbar()"
]
},
{
Expand All @@ -402,18 +433,14 @@
},
"outputs": [],
"source": [
"fig = plt.figure(figsize=(8, 8))\n",
"\n",
"gc1 = aplpy.FITSFigure('../data/fits/wterm/MeerKAT_6h60s_dec-30_10MHz_10chans_uniform_n3000-image.fits', figure=fig)\n",
"gc1 = aplpy.FITSFigure('../data/fits/wterm/MeerKAT_6h60s_dec-30_10MHz_10chans_uniform_n3000-image.fits')\n",
"cpx = gc1.pixel2world(256, 256)\n",
"gc1.recenter(cpx[0], cpx[1], radius=0.2)\n",
"gc1.show_colorscale(vmin=-0.2, vmax=1., cmap='viridis')\n",
"gc1.hide_axis_labels()\n",
"gc1.hide_tick_labels()\n",
"plt.title('MeerKAT Observation (W-Corrected)')\n",
"gc1.add_colorbar()\n",
"\n",
"fig.canvas.draw()"
"gc1.add_colorbar()"
]
},
{
Expand Down Expand Up @@ -442,13 +469,94 @@
"\n",
"**Facet imaging:** In facet imaging the goal is to drive the $(n-1)$ factor down to 0; satisfying the narrow-field assumption that makes the 2D Fourier inversion valid. There are a few ways in which the sky can be split into smaller images, but the classical faceting approach is to tile the celestial sphere with many small tangent images, approximating the sky by a polyhedron. \n",
" \n",
"The sky is recentred at the image centres $l_i,m_i$ of each of the narrow-field facets, by phase rotating the measured visibilities. Each of the facet-images is then also rotated to be tangent to the sky sphere. As the Fourier transform preserves rotations, the facets can be tilted by rotating the u,v coordinates of the measurements to the tracks that would have been produced if the interferometer was pointing at $\\alpha_i,\\delta_i$, instead of the original phase tracking centre. The number of facets roughly needed to satisfy the sampling criterion is given as:\n",
"The algorithm behind tangent (polyhedron) facet imaging is simple to implement. First the sky is recentred at the image centres $l_i,m_i$ of each of the narrow-field facets, by phase rotating the measured visibilities. Each of the facet-images is then rotated to be tangent to the sky sphere. As the Fourier transform preserves rotations, the facets can be tilted by rotating the u,v coordinates of the measurements to the tracks that would have been produced if the interferometer was pointing at $\\alpha_i,\\delta_i$, instead of the original phase tracking centre. Let $(l_\\Delta,m_\\Delta,n_\\Delta) = (l_i-l_0,m_i-m_0,n_i-n_0)$, then:\n",
"\n",
"\\begin{equation}\n",
" \\begin{split}\n",
" V(u,v,w)&\\approx\\int{\\int{B(l-l_i,m-m_i,n-n_i)e^{-2{\\pi}i[u(l-l_i)+v(m-m_i)+w(n-n_i)]}\\frac{dldm}{n}}}\\\\\n",
" &\\approx\\int{\\int{B(l-l_i,m-m_i,n-n_i)e^{-2{\\pi}i[u(l-l_0-l_\\Delta)+v(m-m_0-m_\\Delta)+w(n-n_0-n_\\Delta)]}\\frac{dldm}{n}}}\\\\\n",
" &\\approx\\left[\\int{\\int{B(l-l_0,m-m_0,n-n_0)e^{-2{\\pi}i[u(l-l_0)+v(m-m_0)+w(n-n_0)]}\\frac{dldm}{n}}}\\right]e^{2{\\pi}i[ul_\\Delta,vm_\\Delta,wn_\\Delta]}\\\\\n",
" \\end{split}\n",
"\\end{equation}\n",
"\n",
"Note that if only the phase rotation is performed without rotating the facet geometry the effective field of view of individual facets that are far away from the phase centre will decrease. In order to keep the projection error at the edge of all the facets comparable this means that the facets closer to the edge of the field must be significantly smaller, increasing the computational demands of such an approach. Instead if the facets are rotated to form a polyhedron around the celestial sphere the facets can all be the same size. A simple visual proof of this is given by the following two cartoons:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Image(filename=\"figures/coplanar-faceting.png\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Figure: Only phase steering the visibilities to new phase centres without tilting the u,v,w coordinates to\n",
"correspond to the new phase tracking centre significantly reduces the achievable field of view. Here instead\n",
"each facet is parallel to the original tangent plane. As the new centre is taken further away from the original\n",
"phase tracking centre the effective facet size must be shrunk down to achieve a comparable projection error\n",
"at the edge of the synthesized facets.*\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"Image(filename=\"figures/non-coplanar-faceting.png\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Figure: When the geometry of the facets are rotated the facets can all be the same size*"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to make each facet tangent to the celestial sphere at $(l_i,m_i)$ it is necessary to employ the following rotation matrices to compute new u',v',w' coordinates **after** the visibilities have been phase shifted using the old u,v,w coordinates.\n",
"\\begin{equation}\n",
" \\left[\\begin{array}{c}\n",
"\tu'\\\\\n",
"\tv'\\\\\n",
"\tw'\\\\\n",
" \\end{array} \\right] = R(\\alpha_i,\\delta_i)R^{T}(\\alpha_0,\\delta_0)\\left[\\begin{array}{c}\n",
"\t\t\t\t\t\t\t\t\t\tu\\\\\n",
"\t\t\t\t\t\t\t\t\t\tv \\\\\n",
"\t\t\t\t\t\t\t\t\t\tw \\\\\n",
"\t\t\t\t\t\t\t\t\t \\end{array}\n",
"\t\t\t\t\t\t\t\t\t\\right]\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
" R(\\alpha,\\delta) =\n",
" \\left[\\begin{array}{c c c}\n",
" -\\sin{\\alpha} \t\t\t& \\cos{\\alpha}\t\t& 0 \\\\\n",
" -\\sin{\\delta}\\cos{\\alpha} \t& -\\sin{\\delta}\\sin{\\alpha}\t& \\cos{\\delta}\\\\\n",
" \\cos{\\delta}\\cos{\\alpha} \t& \\cos{\\delta}\\sin{\\alpha}\t& \\sin{\\delta}\\\\\n",
" \\end{array}\\right] \n",
"\\end{equation}\n",
"\n",
"The number of facets roughly needed to satisfy the sampling criterion is given as:\n",
" \n",
" \\begin{equation}\n",
" N_\\text{facets} = \\frac{2L\\lambda}{{\\xi}D^2}, \\; \\xi\\ll{1}\n",
" \\end{equation}\n",
" \n",
"$L$ is the magnitude of the longest baseline and $D$ is the diametre of the antenna apertures. $\\xi$ is a quality factor that specifies the furthest seperation allowed for the facet images from the celestial sphere.\n",
"$L$ is the magnitude of the longest baseline and $D$ is the diametre of the antenna apertures. $\\xi$ is a quality factor that specifies the furthest seperation allowed for the facet images from the celestial sphere. \n",
"\n",
"\n",
"**W-projection:** W-projection eliminates $w$ from the phase term by relating all non-coplanar measurements to measurements taken at $w=0$. Employing the convolution theorem the following relationship between $V(u,v,w)$ and $V(u,v,0)$ can be obtained:\n",
" \n",
Expand Down Expand Up @@ -510,8 +618,7 @@
"source": [
"<div class=warn><b>Future Additions:</b></div>\n",
"\n",
"* overview of 3D Fourier imaging\n",
"* overview of facet imaging"
"* overview of 3D Fourier imaging"
]
}
],
Expand Down
Binary file added 5_Imaging/figures/coplanar-faceting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5_Imaging/figures/meerkat_16hr_1.1ghz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5_Imaging/figures/meerkat_AR1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5_Imaging/figures/non-coplanar-faceting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5_Imaging/figures/vla_uncorrected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5_Imaging/figures/vla_wproj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5cd23cc

Please sign in to comment.