def query(self, **kwargs): # check for data release to use if "coordinates" in kwargs: self.__coordinates = kwargs["coordinates"] elif "ra" in kwargs and "dec" in kwargs: self.__coordinates = str(kwargs["ra"]) + "," + str(kwargs["dec"]) else: raise ValueError( "Not valid coordinates found. Used coordinates key or ra dec keys" ) self.__coordinates = CoordinateParser.validateCoordinates( self.__coordinates) radius = 1 # arcmin if "radius" in kwargs: radius = kwargs["radius"] params = { "bgApp": "/FinderChart/nph-finder", "romeserver": "ROMEDEV", "srchsize": 12.0, "outsize": 200, "colortbl": 1, "nthread": 10, "markercolor": "red", "markersize": 10, "mode": "cgi", "outtype": "single", "locstr": "20.48371,0.4223", "subsetsize": 5.0, "survey": "sdss", "survey": "dss", "survey": "2mass", "markervis_shrunk": "true" } print(Irsa.list_catalogs()) r = Irsa.query_region(self.__coordinates, catalog='fp_psc', radius=radius * u.arcmin) return r
def test_list_catalogs(self): catalogs = Irsa.list_catalogs(cache=False) # Number of available catalogs may change over time, test only for significant drop. # (at the time of writing there are 587 catalogs in the list). assert len(catalogs) > 500
from astroquery.irsa import Irsa print Irsa.list_catalogs()