astronomical image display everywhere
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
analysis-plugins improve support for handling large FITS files: Jul 6, 2017
analysis-wrappers changes related to Jupyter, including running the helper in a random … Jul 5, 2018
astroem JS9.Load: don't do global image section when section dims are specifi… Aug 17, 2018
casa add test for x11 color (wheat2) in regions Jun 26, 2018
closure-compiler rename compiler directory to closure-compiler Oct 25, 2016
css avoid bogus selection when menu is repositioned Feb 23, 2018
font add font directory Jul 13, 2016
help doc update Sep 21, 2018
images add toolbar plugin and associated api Feb 8, 2018
js JS9.Load: don't do global image section when section dims are specifi… Aug 17, 2018
js9.app/Contents improved icon for js9 Desktop app May 3, 2017
js9Tests update counts test after 1-pixel bug fix Jan 12, 2016
js9debugextras first commit Sep 30, 2014
node_modules update socket.io to v2.1.1 Jul 23, 2018
params aesthetic improvements: Mar 23, 2018
plugins sync: handle target images with crota angle #3 Sep 16, 2018
threeways tweak demos Mar 20, 2018
util @emmt fixed a potential bug (originally in xpa) if macro ABS is used … Jul 13, 2016
.eslintrc.js allow ecma version 6 syntax Nov 17, 2016
.gitignore improvements related to binning: Mar 4, 2018
APICHANGES first commit Oct 28, 2014
LICENSE update year Jan 21, 2016
Makefile.in add support for synchronizing images: Sep 12, 2018
README.md new zenodo DOI for current release May 10, 2018
acknowledge.html change js9 web site references to https Sep 20, 2017
astroem.js JS9.Load: don't do global image section when section dims are specifi… Aug 17, 2018
astroemw.js JS9.Load: don't do global image section when section dims are specifi… Aug 17, 2018
astroemw.wasm JS9.Load: don't do global image section when section dims are specifi… Aug 17, 2018
cimtest.c update cimtest to current jsfitsio API Jan 12, 2018
config.guess first commit Sep 30, 2014
config.sub first commit Sep 30, 2014
configure add platform-based location to look for libs Jul 5, 2018
configure.ac add platform-based location to look for libs Jul 5, 2018
favicon.ico first commit Sep 30, 2014
fits2png remove confusing funtools switch May 24, 2016
fitsy.js clean up npm, add missing Makefiles Aug 5, 2016
fitsy.min.js correct bitpix in table hdu, correct data type for int params Dec 2, 2014
funcnts2flot improve label for radial profile, energy plot Aug 19, 2016
funhist2flot analysis improvements: Aug 26, 2016
index.html update demo pages Sep 12, 2018
install-sh first commit Sep 30, 2014
js9-allinone.css add support for synchronizing images: Sep 12, 2018
js9-allinone.js getloadstatus: allow image handle to be passed Sep 19, 2018
js9.css add support for synchronizing images: Sep 12, 2018
js9.html add missing load of js9prefs.js Feb 1, 2018
js9.in Add support for building mosaics: May 24, 2018
js9.js getloadstatus: allow image handle to be passed Sep 19, 2018
js9.min.js getloadstatus: allow image handle to be passed Sep 19, 2018
js9.scpt create a js9.app for Mac Desktops May 2, 2017
js9Electron.js desktop app (using Electron.js): Jul 23, 2018
js9ElectronPreload.js improve helper support in Electron-based app Aug 22, 2017
js9Helper-default.cgi fix bug in CGI-based imsection support Jan 30, 2018
js9Helper.js add globalOpts.requireFits2Fits for fits2fits error handling Aug 12, 2018
js9Msg.js change file permissions Sep 9, 2017
js9PostMessage.js improve postMessage support Aug 6, 2016
js9Prefs-default.json change fits2fits default to 'never' to avoid suprising users Feb 5, 2018
js9Prefs-sao.json turn loadProxy on by default (for Desktop use) May 2, 2017
js9Prefs.json turn loadProxy on by default (for Desktop use) May 2, 2017
js9Readme.png rewrite README, add image Feb 9, 2017
js9Regions.js improve ds9 dashlist handler in region import Feb 4, 2017
js9Test.html no fits2png for js9Tests May 26, 2015
js9Test.js update copyright Nov 17, 2016
js9_center.html load js9.min.js instead of js9.js Oct 24, 2016
js9_center_top.html load js9.min.js instead of js9.js Oct 24, 2016
js9allinone.html update demo pages Sep 12, 2018
js9analysis.html update demo pages Sep 12, 2018
js9archive.html first commit Sep 30, 2014
js9basics.html update demo pages Sep 12, 2018
js9bespoke.html update demo pages Sep 12, 2018
js9bitpix.html update demo pages Sep 12, 2018
js9blend.html update demo pages Sep 12, 2018
js9cat.html update demo pages Sep 12, 2018
js9cookie.html update demo pages Sep 12, 2018
js9create.html update demo pages Sep 12, 2018
js9debug.html update demo pages Sep 12, 2018
js9fitsy.html update demo pages Sep 12, 2018
js9helper.c fix bugs when binning by averaging pixels Jul 15, 2018
js9helper.h Add support for building mosaics: May 24, 2018
js9helper.pc.in first commit Sep 30, 2014
js9iframe.html change js9 web site references to https Sep 20, 2017
js9imexam.html update demo pages Sep 12, 2018
js9large.html update demo pages Sep 12, 2018
js9load add support for --id switch Nov 26, 2017
js9menustyles.html update demo pages Sep 12, 2018
js9mosaic Add support for building mosaics: May 24, 2018
js9multi.html update demo pages Sep 12, 2018
js9onchange.html update demo pages Sep 12, 2018
js9panzoom.html update demo pages Sep 12, 2018
js9plugins.html update demo pages Sep 12, 2018
js9plugins.js sync: handle target images with crota angle #3 Sep 16, 2018
js9pngvsfits.html update demo pages Sep 12, 2018
js9prefs-default.js change fits2fits default to 'never' to avoid suprising users Feb 5, 2018
js9prefs-sao.js turn loadProxy on by default (for Desktop use) May 2, 2017
js9prefs.js more Jupyter/CORS defensive checks Jul 4, 2018
js9preload.html update demo pages Sep 12, 2018
js9refresh.html update demo pages Sep 12, 2018
js9rgb.html update demo pages Sep 12, 2018
js9sizes.html update demo pages Sep 12, 2018
js9super.html update demo pages Sep 12, 2018
js9support.css add Scale Clipping Limits plugin Aug 24, 2018
js9support.js fabric.js contrainScale() now checks for NaN Apr 23, 2018
js9support.min.js fabric.js contrainScale() now checks for NaN Apr 23, 2018
js9support.txt add support for synchronizing images: Sep 12, 2018
js9sync.html improve demo load on slower networks Sep 17, 2018
js9usermenus.js add support for user-defined menus: Jul 20, 2018
js9worker.js add support for uploading FITS files to a remote server Apr 12, 2017
minify rename compiler directory to closure-compiler Oct 25, 2016
mkallinone fix allinone (don't use wasm) Dec 11, 2017
mkhelper update (hopefully little-used) CGI support: Aug 15, 2017
mkinline inline oft-used js9 images to speed up page load Apr 5, 2018
mkjs9 give stronger encouragement to codesign Electron.app Aug 3, 2017
mkjs9app add Electron.js support for Desktop JS9 Nov 19, 2016
mkpng add script to generate test png files May 1, 2015
nnode pass command line args to node Jul 12, 2018
package-lock.json update socket.io to v2.1.1 Jul 23, 2018
package.json update socket.io to v2.1.1 Jul 23, 2018
pngdisp.c first commit Sep 30, 2014
saoconfig fix bug in CGI-based imsection support Jan 30, 2018
saoprefs.sed default for loadProxy should be false (but true for SAO install) Apr 16, 2017
tpos.c add binMode option to sum or average pixels when binning an image: Jul 11, 2018

README.md

DOI

JS9: astronomical image display everywhere

JS9

What does it do?

  • display FITS images, binary tables, data cubes, and multi-extension files
  • colormaps, scaling, pan, zoom, binning, blending, print, export ...
  • region support: create, manipulate, import, export, ...
  • drag and drop images, regions, catalogs
  • server-side and local analysis using the JS9 public API
  • control JS9 using scripts from the Linux shell or Python
  • runs on Macs, Linux, Windows, iPads, iPhones, ...
  • runs as a Desktop app, in all modern browsers, mobile apps are coming ...
  • utilizes WebAssembly, if present (FITS processing at near native speed!)

How can I try it out?

Go to JS9 web site and drag a FITS data file onto the JS9 display:

https://js9.si.edu

The JS9 web site also contains on-line documentation, demos, and release downloads.

To install or not to install ...

For many users, there is no need to install: simply use the JS9 web site to display your data. You can even upload your FITS files to the web site and run our server-side analysis.

Installing JS9 allows you to create your own web pages, tailor site parameters, and add your own local and server analysis tasks. Grab the latest version from JS9 on GitHub:

git clone https://github.com/ericmandel/js9

Load a local page into your browser:

file:///path/to/js9/js9.html

(NB: Chrome needs to run with the --allow-file-access-from-files switch to use the file URI.)

For Desktop use, install Electron.js and generate js9 script:

./mkjs9 -q

Use the js9 script to start the Desktop app and load an image:

js9 -a ~/data/m13.fits

For more advanced support (web-based support, support for handling large files), build the JS9 helper and install JS9 in a web directory:

# configure location to install the JS9 web files,
# where to find cfitsio library and include files,
# where to install programs and scripts,
# what sort of helper to build:
./configure --with-webdir=[path_to_web_install] \
            --with-cfitsio=[path_to_cfitsio]    \
            --prefix=[path_to_prog_install]     \
            --with-helper=nodejs

# the usual ...
make
make install

# start helper
cd path_to_web_install
# in the bash shell:
node js9Helper.js 1>~/logs/js9node.log 2>&1 &
# or, in the tcsh shell:
node js9Helper.js >& ~/logs/js9node.log &

What about scripting?

The js9 script allows you to control a JS9 web page from the Linux command line using the JS9 Public API (scripting requires installation of JS9 and either node.js or Electron.js):

js9 Load chandra.fits '{"scale":"log","colormap":"red","contrast":5.78,"bias":0.15}'
js9 Load spitzer.fits '{"scale":"log","colormap":"blue","contrast":6.3,"bias":0.54}'
js9 ReprojectData chandra.fits

Python users can install pyjs9:

git clone https://github.com/ericmandel/pyjs9
...
import pyjs9
j = pyjs9.JS9()
j.Load('chandra.fits', '{"scale":"log","colormap":"red","contrast":5.78,"bias":0.15}')
j.Load('spitzer.fits', '{"scale":"log","colormap":"blue","contrast":6.3,"bias":0.54}')
j.ReprojectData('chandra.fits')

What's the license?

JS9 is distributed under the terms of The MIT License.

Who's responsible?

Eric Mandel, Alexey Vikhlinin

Harvard-Smithsonian Center for Astrophysics