FITSMap : Latitude/longitude projection mapping for FITS Files
Sky Coyote, 27 Feb 2007

FITSMap is a Macintosh OS X program for transforming a disk image of a planet into a rectangular latitude/longitude map by way of a simple cylindrical projection. Other projection methods may be part of later releases of the program. FITSMap requires a G4, G5, or Intel Macintosh computer running OS X 10.3.9, 10.4.8, or greater. FITSMap is free for all non-commercial users.

To download FITSMap, click here:

NEW: FITSMap/FITSFlow update 28 Mar 07: Mercator projection mapping and flow compensation.

(Click for larger image)

FITSMap settings and controls consist of the following fields and buttons:

          File: The input disk image to use. Click the button to browse.
            CX: Center of the disk.
            CY: Center of the disk.
           Day: The day of the month in July 2004 (+ fractional part of a day).
                The day is used to calculate disk radius, observer lat and lon, 
                and north polar angle.
           Rad: Radius of the disk.  Check the box to override the day calculation
                and use this value instead.
       Obs lat: Latitude of the center of the disk.  Check the box to override 
                the day calculation and use this value instead.
       Obs lon: Longitude of the center of the disk.  Check the box to override 
                the day calculation and use this value instead.
        NP ang: Angle of the disk north pole, CCW from top.  Check the box to 
                override the day calculation and use this value instead.
        Map NX: Number of points in the map.
        Map NY: Number of points in the map.
         Rebin: Oversampling to perform while making the map = {rebin * nx, rebin * ny}.
                See discussion below.
       Lat min: Starting latitude for the map.
       Lat max: Ending latitude for the map.
       Lon min: Starting longitude for the map.
       Lon max: Ending longitude for the map.
         Scale: Image display scale mode.
           Max: Manual maximum.
           Min: Manual minimum.
   Flip Y axis: Flip map vertically.
Negative image: Negate all map values, exchange and negate manual scales.
          Size: Fixed size (map nx * map ny) or fit to plot window.
      Make Map: Make a new map using the above settings.
      Save Map: Save the current map as a FITS file.

The settings from 'file' to 'lon max' only take effect when you click 'make map'. The image display settings take effect immediately. Maps are saved as FITS files at the fixed size, with no rescaling, although both flipping and negating are applied, if checked.

FITSMap turns this:

into this:

You can constrain the output by setting the 'lat min', 'lat max', 'lon min', and 'lon max' fields, and changing 'nx' and 'ny'. Click 'make map' to make a new map.

The resulting map only displays the desired latitude and longitude ranges.

I have replaced Eliot's nearest-neighbor selection with a weighted mix of the 4 nearest pixels in the disk for non-integer coordinates. This significantly improves the quadrilateral artifacts that are present without the mixing.

On the other hand, rebinning (oversampling and then down-averaging) the map seems to have no effect on the result, although it does take much longer and burn more memory. You should therefore leave the 'rebin' setting at 1, and I will replace it with something else in the next version.

Overriding the radius calculation has the expected effect. The value calculated from the day is 168.27.

Overriding the north polar angle also has an effect. The value calculated from the day is 351.996.

Overriding the observer latitude has an effect. I'm not sure if this is correct, but it does appear to place the center of the disk at the new latitude. The value calculated from the day is 3.78892.

Overriding the observer longitude appears to place the center of the disk at the new longitude. The value calculated from the day is 20.6765.

You can use FITSMap with composite and enhanced images as well. Here I'm using FITSRegister to get the disk center and radius of a composite made from 10 aligned and processed images.

Here is the resulting map:

Note that you can negate a map (black to white and vice versa). We'll have to see what effect that has on making vector fields. Anyone want to bet that a field and its negative counterpart are the same/different?

At present FITSMap is just a prototype. The main purpose of this website is to get feedback about what to do in the next version.

By the way, I'm also working on a program that makes the composite images shown above, called FITSComposite. It allows you to load a set of raw images, performs all preprocessing, allows you to adjust the alignment, and then creates, enhances, interpolates, and masks a composite.

Currently many of my Unix programs use a common database file to hold alignment and other information about each image. I can envision a situation where it might be nice to have FITSRegister, FITSComposite, FITSMap, FITSFlow, and other programs, all automatically share this database, as well as intermediate images via files or piped data, so that they all work together in concert.

Please send bug reports, comments, corrections, wish-lists, etc..., to
İSky Coyote 2007