Skip to content

Commit 942f4fb

Browse files
authored
Merge pull request #2620 from mitchcs/casda-docs-cutout-channel-example
Casda docs cutout channel example
2 parents 285331d + 85d3451 commit 942f4fb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

docs/casda/casda.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ below:
158158
>>> url_list = casda.cutout(subset[:1], coordinates=centre, radius=14*u.arcmin)
159159
>>> filelist = casda.download_files(url_list, savedir='/tmp')
160160

161-
An example script to download a 3D cutout from the WALLABY Pre-Pilot Eridanus cube at a specified position and velocity
161+
An example script to download a 3D cutout from the WALLABY Pre-Pilot Eridanus cube at a specified position and velocity range
162162
is shown below:
163163

164164
.. doctest-skip::
@@ -176,6 +176,23 @@ is shown below:
176176
>>> url_list = casda.cutout(eridanus_cube, coordinates=centre, radius=9*u.arcmin, band=freq)
177177
>>> filelist = casda.download_files(url_list, savedir='/tmp')
178178

179+
An example script to download a 3D cutout of a spectral channel range from the WALLABY Pre-Pilot Eridanus cube
180+
is shown below:
181+
182+
.. doctest-skip::
183+
184+
>>> from astropy import coordinates, units as u, wcs
185+
>>> from astroquery.casda import Casda
186+
>>> centre = coordinates.SkyCoord.from_name('NGC 1371')
187+
>>> casda = Casda()
188+
>>> casda.login(username='[email protected]')
189+
>>> result = Casda.query_region(centre, radius=30*u.arcmin)
190+
>>> public_data = Casda.filter_out_unreleased(result)
191+
>>> eridanus_cube = public_data[public_data['filename'] == 'Eridanus_full_image_V3.fits']
192+
>>> channel = (5, 10)
193+
>>> url_list = casda.cutout(eridanus_cube, channel=channel)
194+
>>> filelist = casda.download_files(url_list, savedir='/tmp')
195+
179196

180197
Reference/API
181198
=============

0 commit comments

Comments
 (0)