Extracting and Plotting Position-Velocity Diagrams¶
Authors¶
Adam Ginsburg, Eric Koch
Learning Goals¶
- Extract a position-velocity diagram from a cube using both pixel and sky coordinates using pvextractor
- Display the position-velocity diagram with appropriately labeled coordinates
- Display the extraction path on the plots
Keywords¶
cube, pv-diagram
Summary¶
In this tutorial, we will extract position-velocity (PV) diagrams from a cube and plot them.
Header material¶
We import tools from several packages up front:
%pip install -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt
%pip install --pre -U astroquery
Collecting spectral-cube (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 14)) Cloning https://github.com/radio-astro-tools/spectral-cube/ to /tmp/pip-install-omjlwbt8/spectral-cube_ab44d9ea2ac7486ca8cbcf273ce4696b Running command git clone --filter=blob:none --quiet https://github.com/radio-astro-tools/spectral-cube/ /tmp/pip-install-omjlwbt8/spectral-cube_ab44d9ea2ac7486ca8cbcf273ce4696b
Resolved https://github.com/radio-astro-tools/spectral-cube/ to commit 8ae6705d7e64739cbb08904efc660dbed98874ab
Installing build dependencies ... -
\
|
/
done
Getting requirements to build wheel ... -
done
Preparing metadata (pyproject.toml) ... -
done Collecting radio-beam (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 15)) Cloning https://github.com/radio-astro-tools/radio-beam/ to /tmp/pip-install-omjlwbt8/radio-beam_bf15d1dc27264a5aad49dff61bca42ef Running command git clone --filter=blob:none --quiet https://github.com/radio-astro-tools/radio-beam/ /tmp/pip-install-omjlwbt8/radio-beam_bf15d1dc27264a5aad49dff61bca42ef
Resolved https://github.com/radio-astro-tools/radio-beam/ to commit 325cad35689eb71d9959a9e341281713c991fb1d
Installing build dependencies ... -
\
|
/
done
Getting requirements to build wheel ... -
done
Preparing metadata (pyproject.toml) ... -
done
Collecting pvextractor (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 16)) Cloning https://github.com/radio-astro-tools/pvextractor/ to /tmp/pip-install-omjlwbt8/pvextractor_e7fa0cdcd9dc42afa36f14897d05e102 Running command git clone --filter=blob:none --quiet https://github.com/radio-astro-tools/pvextractor/ /tmp/pip-install-omjlwbt8/pvextractor_e7fa0cdcd9dc42afa36f14897d05e102
Resolved https://github.com/radio-astro-tools/pvextractor/ to commit d5803d85f262981c30c03282fa4b56e748a40331 Running command git submodule update --init --recursive -q
Installing build dependencies ... -
\
|
/
done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... -
done Requirement already satisfied: requests in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 2)) (2.32.3) Requirement already satisfied: beautifulsoup4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 3)) (4.12.3) Requirement already satisfied: notebook==6.5.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (6.5.2) Requirement already satisfied: numpy in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 7)) (1.26.4) Requirement already satisfied: scipy in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 8)) (1.13.1) Requirement already satisfied: matplotlib==3.7 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (3.7.0) Requirement already satisfied: astropy in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 10)) (6.1.0) Requirement already satisfied: regions in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 11)) (0.9) Requirement already satisfied: aplpy in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (2.1.0) Requirement already satisfied: astroquery in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (0.4.8.dev9321) Requirement already satisfied: dask-image in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (2024.5.3) Requirement already satisfied: casatools in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 19)) (6.6.4.34) Requirement already satisfied: casatasks in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 20)) (6.6.4.34) Requirement already satisfied: dask[complete] in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from -r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (2024.5.2) Requirement already satisfied: jinja2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (3.1.4) Requirement already satisfied: tornado>=6.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (6.4) Requirement already satisfied: pyzmq>=17 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (26.0.3) Requirement already satisfied: argon2-cffi in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (23.1.0) Requirement already satisfied: traitlets>=4.2.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (5.14.3) Requirement already satisfied: jupyter-core>=4.6.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (5.7.2) Requirement already satisfied: jupyter-client>=5.3.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (8.6.2) Requirement already satisfied: ipython-genutils in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.2.0)
Requirement already satisfied: nbformat in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (5.10.4) Requirement already satisfied: nbconvert>=5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (7.16.4) Requirement already satisfied: nest-asyncio>=1.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.6.0) Requirement already satisfied: ipykernel in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (6.29.4) Requirement already satisfied: Send2Trash>=1.8.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.8.3) Requirement already satisfied: terminado>=0.8.3 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.18.1) Requirement already satisfied: prometheus-client in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.20.0) Requirement already satisfied: nbclassic>=0.4.7 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.1.0) Requirement already satisfied: contourpy>=1.0.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (1.2.1) Requirement already satisfied: cycler>=0.10 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (4.53.0) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (1.4.5) Requirement already satisfied: packaging>=20.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (24.0) Requirement already satisfied: pillow>=6.2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (10.3.0) Requirement already satisfied: pyparsing>=2.3.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (3.1.2) Requirement already satisfied: python-dateutil>=2.7 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from matplotlib==3.7->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 9)) (2.9.0.post0) Requirement already satisfied: charset-normalizer<4,>=2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 2)) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 2)) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 2)) (2.2.1) Requirement already satisfied: certifi>=2017.4.17 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 2)) (2024.6.2) Requirement already satisfied: soupsieve>1.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from beautifulsoup4->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 3)) (2.5)
Requirement already satisfied: pyerfa>=2.0.1.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 10)) (2.0.1.4) Requirement already satisfied: astropy-iers-data>=0.2024.4.29.0.28.48 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 10)) (0.2024.6.3.0.31.14) Requirement already satisfied: PyYAML>=3.13 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 10)) (6.0.1)
Requirement already satisfied: reproject>=0.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.13.1) Requirement already satisfied: pyregion>=2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (2.2.0) Requirement already satisfied: pyavm>=0.9.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.9.6) Requirement already satisfied: scikit-image>=0.14 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.23.2) Requirement already satisfied: shapely>=1.7 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (2.0.4) Requirement already satisfied: html5lib>=0.999 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (1.1) Requirement already satisfied: keyring>=15.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (25.2.1) Requirement already satisfied: pyvo>=1.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (1.5.2)
Requirement already satisfied: six in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from spectral-cube->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 14)) (1.16.0) Requirement already satisfied: joblib in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from spectral-cube->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 14)) (1.4.2) Requirement already satisfied: casa-formats-io in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from spectral-cube->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 14)) (0.3.0) Requirement already satisfied: qtpy>=2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from pvextractor->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 16)) (2.4.1)
Requirement already satisfied: click>=8.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (8.1.7) Requirement already satisfied: cloudpickle>=1.5.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (3.0.0) Requirement already satisfied: fsspec>=2021.09.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (2024.6.0) Requirement already satisfied: partd>=1.2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (1.4.2) Requirement already satisfied: toolz>=0.10.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (0.12.1) Requirement already satisfied: importlib-metadata>=4.13.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (7.1.0) Requirement already satisfied: pyarrow>=7.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (16.1.0) Requirement already satisfied: pyarrow-hotfix in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (0.6) Requirement already satisfied: lz4>=4.3.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (4.3.3) Requirement already satisfied: pandas>=2.0.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (2.2.2) Requirement already satisfied: pims>=0.4.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (0.6.1) Requirement already satisfied: tifffile>=2018.10.18 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (2024.5.22) Requirement already satisfied: casaconfig in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from casatools->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 19)) (1.0.0)
Requirement already satisfied: dask-expr<1.2,>=1.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (1.1.2)
Requirement already satisfied: webencodings in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from html5lib>=0.999->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (0.5.1) Requirement already satisfied: zipp>=0.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from importlib-metadata>=4.13.0->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (3.19.1)
Requirement already satisfied: platformdirs>=2.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-core>=4.6.1->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (4.2.2) Requirement already satisfied: jaraco.classes in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (3.4.0) Requirement already satisfied: jaraco.functools in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (4.0.1) Requirement already satisfied: jaraco.context in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (5.3.0) Requirement already satisfied: SecretStorage>=3.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (3.3.3) Requirement already satisfied: jeepney>=0.4.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (0.8.0)
Requirement already satisfied: notebook-shim>=0.2.3 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.2.4)
Requirement already satisfied: bleach!=5.0.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (6.1.0) Requirement already satisfied: defusedxml in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.7.1) Requirement already satisfied: jupyterlab-pygments in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.3.0) Requirement already satisfied: markupsafe>=2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.1.5) Requirement already satisfied: mistune<4,>=2.0.3 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (3.0.2) Requirement already satisfied: nbclient>=0.5.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.10.0) Requirement already satisfied: pandocfilters>=1.4.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.5.1) Requirement already satisfied: pygments>=2.4.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.18.0) Requirement already satisfied: tinycss2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbconvert>=5->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.3.0) Requirement already satisfied: fastjsonschema>=2.15 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbformat->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.19.1) Requirement already satisfied: jsonschema>=2.6 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from nbformat->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (4.22.0)
Requirement already satisfied: pytz>=2020.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from pandas>=2.0.0->dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (2024.1) Requirement already satisfied: tzdata>=2022.7 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from pandas>=2.0.0->dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (2024.1) Requirement already satisfied: locket in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from partd>=1.2.0->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (1.0.0)
Requirement already satisfied: imageio in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from pims>=0.4.1->dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (2.34.1) Requirement already satisfied: slicerator>=0.9.8 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from pims>=0.4.1->dask-image->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 18)) (1.1.0)
Requirement already satisfied: astropy-healpix>=0.6 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from reproject>=0.4->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (1.0.3) Requirement already satisfied: zarr in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from reproject>=0.4->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (2.18.2)
Requirement already satisfied: networkx>=2.8 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from scikit-image>=0.14->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (3.3) Requirement already satisfied: lazy-loader>=0.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from scikit-image>=0.14->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.4)
Requirement already satisfied: ptyprocess in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from terminado>=0.8.3->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.7.0)
Requirement already satisfied: argon2-cffi-bindings in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from argon2-cffi->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (21.2.0)
Requirement already satisfied: bokeh>=2.4.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (3.4.1) Requirement already satisfied: distributed==2024.5.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (2024.5.2) Requirement already satisfied: msgpack>=1.0.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from distributed==2024.5.2->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (1.0.8) Requirement already satisfied: psutil>=5.7.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from distributed==2024.5.2->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (5.9.8) Requirement already satisfied: sortedcontainers>=2.0.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from distributed==2024.5.2->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (2.4.0) Requirement already satisfied: tblib>=1.6.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from distributed==2024.5.2->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (3.0.0) Requirement already satisfied: zict>=3.0.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from distributed==2024.5.2->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (3.0.0)
Requirement already satisfied: comm>=0.1.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.2.2) Requirement already satisfied: debugpy>=1.6.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.8.1) Requirement already satisfied: ipython>=7.23.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (8.25.0) Requirement already satisfied: matplotlib-inline>=0.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.1.7)
Requirement already satisfied: xyzservices>=2021.09.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from bokeh>=2.4.2->dask[complete]->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 17)) (2024.4.0)
Requirement already satisfied: decorator in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (5.1.1) Requirement already satisfied: jedi>=0.16 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.19.1) Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (3.0.46) Requirement already satisfied: stack-data in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.6.3) Requirement already satisfied: exceptiongroup in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.2.1) Requirement already satisfied: typing-extensions>=4.6 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (4.12.1) Requirement already satisfied: pexpect>4.3 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (4.9.0) Requirement already satisfied: attrs>=22.2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema>=2.6->nbformat->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (23.2.0) Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema>=2.6->nbformat->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2023.12.1) Requirement already satisfied: referencing>=0.28.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema>=2.6->nbformat->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.35.1) Requirement already satisfied: rpds-py>=0.7.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema>=2.6->nbformat->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.18.1)
Requirement already satisfied: jupyter-server<3,>=1.8 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.14.1)
Requirement already satisfied: cryptography>=2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from SecretStorage>=3.2->keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (42.0.7)
Requirement already satisfied: cffi>=1.0.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from argon2-cffi-bindings->argon2-cffi->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.16.0)
Requirement already satisfied: more-itertools in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jaraco.classes->keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (10.2.0) Requirement already satisfied: backports.tarfile in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jaraco.context->keyring>=15.0->astroquery->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 13)) (1.2.0)
Requirement already satisfied: asciitree in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from zarr->reproject>=0.4->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.3.3) Requirement already satisfied: numcodecs>=0.10.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from zarr->reproject>=0.4->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.12.1) Requirement already satisfied: fasteners in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from zarr->reproject>=0.4->aplpy->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 12)) (0.19)
Requirement already satisfied: pycparser in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.22)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.8.4)
Requirement already satisfied: anyio>=3.1.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (4.4.0) Requirement already satisfied: jupyter-events>=0.9.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.10.0) Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.5.3) Requirement already satisfied: overrides>=5.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (7.7.0) Requirement already satisfied: websocket-client>=1.7 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.8.0)
Requirement already satisfied: wcwidth in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.2.13)
Requirement already satisfied: executing>=1.2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.0.1) Requirement already satisfied: asttokens>=2.1.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.4.1) Requirement already satisfied: pure-eval in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.2.2) Requirement already satisfied: sniffio>=1.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from anyio>=3.1.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.3.1)
Requirement already satisfied: python-json-logger>=2.0.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.0.7) Requirement already satisfied: rfc3339-validator in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.1.4) Requirement already satisfied: rfc3986-validator>=0.1.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (0.1.1)
Requirement already satisfied: fqdn in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.5.1) Requirement already satisfied: isoduration in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (20.11.0) Requirement already satisfied: jsonpointer>1.13 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.4) Requirement already satisfied: uri-template in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.3.0) Requirement already satisfied: webcolors>=1.11 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.13)
Requirement already satisfied: arrow>=0.15.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.8->notebook-shim>=0.2.3->nbclassic>=0.4.7->notebook==6.5.2->-r https://github.com/radio-astro-tools/tutorials/raw/master/requirements.txt (line 5)) (2.9.0.20240316)
Note: you may need to restart the kernel to use updated packages.
Requirement already satisfied: astroquery in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (0.4.8.dev9321)
Requirement already satisfied: numpy>=1.20 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (1.26.4) Requirement already satisfied: astropy>=5.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (6.1.0) Requirement already satisfied: requests>=2.19 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (2.32.3) Requirement already satisfied: beautifulsoup4>=4.8 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (4.12.3) Requirement already satisfied: html5lib>=0.999 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (1.1) Requirement already satisfied: keyring>=15.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (25.2.1) Requirement already satisfied: pyvo>=1.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astroquery) (1.5.2) Requirement already satisfied: pyerfa>=2.0.1.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy>=5.0->astroquery) (2.0.1.4) Requirement already satisfied: astropy-iers-data>=0.2024.4.29.0.28.48 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy>=5.0->astroquery) (0.2024.6.3.0.31.14) Requirement already satisfied: PyYAML>=3.13 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy>=5.0->astroquery) (6.0.1) Requirement already satisfied: packaging>=19.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from astropy>=5.0->astroquery) (24.0)
Requirement already satisfied: soupsieve>1.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from beautifulsoup4>=4.8->astroquery) (2.5) Requirement already satisfied: six>=1.9 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from html5lib>=0.999->astroquery) (1.16.0) Requirement already satisfied: webencodings in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from html5lib>=0.999->astroquery) (0.5.1) Requirement already satisfied: jaraco.classes in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery) (3.4.0) Requirement already satisfied: jaraco.functools in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery) (4.0.1) Requirement already satisfied: jaraco.context in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery) (5.3.0) Requirement already satisfied: importlib-metadata>=4.11.4 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery) (7.1.0) Requirement already satisfied: SecretStorage>=3.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery) (3.3.3) Requirement already satisfied: jeepney>=0.4.2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from keyring>=15.0->astroquery) (0.8.0) Requirement already satisfied: charset-normalizer<4,>=2 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests>=2.19->astroquery) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests>=2.19->astroquery) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests>=2.19->astroquery) (2.2.1) Requirement already satisfied: certifi>=2017.4.17 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from requests>=2.19->astroquery) (2024.6.2)
Requirement already satisfied: zipp>=0.5 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from importlib-metadata>=4.11.4->keyring>=15.0->astroquery) (3.19.1) Requirement already satisfied: cryptography>=2.0 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from SecretStorage>=3.2->keyring>=15.0->astroquery) (42.0.7)
Requirement already satisfied: more-itertools in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jaraco.classes->keyring>=15.0->astroquery) (10.2.0) Requirement already satisfied: backports.tarfile in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from jaraco.context->keyring>=15.0->astroquery) (1.2.0)
Requirement already satisfied: cffi>=1.12 in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from cryptography>=2.0->SecretStorage>=3.2->keyring>=15.0->astroquery) (1.16.0) Requirement already satisfied: pycparser in /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=2.0->SecretStorage>=3.2->keyring>=15.0->astroquery) (2.22)
Note: you may need to restart the kernel to use updated packages.
import pylab as pl
import numpy as np
from astropy.visualization import quantity_support
from astropy import units as u
from astropy import wcs
# set so that these display properly on black backgrounds
pl.rcParams['figure.facecolor']='w'
from spectral_cube import SpectralCube
from pvextractor import extract_pv_slice, Path
Retrieve and open a cube from astropy-data:
cube = SpectralCube.read('http://www.astropy.org/astropy-data/l1448/l1448_13co.fits')
cube
SpectralCube with shape=(53, 105, 105): n_x: 105 type_x: RA---SFL unit_x: deg range: 50.924417 deg: 51.740103 deg n_y: 105 type_y: DEC--SFL unit_y: deg range: 30.301945 deg: 30.966389 deg n_s: 53 type_s: VOPT unit_s: m / s range: 2528.195 m / s: 5982.223 m / s
Show single channel to find where to draw the path. We use pixel units so it's easier to define the path from the pixel coords in the matplotlib viewer.
pl.imshow(cube[25].value, origin='lower')
<matplotlib.image.AxesImage at 0x7fca50600340>
PV Extraction from Pixel Coordinates¶
First we create an extraction path. The entries are pairs of pixel coordinates, (x,y)
path = Path([(20,20), (40,40), (60,20)])
Then we can overplot it on our figure, now with WCS shown. The plotting uses WCSAxes
ax = pl.subplot(111, projection=cube.wcs.celestial)
ax.imshow(cube[25].value)
path.show_on_axis(ax, spacing=1, color='r')
<matplotlib.lines.Line2D at 0x7fca946abc10>
spacing
gives the separation between these points in pixels; we finely sampled by picking one-pixel spacing.
We can then extract the pv diagram, specifying the same spacing.
pvdiagram = extract_pv_slice(cube=cube, path=path, spacing=1)
pvdiagram
<astropy.io.fits.hdu.image.PrimaryHDU at 0x7fca4ffc41f0>
and plot it. pvdiagram
is a PrimaryHDU
object, so we need to grab the data separately from the header and convert the header to a WCS object:
ax = pl.subplot(111, projection=wcs.WCS(pvdiagram.header))
im = ax.imshow(pvdiagram.data)
cb = pl.colorbar(mappable=im)
# we could specify the colorbar units like this:
# cb.set_label(cube.unit)
# but the 'BUNIT' keyword is not set for these data, so we don't know the unit. We instead manually specify:
cb.set_label("Brightness Temperature [K]")
Changing units to the more commonly used km/s and more readable arcminutes can be done with wcsaxes tools:
ww = wcs.WCS(pvdiagram.header)
ax = pl.subplot(111, projection=ww)
im = ax.imshow(pvdiagram.data)
cb = pl.colorbar(mappable=im)
cb.set_label("Brightness Temperature [K]")
ax0 = ax.coords[0]
ax0.set_format_unit(u.arcmin)
ax1 = ax.coords[1]
ax1.set_format_unit(u.km/u.s)
ax.set_ylabel("Velocity [km/s]")
ax.set_xlabel("Offset [arcmin]")
We can put all this together:
# we will use the peak intensity for future display
# the warning here can be ignored because the cube is small,
# but we don't silence it because it's a legit warning when dealing with big cubes
mx = cube.max(axis=0).value
WARNING: PossiblySlowWarning: This function (<function BaseSpectralCube.max at 0x7fca50859fc0>) requires loading the entire cube into memory and may therefore be slow. [spectral_cube.utils]
pl.figure(figsize=(12,6))
ax = pl.subplot(121, projection=cube.wcs.celestial)
ax.imshow(mx)
path.show_on_axis(ax, spacing=1, color='r')
ww = wcs.WCS(pvdiagram.header)
ax = pl.subplot(122, projection=ww)
im = ax.imshow(pvdiagram.data)
ax0 = ax.coords[0]
ax0.set_format_unit(u.arcmin)
ax1 = ax.coords[1]
ax1.set_format_unit(u.km/u.s)
ax.set_ylabel("Velocity [km/s]")
ax.set_xlabel("Offset [arcmin]")
PV Extraction from Sky Coordinates¶
We can also make paths using celestial coordinates by passing coordinates defined in an~astropy.coordinates.SkyCoord
object to ~pvextractor.Path
.
from astropy.coordinates import SkyCoord
skypath = Path(SkyCoord([3.4, 3.43, 3.42]*u.h, [30.5, 30.75, 30.5]*u.deg, frame='fk5'))
We can plot again; the coordinates will be automatically determined
ax = pl.subplot(111, projection=cube.wcs.celestial)
ax.imshow(cube[25].value)
skypath.show_on_axis(ax, spacing=1, color='r')
<matplotlib.lines.Line2D at 0x7fca4cc94640>
pvdiagram2 = extract_pv_slice(cube=cube, path=skypath)
pvdiagram2
<astropy.io.fits.hdu.image.PrimaryHDU at 0x7fca9470a290>
pl.figure(figsize=(12,6))
ax = pl.subplot(121, projection=cube.wcs.celestial)
ax.imshow(mx)
skypath.show_on_axis(ax, spacing=1, color='r')
ww = wcs.WCS(pvdiagram2.header)
ax = pl.subplot(122, projection=ww)
im = ax.imshow(pvdiagram2.data)
ax0 = ax.coords[0]
ax0.set_format_unit(u.arcmin)
ax1 = ax.coords[1]
ax1.set_format_unit(u.km/u.s)
ax.set_ylabel("Velocity [km/s]")
ax.set_xlabel("Offset [arcmin]")
We can also change the aspect ratio of the PV diagram:
pl.figure(figsize=(12,6))
ax = pl.subplot(121, projection=cube.wcs.celestial)
ax.imshow(mx)
skypath.show_on_axis(ax, spacing=1, color='r')
ww = wcs.WCS(pvdiagram2.header)
ax = pl.subplot(122, projection=ww)
im = ax.imshow(pvdiagram2.data)
ax.set_aspect(2)
ax0 = ax.coords[0]
ax0.set_format_unit(u.arcmin)
ax1 = ax.coords[1]
ax1.set_format_unit(u.km/u.s)
ax.set_ylabel("Velocity [km/s]")
ax.set_xlabel("Offset [arcmin]")
PV Extraction with Spatial Averaging¶
~pvextractor.Path
allows you to specify a width
to average over, which specifies a spatial range around the path to average over:
skypath2 = Path(SkyCoord([3.4, 3.429, 3.42]*u.h, [30.5, 30.75, 30.5]*u.deg, frame='fk5'), width=2*u.arcmin)
pvdiagram3 = extract_pv_slice(cube=cube, path=skypath2)
We can plot this path as a set of patches to show where we averaged. The default spacing is 1 pixel,so we plot 1-pixel chunks.
pl.figure(figsize=(12,6))
ax = pl.subplot(121, projection=cube.wcs.celestial)
ax.imshow(mx)
skypath2.show_on_axis(ax, spacing=1,
edgecolor='r', linestyle=':',
linewidth=0.75)
ww = wcs.WCS(pvdiagram3.header)
ax = pl.subplot(122, projection=ww)
im = ax.imshow(pvdiagram3.data)
ax.set_aspect(2.5)
cb = pl.colorbar(mappable=im)
cb.set_label("Brightness Temperature [K]")
ax0 = ax.coords[0]
ax0.set_format_unit(u.arcmin)
ax1 = ax.coords[1]
ax1.set_format_unit(u.km/u.s)
ax.set_ylabel("Velocity [km/s]")
ax.set_xlabel("Offset [arcmin]")
We can also have more widely spaced chunks.
Note that the spacing given to extract_pv_slice
affects the shape of the output PV diagram, so we also change the aspect ratio:
pvdiagram4 = extract_pv_slice(cube=cube, path=skypath2, spacing=5)
pl.figure(figsize=(12,6))
ax = pl.subplot(121, projection=cube.wcs.celestial)
ax.imshow(mx)
skypath2.show_on_axis(ax, spacing=5,
edgecolor='w', linestyle=':',
linewidth=0.75)
ww = wcs.WCS(pvdiagram4.header)
ax = pl.subplot(122, projection=ww)
im = ax.imshow(pvdiagram4.data)
cb = pl.colorbar(mappable=im)
cb.set_label("Brightness Temperature [K]")
ax.set_aspect(0.5)
ax0 = ax.coords[0]
ax0.set_format_unit(u.arcmin)
ax1 = ax.coords[1]
ax1.set_format_unit(u.km/u.s)
ax.set_ylabel("Velocity [km/s]")
ax.set_xlabel("Offset [arcmin]")
Saving¶
Finally, we can save the extracted PV diagram as a FITS file:
pvdiagram.writeto("saved_pvdiagram.fits", overwrite=True)