Skip to content

Commit 4ad97b8

Browse files
syed-gilanibsipocz
authored andcommitted
changed class name from MissionsMast to MastMissions
1 parent 858c916 commit 4ad97b8

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

astroquery/mast/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ class Conf(_config.ConfigNamespace):
3333
from .cutouts import TesscutClass, Tesscut, ZcutClass, Zcut
3434
from .observations import Observations, ObservationsClass, MastClass, Mast
3535
from .collections import Catalogs, CatalogsClass
36-
from .missions import MissionsMast, MissionsMastClass
36+
from .missions import MastMissions, MastMissionsClass
3737
from .core import MastQueryWithLogin
3838
from . import utils
3939

4040
__all__ = ['Observations', 'ObservationsClass',
4141
'Catalogs', 'CatalogsClass',
42-
'MissionsMast', 'MissionsMastClass',
42+
'MastMissions', 'MastMissionsClass',
4343
'Mast', 'MastClass',
4444
'Tesscut', 'TesscutClass',
4545
'Zcut', 'ZcutClass',

astroquery/mast/missions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
from astroquery.mast import utils
1717
from astroquery.mast.core import MastQueryWithLogin
1818

19-
__all__ = ['MissionsMastClass', 'MissionsMast']
19+
__all__ = ['MastMissionsClass', 'MastMissions']
2020

2121

2222
@async_to_sync
23-
class MissionsMastClass(MastQueryWithLogin):
23+
class MastMissionsClass(MastQueryWithLogin):
2424
"""
25-
MissionsMast search class.
25+
MastMissions search class.
2626
2727
Class that allows direct programatic access to the MAST search API for a given mission.
2828
"""
@@ -184,4 +184,4 @@ def query_object_async(self, objectname, radius=3*u.arcmin, **kwargs):
184184
return self.query_region_async(coordinates, radius, **kwargs)
185185

186186

187-
MissionsMast = MissionsMastClass()
187+
MastMissions = MastMissionsClass()

astroquery/mast/tests/test_mast.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,22 @@ def zcut_download_mockreturn(url, file_path):
180180

181181

182182
def test_missions_query_region_async(patch_post):
183-
responses = mast.MissionsMast.query_region_async(regionCoords, radius=0.002, sci_pi_last_name='GORDON')
183+
responses = mast.MastMissions.query_region_async(regionCoords, radius=0.002, sci_pi_last_name='GORDON')
184184
assert isinstance(responses, MockResponse)
185185

186186

187187
def test_missions_query_object_async(patch_post):
188-
responses = mast.MissionsMast.query_object_async("M101", radius="0.002 deg")
188+
responses = mast.MastMissions.query_object_async("M101", radius="0.002 deg")
189189
assert isinstance(responses, MockResponse)
190190

191191

192192
def test_missions_query_object(patch_post):
193-
result = mast.MissionsMast.query_object("M101", radius=".002 deg")
193+
result = mast.MastMissions.query_object("M101", radius=".002 deg")
194194
assert isinstance(result, Table)
195195

196196

197197
def test_missions_query_region(patch_post):
198-
result = mast.MissionsMast.query_region(regionCoords, radius=0.002 * u.deg)
198+
result = mast.MastMissions.query_region(regionCoords, radius=0.002 * u.deg)
199199
assert isinstance(result, Table)
200200

201201

@@ -211,7 +211,7 @@ def test_missions_query_criteria_async(patch_post):
211211
start_time = {'sci_start_time': ""}
212212
obs_type = {'sci_obs_type': 'all'}
213213
aec = {'sci_aec': 'S'}
214-
responses = mast.MissionsMast.query_criteria_async(coordinates=regionCoords,
214+
responses = mast.MastMissions.query_criteria_async(coordinates=regionCoords,
215215
radius=3,
216216
conditions=[pep_id,
217217
obs_type,

docs/mast/mast.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ the current Mission Search interface.
196196
Currenlty, the API only includes the search functionality. The functionality to
197197
download data products associated with search results is not currently supported.
198198

199-
An object of MissionsMast class is instantiated with a default mission of 'hst' and
199+
An object of MastMissions class is instantiated with a default mission of 'hst' and
200200
default service set to 'search'. set_service() and set_mission() can be used to change
201201
the service and mission to other values but right now, API only supports search service
202202
and 'hst' mission.
203203

204204
.. code-block:: python
205205
206-
>>> from astroquery.mast.missions import MissionsMast
207-
>>> missions = MissionsMast()
206+
>>> from astroquery.mast.missions import MastMissions
207+
>>> missions = MastMissions()
208208
>>> missions.mission
209209
'hst'
210210
>>> missions.service
@@ -222,9 +222,9 @@ for a non cone search, select_cols would always include search_key and sci_data_
222222

223223
.. code-block:: python
224224
225-
>>> from astroquery.mast.missions import MissionsMast
225+
>>> from astroquery.mast.missions import MastMissions
226226
>>> from astropy.coordinates import SkyCoord
227-
>>> missions = MissionsMast()
227+
>>> missions = MastMissions()
228228
>>> regionCoords = SkyCoord(210.80227, 54.34895, unit=('deg', 'deg'))
229229
>>> results = missions.query_region(regionCoords, 3, sci_pep_id=12556, select_cols=["sci_stop_time", "sci_targname", "sci_start_time", "sci_status"], sort_by=['sci_targname'])
230230
>>> results[:5]
@@ -244,9 +244,9 @@ of returned records. the default values for offset and limit is 0 and 5000 respe
244244

245245
.. code-block:: python
246246
247-
>>> from astroquery.mast.missions import MissionsMast
247+
>>> from astroquery.mast.missions import MastMissions
248248
>>> from astropy.coordinates import SkyCoord
249-
>>> missions = MissionsMast()
249+
>>> missions = MastMissions()
250250
>>> results = missions.query_criteria(sci_start_time=">=2021-01-01 00:00:00", select_cols=["sci_stop_time", "sci_targname", "sci_start_time", "sci_status", "sci_pep_id"], sort_by=['sci_pep_id'], limit=1000, offset=1000)
251251
>>> len(results)
252252
>>> 1000

0 commit comments

Comments
 (0)