Skip to content

Commit 83ed542

Browse files
committed
Change cutout example to use RACS
1 parent 33f23ee commit 83ed542

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/casda/casda.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,28 +142,32 @@ Cutouts
142142
=======
143143

144144
As well as accessing full data products, the CASDA service can produce cutout images and cubes from larger data products.
145-
The cutout support in AstroQuery allows both spatial an spectral cutouts.
145+
The cutout support in AstroQuery allows both spatial and spectral cutouts.
146146
To produce a spatial cutout, pass in a coordinate and either a radius or a height and a width to the :meth:`~astroquery.casda.CasdaClass.cutout` method.
147147
To produce a spectral cutout, pass in either a band or a channel value.
148148
For band, the value must be a list or tuple of two `astropy.units.Quantity` objects specifying a low and high frequency or wavelength. For an open ended range use `None` as the open value.
149149
For channel, the value must be a list or tuple of two integers specifying the low and high channels (i.e. planes of a cube) inclusive.
150+
Spatial and spectral parameters can be combined to produce sub-cubes.
150151

151152
Once completed, the cutouts can be downloaded as described in the section above.
152153

153-
An example script to download a cutout from public spectral line cubes of the NGC 5044 region taken in scheduling block 25750 is shown below:
154+
An example script to download a cutout from the Rapid ASKAP Continuum Survey (RACS) at a specified position is shown below:
154155
.. code-block:: python
155156
156157
>>> from astropy import coordinates, units as u, wcs
157158
>>> from astroquery.casda import Casda
158159
>>> import getpass
159-
>>> centre = coordinates.SkyCoord.from_name('NGC 5044')
160+
>>> centre = coordinates.SkyCoord.from_name('2MASX J08161181-7039447')
160161
>>> username = '[email protected]'
161162
>>> password = getpass.getpass(str("Enter your OPAL password: "))
162163
>>> casda = Casda(username, password)
163164
>>> result = Casda.query_region(centre, radius=30*u.arcmin)
164165
>>> public_data = Casda.filter_out_unreleased(result)
165-
>>> subset = public_data[(public_data['dataproduct_subtype']=='spectral_restored_3d') & (public_data['obs_id']=='25750')]
166-
>>> url_list = casda.cutout(subset, coordinates=centre, radius=12*u.arcmin, band=(1340*u.MHz,1365*u.MHz))
166+
>>> subset = public_data[((public_data['obs_collection'] == 'The Rapid ASKAP Continuum Survey') & #
167+
(np.char.startswith(public_data['filename'], 'RACS-DR1_')) & #
168+
(np.char.endswith(public_data['filename'], 'A.fits'))
169+
)]
170+
>>> url_list = casda.cutout(subset[:1], coordinates=centre, radius=14*u.arcmin)
167171
>>> filelist = casda.download_files(url_list, savedir='/tmp')
168172
169173

0 commit comments

Comments
 (0)