@@ -164,7 +164,7 @@ def image_tester(images, filetype):
164
164
@pytest .mark .parametrize ("dr" , dr_list )
165
165
def test_sdss_spectrum (patch_request , patch_get_readable_fileobj , dr ,
166
166
coords = coords ):
167
- xid = sdss .SDSS .query_region (coords , data_release = dr , spectro = True )
167
+ xid = sdss .SDSS .query_region (coords , radius = Angle ( '2 arcsec' ), data_release = dr , spectro = True )
168
168
url_tester_crossid (dr )
169
169
sp = sdss .SDSS .get_spectra (matches = xid , data_release = dr )
170
170
image_tester (sp , 'spectra' )
@@ -213,7 +213,7 @@ class = 'galaxy'
213
213
@pytest .mark .parametrize ("dr" , dr_list )
214
214
def test_sdss_image_from_query_region (patch_request , patch_get_readable_fileobj ,
215
215
dr , coords = coords ):
216
- xid = sdss .SDSS .query_region (coords , data_release = dr )
216
+ xid = sdss .SDSS .query_region (coords , radius = Angle ( '2 arcsec' ), data_release = dr )
217
217
url_tester_crossid (dr )
218
218
# TODO test what img is
219
219
img = sdss .SDSS .get_images (matches = xid )
@@ -273,7 +273,7 @@ def test_sdss_photoobj(patch_request, dr):
273
273
274
274
@pytest .mark .parametrize ("dr" , dr_list )
275
275
def test_list_coordinates (patch_request , dr ):
276
- xid = sdss .SDSS .query_region (coords_list , data_release = dr )
276
+ xid = sdss .SDSS .query_region (coords_list , radius = Angle ( '2 arcsec' ), data_release = dr )
277
277
278
278
with warnings .catch_warnings ():
279
279
if sys .platform .startswith ('win' ):
@@ -290,7 +290,7 @@ def test_list_coordinates(patch_request, dr):
290
290
291
291
@pytest .mark .parametrize ("dr" , dr_list )
292
292
def test_column_coordinates (patch_request , dr ):
293
- xid = sdss .SDSS .query_region (coords_column , data_release = dr )
293
+ xid = sdss .SDSS .query_region (coords_column , radius = Angle ( '2 arcsec' ), data_release = dr )
294
294
295
295
with warnings .catch_warnings ():
296
296
if sys .platform .startswith ('win' ):
@@ -307,7 +307,7 @@ def test_column_coordinates(patch_request, dr):
307
307
308
308
def test_query_timeout (patch_request_slow , coord = coords ):
309
309
with pytest .raises (TimeoutError ):
310
- sdss .SDSS .query_region (coords , timeout = 1 )
310
+ sdss .SDSS .query_region (coords , radius = Angle ( '2 arcsec' ), timeout = 1 )
311
311
312
312
313
313
def test_spectra_timeout (patch_request , patch_get_readable_fileobj_slow ):
@@ -387,7 +387,7 @@ def test_list_coordinates_region_payload(patch_request, dr):
387
387
"p.ra, p.dec, p.objid, p.run, p.rerun, p.camcol, p.field "
388
388
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
389
389
"ORDER BY x.up_id" )
390
- query_payload = sdss .SDSS .query_region (coords_list , radius = Angle ('3 arcsec' ),
390
+ query_payload = sdss .SDSS .query_region (coords_list , radius = Angle ('2 arcsec' ),
391
391
get_query_payload = True ,
392
392
data_release = dr )
393
393
assert query_payload ['uquery' ] == expect
@@ -401,7 +401,7 @@ def test_column_coordinates_region_payload(patch_request, dr):
401
401
"p.ra, p.dec, p.objid, p.run, p.rerun, p.camcol, p.field "
402
402
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
403
403
"ORDER BY x.up_id" )
404
- query_payload = sdss .SDSS .query_region (coords_column , radius = Angle ('3 arcsec' ),
404
+ query_payload = sdss .SDSS .query_region (coords_column , radius = Angle ('2 arcsec' ),
405
405
get_query_payload = True ,
406
406
data_release = dr )
407
407
assert query_payload ['uquery' ] == expect
@@ -417,7 +417,7 @@ def test_column_coordinates_region_spectro_payload(patch_request, dr):
417
417
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
418
418
"JOIN SpecObjAll AS s ON p.objID = s.bestObjID "
419
419
"ORDER BY x.up_id" )
420
- query_payload = sdss .SDSS .query_region (coords_column , radius = Angle ('3 arcsec' ),
420
+ query_payload = sdss .SDSS .query_region (coords_column , radius = Angle ('2 arcsec' ),
421
421
spectro = True ,
422
422
get_query_payload = True ,
423
423
data_release = dr )
@@ -432,7 +432,7 @@ def test_column_coordinates_region_payload_custom_fields(patch_request, dr):
432
432
"p.r, p.psfMag_r "
433
433
"FROM #upload u JOIN #x x ON x.up_id = u.up_id JOIN PhotoObjAll AS p ON p.objID = x.objID "
434
434
"ORDER BY x.up_id" )
435
- query_payload = sdss .SDSS .query_region (coords_column , radius = Angle ('3 arcsec' ),
435
+ query_payload = sdss .SDSS .query_region (coords_column , radius = Angle ('2 arcsec' ),
436
436
get_query_payload = True ,
437
437
fields = ['r' , 'psfMag_r' ],
438
438
data_release = dr )
@@ -579,10 +579,10 @@ def test_field_help_region(patch_request):
579
579
assert isinstance (valid_field , dict )
580
580
assert 'photoobj_all' in valid_field
581
581
582
- existing_p_field = sdss .SDSS .query_region (coords ,
582
+ existing_p_field = sdss .SDSS .query_region (coords , radius = Angle ( '2 arcsec' ),
583
583
field_help = 'psfMag_r' )
584
584
585
- existing_s_field = sdss .SDSS .query_region (coords ,
585
+ existing_s_field = sdss .SDSS .query_region (coords , radius = Angle ( '2 arcsec' ),
586
586
field_help = 'spectroSynFlux_r' )
587
587
588
588
with pytest .warns (UserWarning , match = "nonexist isn't a valid 'photobj_field' or 'specobj_field'" ):
0 commit comments