These pages document the Java code for a FITS browser/editor, including a package for working with FITS data, which can be used for other applications.

See:
          Description

Packages
eap.applet  
eap.filter  
eap.fits A 100% Java interface to FITS data files.
eap.fitsbrowser A 100% Java FITS browser which can be run as an applet or application.

 

These pages document the Java code for a FITS browser/editor, including a package for working with FITS data, which can be used for other applications. The browser may be run standalone or as an applet. The standalone version alows you to save edited FITS files to disk.

To start the application, run "java -jar fits[version].jar". The main class is Browser, so you may also run "java -classpath fits[version].jar eap.fitsbrowser.Browser". In either case you can give the name of a FITS file to open on the command line. On a windows machine you may double click on the icon for the jar file.

The applet version of the browser can only display the contents of a single file. You specify the URL for the file using the "FILE" parameter. Note that the default applet security restrictions will only allow you to display a file which is on the same server as the applet. The main class for the applet is BrowserApplet. Here is an example of a complete applet tag:

<applet archive="fits1.3.jar"
           code="eap.fitsbrowser.BrowserApplet.class"
           width=700
           height=600>
<param name="FILE" value="sample.fits">
Your browser is ignoring the applet tag.
</applet>

The browser is able to read gzip compressed files by using the eap.filter package, which is not documented here. If you include the jar file for the optional eap.crypto package, then the applet can also read some PGP encrypted data as well. Specifically, it can decrypt files encrypted with the following PGP command options:
pgp -c +COMPRESS=off +CIPHERNUM=2 +BATCHMODE +VERBOSE=0

There are three ways to specify the encryption key.

  1. Use the "PASSWORD" applet parameter to give the key explicitly. This can be useful if you want to store the password in a cookie. Hard-coding the password into the HTML page is of course not secure.
  2. If you use no applet parameters to specify the key, then the applet will prompt the user for the key if necessary. The user will have to re-enter the key every time the applet starts.
  3. If you have several files encrypted with the same key, then you may use the "DATASET" applet parameter to specify a unique name for the dataset to which these files belong. Then when the user enters a key, the applet will save the key in the Java applet persistence memory store. The applet will not reprompt for the key for other files in the same dataset. Note that this works for different instances of the applet on different web pages. These passwords are forgotten when the broswer exits.

Version:
1.3 2004-08-24
Author:
Edward A. Pier eap@milkyway.gsfc.nasa.gov