# Import all classes from astrogrid module from astrogrid import * # Now we are going to search for SIAP services providing access to SDSS DR4 reg = Registry() items = reg.searchSiap('SDSSDR4') len(items) [r['id'] for r in items] # We want the full images so we select the first service and we perform the query id = items[0]['id'] siap = SiapSearch(id) votable = siap.execute(180.0, 2.0, 0.2) # As before with the cone search one can send the output to TOPCAT # or save it to MySpace votable = siap.execute(180.0, 2.0, 0.2, saveAs='#test1/sdss.vot') # Have a look at MySpace browser now # SIAP services return a list of images, so one can save the images to MySpace easily with votable, thread = siap.execute(180.0, 2.0, 0.2, saveDatasets='#test1/') # The return now is a python thread thread.isAlive() # Play with Aladin # The votable can also be sent to Aladin from astrogrid.utils import broadcast broadcast(votable) # We can now perform a query to NED and display the catalogue on top of the image cone = ConeSearch("ivo://ned.ipac/Basic_Data_Near_Position") vot=cone.execute(180.0,2.0,0.2) broadcast(vot) # By the way, check thread.isAlice() # Go to MySpace and send one file to Aladin # Look at MySpace from python m = MySpace() m.ls('#test1') votable=m.readfile('#test1/sdss.vot') m.rm('#test1') m.rm('#test1',recursive=True) m.ls()