Skip to content

Commit

Permalink
Cast sqrt columns to floats and put in placeholder for new vizier cat…
Browse files Browse the repository at this point in the history
…alog
  • Loading branch information
alexandergagliano committed Oct 25, 2023
1 parent 5a9269c commit f4a87ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
15 changes: 8 additions & 7 deletions astro_ghost/DLR.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,15 @@ def chooseByGladeDLR(path, fn, snDF, verbose=False, todo='r'):
dec_SN = float(row['DEC'])
class_SN = str(row['Obj. Type'])

# TODO fix this
#query the glade catalog
Vizier.ROW_LIMIT = -1
Vizier.TIMEOUT = 500
result = Vizier.query_region(SkyCoord(ra=ra_SN, dec=dec_SN,unit=(u.deg, u.deg),frame='icrs'),radius=Angle(0.2, "deg"), catalog=["VII/275/glade1"])
if result:
hosts = result[0].to_pandas()
else:
hosts = pd.DataFrame({'a_b':[np.nan], 'maj':[np.nan], 'min':[np.nan]})
#Vizier.ROW_LIMIT = -1
#Vizier.TIMEOUT = 500
#result = Vizier.query_region(SkyCoord(ra=ra_SN, dec=dec_SN,unit=(u.deg, u.deg),frame='icrs'),radius=Angle(0.2, "deg"), catalog=["VII/275/glade1"])
#if result:
# hosts = result[0].to_pandas()
#else:
# hosts = pd.DataFrame({'a_b':[np.nan], 'maj':[np.nan], 'min':[np.nan]})

# query NED for GLADE sources and get their radius
GLADE_rad = hosts.dropna(subset=['a_b', 'maj', 'min'])
Expand Down
5 changes: 0 additions & 5 deletions astro_ghost/PS1QueryFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@
from urllib import pathname2url as urlencode
from urllib import urlretrieve
import httplib
#from collections import OrderedDict
from os import listdir
from os.path import join
#from astropy import utils, io, convolution, wcs
from astropy import units as u
#from astropy.visualization import make_lupton_rgb,PercentileInterval, AsinhStretch
#from astropy.coordinates import name_resolve, Angle
from astropy.coordinates import Angle
from astropy.io import fits, ascii
from astropy.table import Table
#from pyvo.dal import sia
import pickle
from io import BytesIO
from astropy.coordinates import SkyCoord
Expand Down

0 comments on commit f4a87ea

Please sign in to comment.