JS9 Large: dealing with large FITS files
JS9 deals with large files through the fits2fits mechanism and use of representation files. A brief explanation of is given below. See Dealing with Large Files for more details.
Always use fits2fits to
make a rep file:
Never use fits2fits,
original file in memory:
fits2fits based on size,
rep file if size > 100Mb:
Large astronomical FITS data files present a challenge for browser-based image display in two ways:
  • downloading large files can take a long time, even on the fastest connections
  • browsers enforce hard (usually per-tab) memory limits.

JS9 deals with large files through the fits2fits mechanism and use of small representation files. You first need to configure a Node.js-based Server-side Helper. Then set the following global parameter in your js9Prefs.json file:

  • globalOpts.fits2fits # when/how to generate FITS representation files
This property controls whether a FITS representation file is automatically generated. It accepts the following values:
  • always: always generate a FITS representation file
  • never: never generate a FITS representation file
  • size>N: generate a representation file is this file's size is greater than N Mb
The current default for fits2fits is "never".

Once fit2fits is configured, JS9 will ask the JS9 helper to check the fits2fits rule when loading a FITS URL. If the check returns false, the FITS file will be loaded internally into JS9. If true, the JS9 helper will extract a representation image (section) from the parent file, store it in the temporary work directory, and then tell JS9 to display the representation file.

The smaller in-memory representation file will be used when performing browser-based analysis such as WCS reprojection, 3D plots, and imexam. But the representation file knows its parent, and will send the parent filename to server-side analysis tasks. Thus JS9 performs quick-look analysis on the smaller file and more detailed server-side analysis on the original parent file.

In this context, perhaps the most important server-side task is the Bin/Filter/Section plugin available in the View menu. This plugin allows you to extract sections from FITS binary tables and images, with options to choose the image center, image dimensions, and bin factor. (For tables, the plugin also allows you to filter rows of the table by means of arithmetic and boolean operations on the table columns.)

JS9 Demos: