LocMOC 1.4

User's Manual

;
; Ross Beyer			PIRL, LPL
; rbeyer@lpl.arizona.edu	December 1998
;

LocMOC is a software package that helps the user navigate 
MOC (Mars Orbital Camera) images.  The name LocMOC is a 
contraction that stands for 'Location of MOC images.' 
This manual is organized the same way that the program
is, in that the major sections of this manual correspond 
to the main windows of the LocMOC program.  If you have 
any questions or comments please let me know.


Setting up LocMOC (for system administrators)

	This section is to aid the system administrator 
in setting up LocMOC on your UNIX computer system.  To 
properly set up LocMOC you should read the readme file.
To run LocMOC you will need IDL version 5.1 or later and the
FETCH_FIELDS Dynamic Load Module (DLM).  Additionally to 
really get the most out of LocMOC you will also need 
a program called Mapmaker (created by the USGS) on your
system. Depending on where you place 
the LocMOC program files, you will need to change a line
in 'locmoc.pro'.  There are some lines that read:

 1: datafile = '/opt/rsi/local/locmoc/MOC111998.dat'
 2: datafile = '/opt/rsi/local/locmoc/MGSC_table'
 3: datafile = '/opt/rsi/local/locmoc/cal-m3.table'
 4: BEGIN
     datafile = '/opt/rsi/local/locmoc/MGSC_table' 
     datafile2= '/opt/rsi/local/locmoc/cal-m3.table'


These lines must be changed to point to the directory where
you have placed the LocMOC program files, and more specifically,
where the data files with the ASCII text version of the MSSS
spreadsheet and the concatenated data file from the PDS-released
CDs is located.

There is also a line that reads
 pdspath = '/jukebox/mgs/'

