@@ -276,6 +276,8 @@ def query_local_refcat2(coo_centre, radius=24 * u.arcmin):
276276
277277 .. codeauthor:: Erik Jensen
278278 """
279+ if isinstance (radius , (float , int )):
280+ radius *= u .deg
279281
280282 current_max_objid = 300_000_000_000_000_000
281283 with AADC_DB () as db :
@@ -292,28 +294,29 @@ def query_local_refcat2(coo_centre, radius=24 * u.arcmin):
292294 encoding = "utf-8" , capture_output = True , check = True )
293295
294296 # TODO: feel free to make this less awful!
295- OBJID = RA = DEC = PMRA = PMDEC = GAIA = BP = RP = DUPVAR = G = R = I = Z = J = H = K = np .array ([])
297+ OBJID = DUPVAR = np .array ([], dtype = 'int' )
298+ RA = DEC = PMRA = PMDEC = GAIA = BP = RP = G = R = I = Z = J = H = K = np .array ([], dtype = 'float' )
296299 for line in refcat_output .stdout .splitlines ():
297300 OBJID = np .append (OBJID , current_max_objid )
298301 current_max_objid += 1
299302
300303 ra , dec , pmra , pmdec , gaia , bp , rp , dupvar , g , r , i , z , j , h , k = line .split ()
301304
302- RA = np .append (RA , ra )
303- DEC = np .append (DEC , dec )
304- PMRA = np .append (PMRA , pmra )
305- PMDEC = np .append (PMDEC , pmdec )
306- GAIA = np .append (GAIA , gaia )
307- BP = np .append (BP , bp )
308- RP = np .append (RP , rp )
305+ RA = np .append (RA , ra )
306+ DEC = np .append (DEC , dec )
307+ PMRA = np .append (PMRA , pmra )
308+ PMDEC = np .append (PMDEC , pmdec )
309+ GAIA = np .append (GAIA , gaia )
310+ BP = np .append (BP , bp )
311+ RP = np .append (RP , rp )
309312 DUPVAR = np .append (DUPVAR , dupvar )
310- G = np .append (G , g )
311- R = np .append (R , r )
312- I = np .append (I , i )
313- Z = np .append (Z , z )
314- J = np .append (J , j )
315- H = np .append (H , h )
316- K = np .append (K , k )
313+ G = np .append (G , g )
314+ R = np .append (R , r )
315+ I = np .append (I , i )
316+ Z = np .append (Z , z )
317+ J = np .append (J , j )
318+ H = np .append (H , h )
319+ K = np .append (K , k )
317320
318321 # rename columns to match older java-based implementation which had different naming conventions
319322 # TODO: refactor dependent functions to expect the default namings and get rid of these renamings
0 commit comments