spacer link to MAST page spacer logo image spacer
 
link to STScI page


Configuring Your Browser for HST Previews

This page is undergoing some (re)construction. Thanks for your patience.


Some of the pages on this server offer data in various format, such as previews of Archival HST observations, or images from the Digitized Sky Survey. These FITS images are delivered with a MIME type of image/x-fits. If you want to see these images as they are downloaded, you will need to configure your browser to deal with this MIME type appropriately.

Note This page describes how to configure a browser under Unix (Netscape or Mosaic) for previewing FITS images with SAOimage. Other types of browsers, or browsers on other platforms, may have their own procedures. Check your browser's documentation.

Also, Netscape 3 can be configured for various MIME types by selecting `General Preferences' from the `Options' menu and then selecting `Helpers'.


FITS Images

Your Mailcap file (~/.mailcap on Unix) controls which viewers to use for given MIME types. For example, the following line in your mailcap file will bring up FITS images in SAOimage:

    #
    #       FITS images
    #
    image/x-fits;       saoimage -quiet -imtool -fits %s

(This assumes that saoimage is on your default path. If not, then simply replace saoimage with its full pathname. Lines starting with a hash mark, #, are comments and may be omitted.)

You can use other kinds of FITS viewers as well. If you don't have a FITS viewer, you can select the images in GIF format. (For HST Preview images in GIF format, see the note about pixel correction.)

For HST Preview images, there is also an option to get the file in h-compressed FITS format. In this case, the MIME type will be image/x-fits-h. You can download the H-compress software from STScI and write a script to decompress the file when you receive it and display the image. Here's an example, using the Unix C-shell (you will probably need to replace some of the command names with their full pathnames, if they're not on your path):

  #!/bin/csh
  set newname=$1.fits
  cat $1 | hdecomp -o fits > $newname
  saoimage -imtool -quiet -fits $newname >& /dev/null
  rm $newname
I have such a script called hpreview in my ~/bin directory. I also have the following entry in my mailcap file:
  image/x-fits-h;/home/kimball/bin/hpreview %s
Then, when I select h-compressed FITS as the delivery format for a preview image, the file is sent to my workstation in H-compressed format, and is passed to the script, which decompresses the file into a new filename (in the /tmp directory, on my system) and displays it in SAOimage.

I've found this to be the fastest way to get preview images in FITS format: Preview images are stored in the database in h-compressed format, so all that the server has to do is pull them from the database and deliver them, without doing any decompression; and h-compressed WFPC2 preview images are typically about a tenth the size of their uncompressed versions (which are about 1.2 megabytes), so network transfer time is much quicker. Your mileage may vary, depending on your network transfer rate and how fast your machine can run hdecomp.


HST Preview Spectra

Preview spectra are currently available in a number of formats:
  • ACE/gr Input
  • XY-list
  • FITS binary table
PostScript and GIF formats are in the works.

ACE/gr
ACE/gr is Paul Turner's free plotting program for X/Motif. It allows you to view the spectrum and do some transformations on it. We distribute it with the StarView software, so we include it as an option for spectra.

The MIME-type for ACE/gr files delivered by this server is application/acegr. Your mailcap entry should be:

    #
    # ACE/gr input files (HST preview spectra)
    #
    application/acegr; xmgr %s

XY-list
XY-list is simply a plain-text list of the Flux vs Wavelength values in the spectrum. It's delivered with a MIME-type of application/octet-stream. This is a special type defined in the MIME standard as a catch-all type. The action recommended by the standard for application/octet-stream is for the browser to save this file to disk. (We may change this MIME type to something else in the future, to accommodate those who might want to feed this list to their own plotting applications.)

FITS binary table
HST Preview spectra can be delivered as FITS binary tables with 3 columns: Wavelength, Flux, and Flux Error. In this case, the MIME type will be application/x-fits-tbl. This doesn't really conform to MIME standards, since x-fits-tbl is a format, not an application, so this MIME type may change as well.