that must be placed to reflect where you have located the PDS
CDs, so that LocMOC can call up the `.img' images with XV
when asked.  If you do not have XV or the PDS data in a single
location, you can disable this option by setting pdspath = ''.

Additionally, when LocMOC calls Mapmaker, it does so with 
this line:

	SPAWN, 'mapmaker mmengine -cslf filename'

This is equivalent to typing 'mapmaker mmengine -cslf filename'
at your command line prompt, where filename is the name of the
mapmaker command file that you have created.  Normally typing
'mapmaker' at a prompt causes a whole new window to be created
and then Mapmaker sits there and waits for user-entered commands.
Here at PIRL we have written a Mapmaker script that is included
with the LocMOC distribution that allows Mapmaker to run without
opening up another window but will accept the above command line
input.  Either the system administrator must make this script
publically available for all of his users, or LocMOC users must
include it in their .cshrc file.

LOCMOC WILL NOT WORK PROPERLY WITHOUT THIS SCRIPT BEING PRESENT




Running LocMOC

	To run LocMOC, begin IDL on your system (generally
by typing 'idl' at the prompt).  Be sure that you are
using IDL 5.1 or later.  At the IDL prompt, type 'locmoc'.
This will begin the program.

You have a choice of where LocMOC gets its information.
You can either use the preliminary database provided by
MSSS, or you can use the database provided with the PDS 
released images.  The data are each in slightly different
formats, and so to change between these two, you must 
completely quit LocMOC and start it over in the other 
mode (however, footprint data files are interchangeable
between the two modes).



LocMOC Main Panel

	This is the first window that will come up.  One of
LocMOC's main duties is to bring up a map of the surface of
Mars (generated from Viking MDIMs) and paint marks on that
map with the location of the MOC narrow angle images.  Most
of the buttons in this window have to do with that task.

Text Entry Fields
	These fields allow the user to specify the boundaries
of the MDIM map that LocMOC will bring up, as well as 
determine the Resolution of that map.  Please note that 
the range of latitudes is -90 to +90 degrees, and the
range of longitudes is -360 to 360 degrees.  The coordinate
system is areocentric with a west positive longitude convention.
Also, for LocMOC to know that you have entered a value in 
a text field, you must hit return in that field.  There
is also a button that allows you to switch between Simple
Cylindrical and Orthographic projections of the MDIM map
that LocMOC will create.  For most applications, the Simple
Cylindrical is best.  Note that whichever map projection that 
you choose will be applied to all the maps that you create with
LocMOC.

Select Coords by Image Number
	In case you have a particular MOC image in mind,
but don't have your notes handy this button will bring up
a window that will allow you to enter an image number and
will return the latitude and longitude of that image 
number. You can then go back to the LocMOC Main
Panel and enter map boundaries in the Text Entry Fields
that are around your image number of interest.

I/O Options
 Mask Options
	In the case that you only want to display a subset
	of the image numbers that LocMOC has available to it
	you can load in a mask that will allow you to 'mask
	out' image numbers that you do not want displayed.
        Alternately, you can also read in a mask of image
        numbers to highlight in a different color. 
        For more information on LocMOC masks, please see
        the file:
maskinfo.txt
        which should be included with the LocMOC program files.
 Read in alternate data file
        If there has been a new spreadsheet released from
        MSSS or another PDS database has been released that 
        you want to use and your system administrator
        hasn't gotten around to putting it in as the default
        data file, you can read in that data file yourself.
        This button brings up a window that allows you to
        read in an alternate data file (or read back in the
        default if you would like to restore it after using 
        an alternate data file).  For more information on
        LocMOC data file formats, please see the file:

datafilefmt.txt

 Read in Footprint information
	If you have previously written out Footprint Information
	with the 'Write out Footprint information' button 
	that you would like to read back into LocMOC, this
	button will bring up a window that will allow you
	to enter a file name or allow you to clear out 
	Footprint information that you have previously read
	in with this function.
 Write out Footprint information
	If you have brought up a footprint (or footprints)
	of a MOC image and moved them around or re-oriented
	them then you will want to save your work.  Before
	you quit LocMOC use this button to bring up a window
	that allows you to write out your modifications to 
	a file.  This function will write out the image number,
	longitude, latitude, and the longitudes and latitudes of the
	four corners of the footprint (in this order: Upper Left, 
	Upper Right, Lower Left, and Lower Right) that
	you have changed for each image that you have altered
	during your session.  It will also write out the 
	information for any image numbers that you read in with
	'Read in Footprint information', even if you have not
	altered them in this session.  This allows you to read
	in your previous work when you begin a session, make
	changes to the footprints that you want, and then 
	write out a file with all of your previous work and
	the alterations from this session.

Make the Map
	This button takes the information in the 'Text Entry
Fields' and uses it to call Mapmaker to create a map from
Viking MDIMs of the desired specifications.  Warning: if 
you do not have Mapmaker on your system, use 'Make a
Map without Mapmaker', otherwise pushing this button
will cause the program to hang or crash.  Also, when
IDL reads in the map that Mapmaker has created and 
projects it into an IDL data space, IDL requires a
rather intensive amount of CPU time, so I would suggest
running LocMOC on a Sparc 20 or faster machine (although
you will still be waiting a while on a Sparc 20).  When
it is done loading, it will produce the 'Location of MOC 
Images' window.  For more information on that window, 
please see below.

Make a Map without Mapmaker
	This button takes the information in the Text Entry
Fields' and uses it to create a lat/lon grid and will 
paint MOC markers on it.  It is identical to 'Make the
Map' but does so without calling Mapmaker.  This button
will bring up the 'Location of MOC Images'
window. For more information on that window, please see
below.

Footprint Image
	This button brings up the 'Generating a Footprint'
window please see below.

MOLA Track
	This button takes the information in the 'Text Entry
Fields' and uses it to call Mapmaker to create a map from
Viking MDIMs of the desired specifications.  It asks for a file
that has been output by the MOLA software PEDR2TAB, which contains
ASCII data tables with the MOLA data.  It then creates the 
'Track of MOLA Data' window, for more information, see below.

Exit
	This button tidies up the temporary files that
Mapmaker has created and exits out of LocMOC.


Location of MOC Images

	This window contains the MDIM map whose dimensions
were specified by the user in the 'LocMOC Main Panel' window.
On that map are painted marks representing the locations of
MOC images within its boundaries, with their image numbers 
written off to the side.  Clicking on an image mark will bring 
up a window with more detailed information about that image
number. Additionally you are given the option to create a footprint
or have XV run and grab the PDS `.img' file from the jukebox.
If you choose to do so, you will bring up the 'Generating a 
Footprint' window (please see below).  If there is a high
density of images in an area and LocMOC can't tell which one
you want, it will list all of the images that are near
where you clicked.

