@@ -110,7 +110,7 @@ def __init__(self):
110
110
}
111
111
self ._service_api_connection .set_service_params (services , "tesscut" )
112
112
113
- def get_sectors (self , coordinates = None , radius = 0 * u .deg , objectname = None , moving_target = None , mt_type = None ):
113
+ def get_sectors (self , coordinates = None , radius = 0 * u .deg , objectname = None , moving_target = False , mt_type = None ):
114
114
"""
115
115
Get a list of the TESS data sectors whose footprints intersect
116
116
with the given search area.
@@ -120,27 +120,36 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
120
120
coordinates : str or `astropy.coordinates` object, optional
121
121
The target around which to search. It may be specified as a
122
122
string or as the appropriate `astropy.coordinates` object.
123
- One and only one of coordinates, objectname, and moving_target must be supplied.
123
+
124
+ NOTE: If moving_targets or objectname is supplied, this argument cannot be used.
125
+
124
126
radius : str, float, or `~astropy.units.Quantity` object, optional
125
127
Default 0 degrees.
126
128
If supplied as a float degrees is the assumed unit.
127
129
The string must be parsable by `~astropy.coordinates.Angle`. The
128
130
appropriate `~astropy.units.Quantity` object from
129
131
`astropy.units` may also be used.
130
- This argument is ignored if moving_target is supplied.
132
+
133
+ NOTE: If moving_target is supplied, this argument is ignored.
134
+
131
135
objectname : str, optional
132
136
The target around which to search, by name (objectname="M104")
133
- or TIC ID (objectname="TIC 141914082").
134
- One and only one of coordinates, objectname, moving_target must be supplied.
135
- moving_target : str, optional
136
- The name or ID (as understood by the
137
+ or TIC ID (objectname="TIC 141914082"). If moving_target is True, input must be the name or ID (as understood by the
137
138
`JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__)
138
139
of a moving target such as an asteroid or comet.
139
- One and only one of coordinates, objectname, and moving_target must be supplied.
140
+
141
+ NOTE: If coordinates is supplied, this argument cannot be used.
142
+
143
+ moving_target : bool, optional
144
+ Indicate whether the object is a moving target or not. Default is set to False, in other words, not a moving target.
145
+
146
+ NOTE: If coordinates is supplied, this argument cannot be used.
147
+
140
148
mt_type : str, optional
141
149
The moving target type, valid inputs are majorbody and smallbody. If not supplied
142
150
first majorbody is tried and then smallbody if a matching majorbody is not found.
143
- This argument is ignored unless moving_target is supplied.
151
+
152
+ NOTE: If moving_target is supplied, this argument is ignored.
144
153
145
154
Returns
146
155
-------
@@ -150,11 +159,14 @@ def get_sectors(self, coordinates=None, radius=0*u.deg, objectname=None, moving_
150
159
151
160
if moving_target :
152
161
153
- # Check only ony object designator has been passed in
154
- if objectname or coordinates :
155
- raise InvalidQueryError ("Only one of objectname, coordinates, and moving_target may be specified." )
162
+ # Check that objectname has been passed in
163
+ if coordinates :
164
+ raise InvalidQueryError ("Only one of moving_target and coordinates may be specified." )
165
+
166
+ if not objectname :
167
+ raise InvalidQueryError ("Please specify the object name or ID (as understood by the `JPL ephemerides service <https://ssd.jpl.nasa.gov/horizons.cgi>`__) of a moving target such as an asteroid or comet." )
156
168
157
- params = {"obj_id" : moving_target }
169
+ params = {"obj_id" : objectname }
158
170
159
171
# Add optional parameter is present
160
172
if mt_type :
0 commit comments