JS9: image display right in your browser

Questions? Please contact Eric Mandel
JS9 is our Web-based implementation of DS9:
  • display URL-based FITS images and binary tables
  • drag and drop FITS images and binary tables
  • change the colormap and scale
  • manipulate the contrast/bias with the mouse
  • display pixel values and WCS position information
  • create and manipulate geometric regions of interest
  • add your own extensions using plugins and the Public API
  • perform data analysis (local and server-side)
  • display RGB composite images
  • control JS9 from the command line
  • print images

JS9 can change how we think about image display and analysis, moving beyond the Desktop into the Web. You can simply drag and drop a FITS image from your computer onto this JS9 display. All of basic JS9 functionality is immediately available: zoom, pan, colormaps, scaling, regions, WCS, analysis ...

You can extend JS9 using the plugin facility in combination with the JS9 Public API. For example, you can perform browser-based analysis on the displayed image. Click the Plugins tab, create a region, and move it around ...

In addition, data files loaded from the server support server-side analysis (using the original data files on the back-end server). Server-side analysis can be run, for example, in response to region changes, with the results displayed back in your browser. For the Cas-A X-ray image currently being displayed, click the Analysis tab, choose a task, create a region, and move it around ...

Energy Spectrum Counts in Regions Radial Profile
A quick introduction to JS9, regions, and server-side data analysis:
  • Press the mouse in the image and move around to change the contrast and bias (to bring out features).

  • Create one or more regions using the JS9 Region menu.
  • Pres the mouse inside a region and drag it to the desired location.
  • Resize or rotate the region by clicking to select it, and then moving one of the handles.
  • Temporarily 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 back-end 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.
  • As you move or resize, the task will run and results will be displayed here.
  • The region context menu has lots of region options.
  • These tasks also can be run from the JS9 Analysis menu.
See the Plugins tab for a demo of browser-based analysis.

JS9 plugins allow you to perform browser-based analysis: create a region and move it around ...

See the Local Analysis Tasks help page for info about plugins.

Release 1.2 adds support for the new pyjs9 Python interface via GET/POST support in the back-end Node.js server. Other improvements include support for blobs, typed arrays, and base64-encoded strings in JS9.Load() and JS9.RefreshImage(), and a few bug fixes.

JS9 works on Web browsers that support the HTML5 canvas element. It has been tested on the following browsers:

  • Firefox 18+
  • Chrome
  • Safari (including the iPad and iPhone 6)
  • IE9 (IE8 doesn't support the HTML5 canvas element)
JS9 is powered by the following technologies, to whom grateful acknowledgment is made:
  • emscripten for C-to-JavaScript (https://github.com/kripken/emscripten)
  • dynamic drive for light windows (http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm)
  • fabric.js for regions and other 2D graphics (http://fabricjs.com/)
  • flot for internal plotting (http://www.flotcharts.org/)
  • HTML5 for image display and most everything
  • jquery for programming ease (http://jquery.com/)
  • jquery.contextMenu for menus (http://medialize.github.io/jQuery-contextMenu/)

JS9 is distributed under the terms of The MIT License.

If you have questions or comments, please contact:
Eric Mandel, Harvard-Smithsonian Center for Astrophysics

The current stable JS9 source tar file is available below. By itself, the JS9 tar file will suffice to display FITS images via drag-and-drop and URL-based access, and to utilize browser-based plugins.

Also available below is the pyjs9 Python interface. The pyjs9 module supports the JS9 Public API and the short-cut command interfaces, utilizing urllib to communicate with the back-end Node server (which communicates with the browser itself).

If you want the JS9 demo pages to work at your site, you will need to download the JS9 data tar file.

If you want to configure a back-end helper (for server-side analysis and creation of png representation files), you will need to download the funtools tar file.

JS9 and pyjs9 also are available on GitHub, where their respective repositories contain the very latest bug fixes and enhancements (see the Help/JS9 Changelog for details):

We look forward to your pull requests ...

Development of JS9 at the Harvard-Smithsonian Center for Astrophysics is supported by Smithsonian Institution and the Chandra X-ray Science Center.

About |  Research |  Education & Outreach |  Facilities |  Opportunities |  Events |  Press Room |  Contacts |  Support CfA |  Privacy
     Harvard Logo Smithsonian Logo   HARVARD-SMITHSONIAN CENTER FOR ASTROPHYSICS  |   60 GARDEN STREET  |   CAMBRIDGE, MA 02138