Skip to content

Commit 4aec2b3

Browse files
committed
updating moving_target argument and documentation for get_sectors, download_cutouts, and get_cutouts.
1 parent c9ebd67 commit 4aec2b3

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

astroquery/mast/cutouts.py

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
121121
The target around which to search. It may be specified as a
122122
string or as the appropriate `astropy.coordinates` object.
123123
124-
NOTE: If moving_targets or objectname is supplied, this argument cannot be used.
125-
124+
NOTE: If moving_target or objectname is supplied, this argument cannot be used.
126125
radius : str, float, or `~astropy.units.Quantity` object, optional
127126
Default 0 degrees.
128127
If supplied as a float degrees is the assumed unit.
@@ -131,20 +130,17 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
131130
`astropy.units` may also be used.
132131
133132
NOTE: If moving_target is supplied, this argument is ignored.
134-
135133
objectname : str, optional
136134
The target around which to search, by name (objectname="M104")
137135
or TIC ID (objectname="TIC 141914082"). If moving_target is True, input must be the name or ID (as understood by the
138136
`JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
139137
of a moving target such as an asteroid or comet.
140138
141139
NOTE: If coordinates is supplied, this argument cannot be used.
142-
143140
moving_target : bool, optional
144141
Indicate whether the object is a moving target or not. Default is set to False, in other words, not a moving target.
145142
146143
NOTE: If coordinates is supplied, this argument cannot be used.
147-
148144
mt_type : str, optional
149145
The moving target type, valid inputs are majorbody and smallbody. If not supplied
150146
first majorbody is tried and then smallbody if a matching majorbody is not found.
@@ -208,7 +204,7 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
208204
return Table(sector_dict)
209205

210206
def download_cutouts(self, coordinates=None, size=5, sector=None, path=".", inflate=True,
211-
objectname=None, moving_target=None, mt_type=None):
207+
objectname=None, moving_target=False, mt_type=None):
212208
"""
213209
Download cutout target pixel file(s) around the given coordinates with indicated size.
214210
@@ -217,7 +213,8 @@ def download_cutouts(self, coordinates=None, size=5, sector=None, path=".", infl
217213
coordinates : str or `astropy.coordinates` object, optional
218214
The target around which to search. It may be specified as a
219215
string or as the appropriate `astropy.coordinates` object.
220-
One and only one of coordinates, objectname, and moving_target must be supplied.
216+
217+
NOTE: If moving_target or objectname is supplied, this argument cannot be used.
221218
size : int, array-like, `~astropy.units.Quantity`
222219
Optional, default 5 pixels.
223220
The size of the cutout array. If ``size`` is a scalar number or
@@ -241,17 +238,20 @@ def download_cutouts(self, coordinates=None, size=5, sector=None, path=".", infl
241238
Set inflate to false to stop before the inflate step.
242239
objectname : str, optional
243240
The target around which to search, by name (objectname="M104")
244-
or TIC ID (objectname="TIC 141914082").
245-
One and only one of coordinates, objectname, and moving_target must be supplied.
246-
moving_target : str, optional
247-
The name or ID (as understood by the
241+
or TIC ID (objectname="TIC 141914082"). If moving_target is True, input must be the name or ID (as understood by the
248242
`JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
249243
of a moving target such as an asteroid or comet.
250-
One and only one of coordinates, objectname, and moving_target must be supplied.
244+
245+
NOTE: If coordinates is supplied, this argument cannot be used.
246+
moving_target : str, optional
247+
Indicate whether the object is a moving target or not. Default is set to False, in other words, not a moving target.
248+
249+
NOTE: If coordinates is supplied, this argument cannot be used.
251250
mt_type : str, optional
252251
The moving target type, valid inputs are majorbody and smallbody. If not supplied
253252
first majorbody is tried and then smallbody if a matching majorbody is not found.
254-
This argument is ignored unless moving_target is supplied.
253+
254+
NOTE: If moving_target is supplied, this argument is ignored.
255255
256256
Returns
257257
-------
@@ -309,7 +309,7 @@ def download_cutouts(self, coordinates=None, size=5, sector=None, path=".", infl
309309
return localpath_table
310310

311311
def get_cutouts(self, coordinates=None, size=5, sector=None,
312-
objectname=None, moving_target=None, mt_type=None):
312+
objectname=None, moving_target=False, mt_type=None):
313313
"""
314314
Get cutout target pixel file(s) around the given coordinates with indicated size,
315315
and return them as a list of `~astropy.io.fits.HDUList` objects.
@@ -319,7 +319,8 @@ def get_cutouts(self, coordinates=None, size=5, sector=None,
319319
coordinates : str or `astropy.coordinates` object, optional
320320
The target around which to search. It may be specified as a
321321
string or as the appropriate `astropy.coordinates` object.
322-
One and only one of coordinates, objectname, and moving_target must be supplied.
322+
323+
NOTE: If moving_target or objectname is supplied, this argument cannot be used.
323324
size : int, array-like, `~astropy.units.Quantity`
324325
Optional, default 5 pixels.
325326
The size of the cutout array. If ``size`` is a scalar number or
@@ -334,17 +335,20 @@ def get_cutouts(self, coordinates=None, size=5, sector=None,
334335
from all available sectors on which the coordinate appears will be returned.
335336
objectname : str, optional
336337
The target around which to search, by name (objectname="M104")
337-
or TIC ID (objectname="TIC 141914082").
338-
One and only one of coordinates, objectname, and moving_target must be supplied.
339-
moving_target : str, optional
340-
The name or ID (as understood by the
338+
or TIC ID (objectname="TIC 141914082"). If moving_target is True, input must be the name or ID (as understood by the
341339
`JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
342340
of a moving target such as an asteroid or comet.
343-
One and only one of coordinates, objectname, and moving_target must be supplied.
341+
342+
NOTE: If coordinates is supplied, this argument cannot be used.
343+
moving_target : str, optional
344+
Indicate whether the object is a moving target or not. Default is set to False, in other words, not a moving target.
345+
346+
NOTE: If coordinates is supplied, this argument cannot be used.
344347
mt_type : str, optional
345348
The moving target type, valid inputs are majorbody and smallbody. If not supplied
346349
first majorbody is tried and then smallbody if a matching majorbody is not found.
347-
This argument is ignored unless moving_target is supplied.
350+
351+
NOTE: If moving_target is supplied, this argument is ignored.
348352
349353
Returns
350354
-------

0 commit comments

Comments
 (0)