Getting Started#

Prerequisites#

  • Python 3

  • firefly_client (installable with pip install firefly_client)

  • URL for a Firefly server

Connect to Firefly and open the viewer#

Create a FireflyClient instance by providing the URL of the Firefly server you want to connect to. Here we use the public IRSA Viewer:

[1]:
from firefly_client import FireflyClient
fc = FireflyClient.make_client(url='https://irsa.ipac.caltech.edu/irsaviewer')

make_client() usually opens a browser tab with the Firefly viewer automatically. If it didn’t, run launch_browser() which returns a success flag and the viewer URL.

[2]:
# fc.launch_browser()

Display a FITS image#

Now, use the Firefly client we created above (fc) to show your image in Firefly.

[3]:
# Image file can be a local path, URL, or file-like object - replace with your file
image_fpath = (
    'https://irsa.ipac.caltech.edu/ibe/data/wise/allsky/4band_p1bm_frm/9a/05379a/141/'
    '05379a141-w2-int-1b.fits?center=202.4841667,47.23055556&size=400pix'
)
fc.show_fits_image(image_fpath)
[3]:
{'success': True}

Display a catalog table#

Similarly, you can show your table in Firefly.

The sources are also overlaid automatically on the image if the table is a catalog containing celestial coordinates, and a default chart is displayed.

[ ]:
# Table file can be a local path, URL, or file-like object - replace with your file
table_fpath = (
    "http://irsa.ipac.caltech.edu/TAP/sync?FORMAT=IPAC_TABLE&QUERY="
    "SELECT+*+FROM+fp_psc+"
    "WHERE+CONTAINS(POINT('J2000',ra,dec),"
    "CIRCLE('J2000',202.4841667,47.23055556,0.125))=1"
)
fc.show_table(table_fpath)
{'success': True}