Profile

Profile draws a simple line graph of a one-dimensional piece (line segment) of a data set. That line segment is drawn with the mouse on top of Image, Average, Combine, or Compare.

The distance in pixels is displayed using a simple application of Pythagoras' Theorem to the endpoints of the line segment drawn.

If the line segment is drawn on data that has some georeferencing information, either explicitly or implied, then a distance calculation is carried out. Explicit georeferencing information is supplied in a few ways.  HDF-EOS swath, grid, or point data all have georeferencing information, as do other file formats with projection information such as PDS and FITS data. Implied georeferencing information, for example, would be assumed for a regularly gridded, linear scale image where the names of the axes are 'Longitude' and 'Latitude'. In the case of implied georeferencing information, unless the file from which the data is read provides either a scale factor ( e.g. km/pixel ) or a radius ( e.g. radius of Mars ) or both then it is assumed that the data is earth based and the calculation is carried out using the radius of the earth.

If only a scale factor is supplied, the calculation is simply the scale factor multiplied by the distance in pixels calculated for the line segment drawn.

If a radius is supplied, then a great circle distance calculation is carried out using Sinnott's formula. Given two points P1 (lat1, lon1) and P2 (lat2, lon2 ) then:

dlon = lon2 - lon1
dlat = lat2 - lat1
a = sin^2(dlat/2) + cos(lat1) cos(lat2) sin^2(dlon/2)
c = 2 arcsin(sqrt(a))
d = R c

The intermediate result c is the great circle distance in radians. R is the radius of the sphere, and d is the distance in units of the radius.

Please note that a more accurate approximation of the shape of Earth and Mars is an oblate spheroid, as opposed to the sphere assumed. For small distances, the error is neglible.

Controls

Buttons
Save will produce a text file called profile.txt with information about the data in the plot.
Menus
The menu allows one to choose one of two interpolation schemes. "Perfect Line" has the program interpolate between data values using bilinear interpolation; points are equally spaced along the line and are exactly on it. "Nearest Pixel" uses only exact data points in the dataset and picks those nearest the line as it moves along.

The menu also allows the choice of the meaning of the horizontal scale in Profile. The default is 0-1, that is, the first picked end of the profile line is zero, and the last picked end is one. One may choose instead to use the horizontal or vertical scales of the original dataset. Or both.

Applications to Connect to This Application

Image, Average, Combine, or Compare may be connected via the "drag 'n drop" button to this application.

Applications to Connect This Application to

None.

Tricks and Gotchas

Save will overwrite any profile.txt file in the current directory (from where you started webwinds), so be careful to save any data you really need elsewhere.
WebWinds Home / Oct 30, 2001