Latitude & Longitude
	These labels will display the current latitude and
longitude coordinates of the cursor. 

Checkboxes
	These four (or three if you Made a Map without Mapmaker)
checkboxes: Viking Map, Marks, Labels, and Footprints, allow you to 
'turn off' and 'turn on' the display of these items on the map.
For example, unchecking the 'Labels' box, and then hitting
'REDRAW' will cause LocMOC to redraw its map window.  In that
window there will be the MDIM map, and marks for the images,
but there will be no labels on those marks.

Display Options
	This pull-down menu controls the details of the
display.  It should be relatively self-explanatory.  You
must hit 'REDRAW' for your changes to take effect.

Sort Menu
	This pop-up menu controls which MOC images get displayed
on the display.  There are a lot of images, so this allows you
to display (or not display) images by mission phase.  You must
hit 'REDRAW' in the Location of MOC Images window for your
changes to take effect.

REDRAW
	This button will re-draw the map window, taking into
account changes that you have made in the Checkboxes or in the
Display Options.

Write Data
        This will bring up a window that will allow you to write
out the data in the map window in one of three ways.  You can
either write out the image in the map window to a GIF file
(by hitting 'Write GIF'), a TIFF file (by hitting 'Write TIFF'),
or you can write out a list of the ID numbers, latitudes, and 
longitudes of all of the MOC images that are on the map to an 
ASCII file (by hitting 'Write List').


Done
	This button will close out the 'Location of MOC Images'
window, clean up the Mapmaker files associated with that
MDIM map, and return you to the 'LocMOC Main Panel'.



Generating a Footprint

Depending on how you got to this window there may or may not be
an image number already specified.  If not, then you must enter
an image number.  If you have a MOLA track that can be overlaid
on or near the MOC image of interest, you can enter in the '.tab'
file created by the MOLA software PEDR2TAB with the MOLA information
and that track will be plotted as well as the MOC footprint.
Details of the window that appears are below under 'Footprint and Track.'
There are Text Entry Fields in this window
that are similar to those in the 'LocMOC Main Panel'.  However,
these fields are optional.  If the user does not specify 
them, LocMOC will create an image that is 2 degrees wide and
3 degrees tall with a resolution of 72 dpi (ideal for printing).
The user can specify one or all of the values.  If you do not
hit enter in a particular field, then the default will be used
for that field(e.g. you could specify the left longitude and
the resolution, and LocMOC would give the right longitude as
1 degree to the right of the center longitude of the image
and the maximum and minimum latitudes as +1.5 degrees and
-1.5 degrees from the center latitude, but the left longitude
and the resolution would be the values entered by the user).
Once you hit the 'Create Footprint' button, LocMOC will call
Mapmaker again (WARNING: if you do not have Mapmaker on your
system you cannot create a footprint, this function is 
dependent on Mapmaker) and bring up an MDIM map to put under
your footprint.  Then LocMOC will bring up the 'Footprint of 
MOC Image #' window.  



Footprint of MOC Image #

	This window contains an MDIM map and a footprint
(a trapezoid whose area corresponds to the MOC image number)
of the MOC narrow angle image that the user has specified
as calculated from information in the data file (which is the
default unless you read in an alternate data file).  This 
window allows you to drag and rotate the footprint any way 
that you like.

