JS9: astronomical image display right in your browser
JS9 brings astronomical image display to your browser:
  • display FITS images and tables in a web page
  • display FITS data cubes and multi-extension files
  • drag and drop FITS images and tables
  • retrieve FITS files from data archives
  • change the colormap and scale
  • image pan, zoom and blink, table binning
  • image arithmetic, Gaussian smoothing
  • blend images and apply RGB image filters
  • configure mouse movements and touch events
  • create and manipulate regions of interest
  • extend JS9 using plugins and the public API
  • perform data analysis (local and server-side)
  • configure and control JS9 from within a web page
  • control JS9 from a command shell or Python
  • print images, save images, etc ...

Drag and drop a FITS astronomical data file onto the display and JS9 functionality immediately becomes available: zoom, pan, colormaps, scaling, regions ...

By extending JS9 with the plugin facility and the public API, you can perform browser-based analysis on the displayed image: click the Plugins tab, create a region, move it around ...

In addition, images loaded from a server support remote (server-side) analysis. For example, analysis can run when a region changes, with results displayed back in your browser: click the Analysis tab, choose a task, create a region, move it around ...

Energy Spectrum Counts in Regions Radial Profile
JS9 can be connected to a server-side (back-end) analysis system to run complex analysis tasks. Text and plot results can be displayed on the JS9 web page, or new images loaded into JS9. Virtually any analysis program can be added to the back-end.

Here is a quick introduction to server-side analysis using regions:

  • Create one or more regions using the JS9 Region menu.
  • Press the mouse inside a region and drag it to a desired location. (Use an annulus for radial profiles.)
  • Resize or rotate the region by clicking to select it, and then moving one of the handles.
  • Group regions by pressing the meta key and using mouse selection. You then can move/resize/rotate them together.
  • Choose an analysis to run on the server:
    • Energy Spectrum plots a histogram of the energy value of photons in the region(s).
    • Counts in Regions presents a text display of the number of photons found in the region(s).
    • Radial Profile plots the number of photons in each region of an annulus.
  • Every time a region changes, the chosen task will run on the server, and results will be displayed here.
  • These tasks also can be run from the JS9 Analysis menu.
See the Plugins tab for a demo of browser-based analysis.

Extend JS9 with Plugins, using the JS9 Public API to perform event-driven, local analysis. Create a region, move it around ...

Recent Public Releases:

Release 1.10 (10/11/16) adds support for keyboard actions, full window display, session management, alternate WCS, along with a more modern look.

Release 1.9 (06/08/16) adds support for multi-extension FITS, 3D cubes, image arithmetic, RGB image processing, gesture config, new scales and colormaps.

Release 1.8 (03/21/16) adds support for image blending, image filters, wcs reprojections, colorbar, blinking, Gaussian blur, line region with distance measure, raw data layer manipulation.

Release 1.7 (01/12/16) adds support for resizing the display, adding tooltips to catalogs, and embedding JS9 in Jupyter/IPython.

Release 1.6 (11/7/15) adds support for loading FITS URLs via proxy, dealing with large files, and iOS improvements.

Release 1.5 (7/9/15) adds support for importing DS9/Funtools regions, and for running the back-end helper using https.

Release 1.4 (5/3/15) provides bug fixes for the binning plugin, adds a user preference plugin, and supports export to FITS and PNG files.

Release 1.3 (3/30/15) incorporates the standard cfitsio FITS library, using Emscripten to compile to JavaScript.

Release 1.2 (1/4/15) adds support for the new pyjs9 Python interface via GET/POST support in the back-end Node.js server.

For more details, see the ChangeLog.

JS9 is distributed under the terms of The MIT License.

The current JS9 source tar file is available below. This will allow you to display FITS images (drag-and-drop and URL-based access) with all essential functionality, including browser-based plugins.

The pyjs9 Python interface supports the JS9 Public API and a short-cut command interface, communicating with JS9 through the back-end Node helper.

To run the demo pages at your site, download the data tar file.

To configure a back-end Node helper (for server-side analysis and external control), you also will need to install the cfitsio library.

Tar files:

JS9 and pyjs9 also are available on GitHub, where the repositories contain the very latest bug fixes and enhancements:

JS9 is powered by the following technologies, to whom grateful acknowledgment is made:
  • HTML5 for image display and most everything
  • jquery for programming ease (http://jquery.com/)
  • fabric.js for 2D graphics (http://fabricjs.com/)
  • emscripten for C-to-JavaScript (http://emscripten.org)
  • stack overflow for many helpful tips (http://stackoverflow.com)
  • dynamic drive for light windows (http://www.dynamicdrive.com)
  • flot for plotting (http://www.flotcharts.org/)
  • swis et al for jquery.contextMenu (http://swisnl.github.io/)
  • arrive.js for MutationObserver support (https://github.com/uzairfarooq/arrive)
  • appcropolis for double click support (http://appcropolis.com/blog/howto/implementing-doubletap-on-iphones-and-ipads/)
  • spin.js for spinner support (http://spin.js.org/)
  • Marc J Schmidt for CSS element queries (https://github.com/marcj/css-element-queries)
  • HEASARC for CFITSIO (https://heasarc.gsfc.nasa.gov/fitsio/)
  • IPAC for Montage (http://montage.ipac.caltech.edu/)
  • SAO/TDC for WCS lib (http://tdc-www.harvard.edu/wcstools/)

Thanks for important suggestions and (sometimes) code from:

  • Brian Cherinka, JHU (multi-extension FITS, data cubes)
  • Joseph DePasquale, CfA (image blending techniques)
  • Karl Glazebrook, Swinburne (iPad support)
  • Matias Carrasco Kind, NCSA (Jupyter support)
  • Kathy Lestition, CfA (EPO)
  • Briehan Lombaard SAAO (telescope control)
  • John Roll, Facebook (design philosophy, analysis plugins)
  • Pat Slane, CfA (needs of research vs. education)
  • The Science Education Department, CfA (EPO)

The development of JS9 is supported by Smithsonian Institution, NASA, and the Chandra X-ray Science Center.

Questions? Please contact Eric Mandel
About |  Research |  Education & Outreach |  Facilities |  Opportunities |  Events |  Press Room |  Contacts |  Support CfA |  Privacy