|
19 | 19 | "spectral cube, radio astronomy, astroquery, units, dask\n", |
20 | 20 | "\n", |
21 | 21 | "## Summary\n", |
22 | | - "This tutorial shows how to take two spectral cubes observed toward the same part of the sky, but different frequencies, and put them onto the same grid using [spectral-cube](spectral-cube.readthedocs.io). It uses [astroquery](https://astroquery.readthedocs.io/) to obtain line frequencies from [splatalogue](https://astroquery.readthedocs.io/en/latest/splatalogue/splatalogue.html). Finally, it shows how to do the reprojection using [dask](https://dask.org) to enable parallelization." |
| 22 | + "Spectroscopic cube observations taken at different wavelength can trace the motion of gas or stars using spectral lines, but often lines at different wavelengths give different information.\n", |
| 23 | + "For example, one might observe a galaxy in the 21cm line of HI and the 115 GHz line of CO, or a protoplanetary disk in a line of N2H+ and a line of CO, or a galactic disk in the H-alpha and H-beta lines (in absorption or emission).\n", |
| 24 | + "In order to compare these data sets pixel-by-pixel, they must be placed onto a common grid with common resolution.\n", |
| 25 | + "\n", |
| 26 | + "This tutorial shows how to take two spectral cubes observed toward the same part of the sky, but different frequencies, and put them onto the same grid using [spectral-cube](spectral-cube.readthedocs.io).\n", |
| 27 | + "\n", |
| 28 | + "It uses [astroquery](https://astroquery.readthedocs.io/) to obtain line frequencies from [splatalogue](https://astroquery.readthedocs.io/en/latest/splatalogue/splatalogue.html); this example uses radio-wavelength data for which Splatalogue's molecular line lists are appropriate.\n", |
| 29 | + "Finally, it shows how to do the reprojection using [dask](https://dask.org) to enable parallelization." |
23 | 30 | ] |
24 | 31 | }, |
25 | 32 | { |
|
179 | 186 | "id": "8c7234cb", |
180 | 187 | "metadata": {}, |
181 | 188 | "source": [ |
182 | | - "## Step 3: Convert cubes from frequency to velocity" |
| 189 | + "## Step 3: Convert cubes from frequency to velocity\n", |
| 190 | + "\n", |
| 191 | + "To compare the kinematic structure of the target, we need to convert from the observed frequency (which must be in a common reference frame; in this case, it already is) to the doppler velocity." |
183 | 192 | ] |
184 | 193 | }, |
185 | 194 | { |
|
268 | 277 | "source": [ |
269 | 278 | "# Step 4. Spectral Interpolation\n", |
270 | 279 | "\n", |
271 | | - "We can do the spatial or spectral step first. In this case, we choose the spectral step first because the H$_2$CS cube is narrower in velocity (`cube1vel`) and this will reduce the number of channels we need to spatially interpolate over in the next step.\n", |
| 280 | + "We can choose to do either the spatial or spectral step first. \n", |
| 281 | + "In this case, we choose the spectral step first because the H$_2$CS cube is narrower in velocity (`cube1vel`) and this will reduce the number of channels we need to spatially interpolate over in the next step.\n", |
272 | 282 | "\n", |
273 | 283 | "We need to match resolution to the cube with the largest channel width:" |
274 | 284 | ] |
|
562 | 572 | "# Dask\n", |
563 | 573 | "\n", |
564 | 574 | "All of the above can be done using `dask` as the underlying framework to parallelize the operations.\n", |
| 575 | + "See [the spectral-cube documentation on dask integration](https://spectral-cube.readthedocs.io/en/latest/dask.html) or the [dask documentation](https://dask.org/) for further details.\n", |
565 | 576 | "\n", |
566 | 577 | "The dask approach can be made more memory-efficient (avoid using too much RAM) by writing intermediate steps to disk. The non-dask approach used above will generally need to read the whole cube into memory. Depending on the situation, either approach may be faster, but `dask` may be needed if the cube is larger than memory." |
567 | 578 | ] |
|
618 | 629 | } |
619 | 630 | ], |
620 | 631 | "metadata": { |
| 632 | + "kernelspec": { |
| 633 | + "display_name": "Py 3.9", |
| 634 | + "language": "python", |
| 635 | + "name": "python39" |
| 636 | + }, |
621 | 637 | "language_info": { |
622 | 638 | "codemirror_mode": { |
623 | 639 | "name": "ipython", |
|
627 | 643 | "mimetype": "text/x-python", |
628 | 644 | "name": "python", |
629 | 645 | "nbconvert_exporter": "python", |
630 | | - "pygments_lexer": "ipython3" |
| 646 | + "pygments_lexer": "ipython3", |
| 647 | + "version": "3.9.7" |
631 | 648 | } |
632 | 649 | }, |
633 | 650 | "nbformat": 4, |
|
0 commit comments