Translate/Rotate
	This button controls how the mouse input is interpreted
by LocMOC.  To move the footprint, click anywhere on the
image, drag the mouse, and then release the mouse.  Then
LocMOC will redraw the map with your change.  If this button
is set to 'Translate' then your mouse motion will move the
footprint across the map.  If this button is set to 'Rotate'
then your mouse motion will cause the footprint to be rotated
about its center.

Latitude & Longitude
        These labels will display the current latitude and
longitude coordinates of the cursor.

Display Options
        This pull-down menu controls the details of the
display.  It should be relatively self-explanatory.  You
must hit 'REDRAW' for your changes to take effect.

REDRAW
        This button will re-draw the map window, taking into
account changes that you have made in the Display Options.

Reset Footprint
	If you have made changes that you don't like, this 
button will reset the location and orientation of the footprint 
to what it was when you first opened this window.

Write Image
        This will bring up a window that will allow you to write
out the data in the map window in one of two ways.  You can
either write out the image in the map window to a GIF file
(by hitting 'Write GIF') or a TIFF file (by hitting 'Write TIFF'). 
If you have made changes that you would like to keep, and read 
back into LocMOC in the future, make sure that prior to quitting 
LocMOC that you go to 'I/O Options' and 'Write out Footprint 
Information'. This option writes out all of the footprint 
information that you altered during your session to a file that 
can be read back in by LocMOC when you run it again.


Close
	This button will close the 'Footprint of MOC Image #'
window, clean up the Mapmaker files associated with that
MDIM map, and return you to the 'LocMOC Main Panel' or the
'Location of MOC Images' window depending on where you started
from.



Track of MOLA Data
        This window displays a Viking base map with a MOLA track
plotted on top of it.  The topography is expressed horizontally 
on the image with the ground track equal to an average elevation
for the displayed MOLA data.  To the right of the ground track
is positive, to the left is negative, and the topography data
points are plotted perpendicular to the strike of the groundtrack
line.

Latitude and Longitude Offset
	These displays record how much you have moved the MOLA
track in LocMOC from its initial position.

Exaggeration
	This can be set to any value that you like and is a 
multiplicative factor applied to the topography of the MOLA 
shots.  When the exaggeration is 1.0, then the scale of the 
plotted topography is equal to the Viking map distance scale,
when it is 10.0 then the distance from the ground track to the
topography is 10 times its elevation in meters from the areoid, etc.

Display Options
	You can either have the groundtrack and topography data
plotted as individual data points or as connected with a line.
You can change the colors of the groundtrack and topography, and
there are various options for the lat/lon grid.

REDRAW
	Redraws the image, may be necessary to hit after 
changing 'Display Options'

Reset Track
	Resets the track to its initial position.

Write Image
	Begins a window that allows you to write out the 
displayed image to a TIFF or a GIF file.

Close
	Quits the window and returns the user to the 'LocMOC Main
Panel.'



Footprint and Track
	The window that comes up is similar to the 'Footprint' and 'Track
of MOLA Data' windows and in fact combines features of the two.
There are two differences between this and the above windows. There 
is a toggle button that is initially set to 'Footprint' that sets 
either the Footprint or the MOLA track to be active, allowing 
independent movement of each.  The MOLA track is only allowed to 
be translated, not rotated, and setting the 'Translate/Rotate' 
toggle to Rotate doesn't do anything.  The other thing is that the
Latitude and Longitude Offset windows are displaying the latitude
and longitude offset of the first point of the MOLA track with 
respect to the center point of the MOC image.  This is different
than the Offsets in the 'Track of MOLA Data' window.  
All of the other buttons and controls in this window are identical 
to the controls in either the 'Footprint' or 'Track of MOLA Data' 
windows, please see their entries above for more information.



Last Modified on Novbember 20, 1999
by Ross Beyer, rbeyer@lpl.arizona.edu