Skip to content

Commit a0edff3

Browse files
author
Erik Jensen
committed
Fix typing of refcat entries; bump VERSION
1 parent 99d1a0d commit a0edff3

3 files changed

Lines changed: 20 additions & 17 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
master-v1.2.0
1+
master-v1.2.1

flows/catalogs.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

run_catalogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def main():
4444

4545
targets = api.get_catalog_missing()
4646
if args.target is not None:
47-
if args.print is None:
47+
if args.print is False:
4848
# We want to download and possibly commit the target catalog
4949
if int(args.target) in targets:
5050
logger.info("Downloading catalog for target=%s (committing to db=%s)...", args.target, args.commit)

0 commit comments

Comments
 (0)