./configure --with-webdir=[path] where path specifies the location to install the JS9 web files
The current JS9 source tar file is available at:
http://js9.si.eduThe source tar file will unpack into a js9-[version] directory with the usual tar command, e.g:
tar xfz js9-[version].tar.gzYou also can clone JS9 from GitHub:
https://github.com/ericmandel/js9
file:///Users/me/js9-[version]/js9basics.htmlto see the basic JS9 demo page. You then can drag any FITS image file onto the JS9 display and view it, change contrast/bias, colormaps, scale, create regions, etc. Furthermore, if you load the imexam web page:
file:///Users/me/js9-[version]/js9imexam.htmlyou can move a region around and run browser-based analysis as the region changes.
NB: The file://URI does not work in Google Chrome: Chrome doesn't permit a local HTML file to read other local files. The workaround is to start Chrome with the --allow-file-access-from-files switch:
# Linux: chrome --allow-file-access-from-files # Mac: open /Applications/Google\ Chrome.app --args --allow-file-access-from-filesFirefox and Safari do not have this restriction.
If you just want to run JS9 in this simple way, you are done. However, you might want to edit the js9Prefs.json file to set up default values for colormaps, scaling, etc. See: JS9 Site Preferences for a description of the available parameters.
JS9 supports server-side ("back-end") analysis on FITS data using a server-side helper. This capability allows you to execute virtually any command-line analysis program from JS9. The analysis command is run on the back-end server and results viewed on your web page. You can utilize your own web server as the JS9 back-end helper using CGI calls, or you can run a separate Node.js-based server to process JS9 back-end requests. The server-side analysis capability is especially useful for archive centers, but also can be attractive to individual users who want to integrate their own data analysis programs into JS9.
In addition, JS9 supports communication with external processes via the js9 script. This capability requires the configuration of a Node.js-based server-side helper.
You configure a JS9 back-end helper by adding additional switches to the configure command. See: Installing a Server-side Helper for details.
./configure [your JS9 switches]
and then build the JS9 system using the make command:
make
When JS9 is loaded into your browser, it reads a file called js9Prefs.json from the JS9 web directory. This file contains various default settings for JS9, e.g. default colormap and scale for image display. Feel free to edit this file to set up your own site-specific parameters. See JS9 Site Preferences for a description of the available parameters.
When the build is completed, you can install the JS9 into your web tree:
make install
and then clean up the build directory using the command:
make clean
If you want to display our test data files in the JS9 demo pages, you must retrieve the JS9 data file tar file from the JS9 web site:
http://js9.si.eduand untar it into the JS9 web install directory. This will create sub-directories containing the image data. These data files also are available on GitHub:
https://github.com/ericmandel/js9data