Skip to content

Commit 46bdcce

Browse files
committed
1 parent 1b9cc63 commit 46bdcce

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

astroquery/astrometry_net/core.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def _validate_settings(self, settings):
199199
'values for {}'.format(scale_type, required_keys))
200200

201201
def monitor_submission(self, submission_id, *,
202-
solve_timeout=TIMEOUT, verbose=True, return_job_id=False):
202+
solve_timeout=TIMEOUT, verbose=True, return_submission_id=False):
203203
"""
204204
Monitor the submission for completion.
205205
@@ -213,8 +213,8 @@ def monitor_submission(self, submission_id, *,
213213
a solution.
214214
verbose : bool, optional
215215
Whether to print out information about the solving.
216-
return_job_id : bool, optional
217-
Whether to return the Submission ID number (called Job ID on Astrometry.net).
216+
return_submission_id : bool, optional
217+
Whether to return the Submission ID number.
218218
219219
Returns
220220
-------
@@ -224,7 +224,7 @@ def monitor_submission(self, submission_id, *,
224224
succeeds or fails. If the solve succeeds the header with
225225
the WCS solution generated by astrometry.net is returned. A tuple
226226
containing WCS solution and Submission ID is return if the
227-
return_job_id parameter is set True. If the solve
227+
return_submission_id parameter is set True. If the solve
228228
fails then an empty dictionary is returned. See below for the outcome
229229
if the solve times out.
230230
@@ -272,15 +272,15 @@ def monitor_submission(self, submission_id, *,
272272
else:
273273
# Try to future-proof a little bit
274274
raise RuntimeError('Unrecognized status {}'.format(status))
275-
if return_job_id is False:
275+
if return_submission_id is False:
276276
return wcs
277277
else:
278278
return (wcs, submission_id)
279279

280280
def solve_from_source_list(self, x, y, image_width, image_height, *,
281281
solve_timeout=TIMEOUT,
282282
verbose=True,
283-
return_job_id=False,
283+
return_submission_id=False,
284284
**settings
285285
):
286286
"""
@@ -302,8 +302,8 @@ def solve_from_source_list(self, x, y, image_width, image_height, *,
302302
a solution.
303303
verbose : bool, optional
304304
Whether to print out information about the solving.
305-
return_job_id : bool, optional
306-
Whether to return the Submission ID number (called Job ID on Astrometry.net).
305+
return_submission_id : bool, optional
306+
Whether to return the Submission ID number.
307307
308308
For a list of the remaining settings, use the method
309309
`~AstrometryNetClass.show_allowed_settings`.
@@ -329,15 +329,15 @@ def solve_from_source_list(self, x, y, image_width, image_height, *,
329329
return self.monitor_submission(submission_id,
330330
solve_timeout=solve_timeout,
331331
verbose=verbose,
332-
return_job_id=return_job_id)
332+
return_submission_id=return_submission_id)
333333

334334
def solve_from_image(self, image_file_path, *, force_image_upload=False,
335335
ra_key=None, dec_key=None,
336336
ra_dec_units=None,
337337
fwhm=3, detect_threshold=5,
338338
solve_timeout=TIMEOUT,
339339
verbose=True,
340-
return_job_id=False,
340+
return_submission_id=False,
341341
**settings):
342342
"""
343343
Plate solve from an image, either by uploading the image to
@@ -381,8 +381,8 @@ def solve_from_image(self, image_file_path, *, force_image_upload=False,
381381
verbose : bool, optional
382382
Whether to print out information about the solving.
383383
384-
return_job_id : bool, optional
385-
Whether to return the Submission ID number (called Job ID on Astrometry.net).
384+
return_submission_id : bool, optional
385+
Whether to return the Submission ID number.
386386
387387
For a list of the remaining settings, use the method
388388
`~AstrometryNetClass.show_allowed_settings`.
@@ -447,6 +447,7 @@ def solve_from_image(self, image_file_path, *, force_image_upload=False,
447447
ccd.header['naxis2'],
448448
solve_timeout=solve_timeout,
449449
verbose=verbose,
450+
return_submission_id=return_submission_id,
450451
**settings)
451452
if response.status_code != 200:
452453
raise RuntimeError('Post of job failed')
@@ -455,7 +456,7 @@ def solve_from_image(self, image_file_path, *, force_image_upload=False,
455456
return self.monitor_submission(submission_id,
456457
solve_timeout=solve_timeout,
457458
verbose=verbose,
458-
return_job_id=return_job_id)
459+
return_submission_id=return_submission_id)
459460

460461

461462
# the default tool for users to interact with is an instance of the Class

astroquery/astrometry_net/tests/test_astrometry_net_remote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_solve_from_image_default_behaviour():
172172

173173
@pytest.mark.skipif(not api_key, reason='API key not set.')
174174
@pytest.mark.remote_data
175-
def test_solve_from_image_with_return_job_id():
175+
def test_solve_from_image_with_return_submission_id():
176176
# Test that solving by uploading an image works
177177
a = AstrometryNet()
178178
a.api_key = api_key
@@ -182,6 +182,6 @@ def test_solve_from_image_with_return_job_id():
182182
result = a.solve_from_source_list(sources['X'], sources['Y'],
183183
4109, 4096,
184184
crpix_center=True,
185-
return_job_id=True)
185+
return_submission_id=True)
186186

187187
assert isinstance(result, tuple)

0 commit comments

Comments
 (0)