This page was created by the IDL library routine `mk_html_help2`.

Last modified: Tue Aug 5 18:17:40 2025.

# Directory Listing of Routines

# projects/emm

- EMM_EMU_MAVEN_ORBIT_PLOT
- FIXED_MAP_GRID
  The MAP_GRID procedure draws the graticule of parallels and meridians,

# Routine Descriptions

## EMM_EMU_MAVEN_ORBIT_PLOT

[Next Routine] [List of Routines]

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     emm_emu_maven_orbit_plot

     Routine to create a 6-panel plot with the orbits of MAVEN (and
     potentially other spacecraft in future)  plotted with respect to a
     gridded lat-long data image.

     Syntax: mvn_orbit_survey_plot_ephemeris, time, fileroot, screen=screen

     Inputs:
          time              - any UTC timestamp, typically the start or
                              central time  the image was taken

          fileroot          - the name of the file, without extension
                              (i.e. no '.jpg' at the end)

     KEYWORDS:
          screen            - boolean keyword to send the output to the
                              screen; used for testing. Default = 0

          tbuffer           - The number of seconds before and after the
                              central time where the trajectory  should
                              be plotted

          sun_view          - Controls the viewpoint in the YZ-plane. If
                              set to 'day', the view is of the dayside of
                              Mars. If set to 'night', the view is of the
                              nightside.

          traj_ct           - Color table for the MAVEN trajectory

          overlay           - Structure describing the image/data to be
                              overlaid on the sphere of Mars. Contains
                              the following tags:

                               LAT: Nx-element array of latitudes of each
                               point to be painted on the sphere.

                               ELON: N-element array of East longitudes
                               of each point to be painted on the sphere

                               DATA: N-element array of values
                               (e.g. brightnesses etc.) to be painted on
                               the sphere

                               COLOR_TABLE: which color table is wanted
                               for the overlay

                               LOG: 0 or 1 for whether the data should be
                               plotted with a logarithmic color scale

                               RANGE: the color scale range for the data

                               OBSPOS: in the case of images of Mars
                               captured by orbital assets, this is the
                               position of the "camera", in Cartesian
                               coordinates.

                               DESCRIPTION: a string, briefly describing
                               what is being overlaid on the
                               sphere. Ideally this should be less than
                               20 characters

                               FILENAME: if the image comes from a
                               particular file, it can be entered for
                               printing on the final plot

     Dependencies:
          Requires installation of the Berkeley SPEDAS software package.

     Caution:
       1. This routine make use of the ImageMagick "convert" utility. This step is used when
          converting the .eps file producded by the program into a .jpg
          file. If you don't have "convert", simply comment out
          the lines below that create the .jpg and remove the .eps
          files.

     18 Jan, 2017 - Original version by David brain
     02 Nov, 2022 - update for EMM by Rob  Lillis
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(See projects/emm/emm_emu_maven_orbit_plot.pro)

## FIXED_MAP_GRID

[Previous Routine] [List of Routines]

     NAME:
       FIXED_MAP_GRID

     PURPOSE:
           The MAP_GRID procedure draws the graticule of parallels and meridians,
     according to the specifications established by MAP_SET. MAP_SET must be called
     before MAP_GRID to establish the projection type, the center of the
     projection, polar rotation and geographical limits.

     CATEGORY:
       Mapping.

     CALLING SEQUENCE:
           MAP_GRID

     INPUTS:
       NONE

     OPTIONAL INPUTS:
       NONE

     KEYWORD PARAMETERS:

     BOX_AXES: Surround the map window with a "box" style axes with
             annotations, outside the box, where the parallels intersect the
             sides, and the meridians intersect the bottom and top edges of the
             box.  The border of the box is drawn in alternating foreground and
             background colors, with color changes at each intersection with
             a parallel or meridian.  This keyword determines the thickness of
             the box's border, in millimeters.  If LABEL is not explicitly
             specified, it defaults to 1 when this keyword is present.  If this
             feature is selected, be sure to leave enough room around the map
             window for the annotation, usually by specifying the XMARGIN and
             YMARGIN keywords to MAP_SET.  See the example below.
       CHARSIZE: The size of the characters used for the labels. The default is 1.
          COLOR: The color index for the grid lines.
    FILL_HORIZON: Fills the current map_horizon.
        HORIZON: Draws the current map horizon.
      INCREMENT: Determines the spacing between graticle points.
     GLINESTYLE: If set, the line style used to draw the grid of parallels and
                 meridians. See the IDL User's Guide for options. The default is
                 dotted.
     GLINETHICK: The thickness of the grid lines. Default is 1.
          LABEL: Set this keyword to label the parallels and meridians with their
                 corresponding latitudes and longitudes. Setting this keyword to
                 an integer will cause every LABEL gridline to be labeled (i.e,
                 if LABEL=3 then every third gridline will be labeled). The
                 starting point for determining which gridlines are labeled is the
                 minimum latitude or longitude (-180 to 180), unless the LATS or
                 LONS keyword is set to a single value. In this case, the starting
                 point is the value of LATS or LONS.
       LATALIGN: This keyword controls the alignment of the text baseline for
                 latitude labels. A value of 0.0 left justifies the label,
                 1.0 right justifies it, and 0.5 centers it.
         LATDEL: The spacing in degrees between parallels of latitude in the grid.
                 If not set, a suitable value is determined from the current map
                 projection.
           LATS: The desired latitudes to be drawn (and optionally labeled). If
                 this keyword is omitted, appropriate latitudes will be generated
                 with consideration of the optional LATDEL keyword. If this
                 keyword is set to a single value, drawn (and optionally labeled)
                 latitudes will be automatically generated  as
                 [...,LATS-LATDEL,LATS,LATS+LATDEL,...] over the extent of the
                 map.  The single valued LATS is taken to be the starting point
                 for labelling (See the LABEL keyword).
         LATLAB: The longitude at which to place latitude labels. The default is
                 the center longitude on the map.
       LATNAMES: An array specifing the names to be used for the latitude labels.
                 By default, this array is automatically generated in units of
                 degrees. This array can be a string array or numeric, but should
                 not be of mixed type. When LATNAMES is specified, LATS must also
                 be specified, but the number of elments in the two arrays need not
                 be equal. Extra LATNAMES are ignored, while LATNAMES not supplied
                 are automatically reported in degrees. LATNAMES can be used when
                 LATS is set to a single value. It this case, the LATS used will
                 start at the specified latitude and progress northward, wrapping
                 around the globe if appropriate. Caution should be used when
                 using LATNAMES in conjunction with a single LATS, since the
                 number of visible latitude gridlines is dependent on many factors.
       LONALIGN: This keyword controls the alignment of the text baseline for
                 longitude labels. A value of 0.0 left justifies the label,
                 1.0 right justifies it, and 0.5 centers it.
         LONDEL: The spacing in degrees between meridians of longitude in the grid.
                 If not set, a suitable value is determined from the current map
                 projection.
         LONLAB: The latitude at which to place longitude labels. The default is
                 the center latitude on the map.
           LONS: The desired longitudes to be drawn (and optionally labeled). If
                 this keyword is omitted, appropriate longitudes will be generated
                 with consideration of the optional LONDEL keyword. If this
                 keyword is set to a single value, drawn (and optionally labeled)
                 longitudes will be automatically generated as
                 [...,LONS-LONDEL,LONS,LONS+LONDEL,...] over the extent of the map.
                 The single valued LONS is taken to be the starting point for
                 labeling (See the LABEL keyword).
       LONNAMES: An array specifing the names to be used for the longitude labels.
                 By default, this array is automatically generated in units of
                 degrees. This array can be a string array or numeric, but should
                 not be of mixed type. When LONNAMES is specified, LATS must also
                 be specified, but the number of elments in the two arrays need not
                 be equal. Extra LONNAMES are ignored, while LATNAMES not supplied
                 are automatically reported in degrees. LONNAMES can be used when
                 LONS is set to a single value. It this case, the LONS used will
                 start at the specified longitude and progress eastward, wrapping
                 around the globe if appropriate. Caution should be used when
                 using LONNAMES in conjunction with a single LONS, since the number
                 of visible longitude gridlines is dependent on many factors.

     MAP_STRUCTURE: Set this keyword to a !MAP structure, as returned from
           MAP_PROJ_INIT. If this keyword is set then the gridlines are passed
           through MAP_PROJ_FORWARD and the resulting lines are drawn using
           Cartesian coordinates. If this keyword is not set then it is assumed
           that MAP_SET has been called to set up a map projection.

     NO_GRID: Set this keyword if you only want labels but not gridlines.

    ORIENTATION: Specifies the clockwise angle in degrees from horizontal
                 of the text baseline that the labels should be rotated. Note,
                 that the rotation used in MAP_SET is also clockwise, but XYOUTS
                 is normally counterclockwise.

     T3D: Set this keyword to indicate that the generalized transformation
          matrix in !P.T is to be used. If not present, the user-supplied
          coordinates are simply scaled to screen coordinates.

     ZVALUE: Sets the Z coordinate, in normalized coordinates in the
             range of 0 to 1, at which to output the continents.

          Note - This keyword has effect only if keyword T3D is set and the
             transformation is stored in !P.T

    OUTPUTS:
             Draws gridlines and labels on the current map.

     EXAMPLE:
         map_set,10,20,23.5,/cont,/ortho,/horizon     ; establish a projection
             lats=[-65,-52,-35,-20,-2.59,15,27.6,35,45,55,75,89]
                         ; choose the parallels to draw
             map_grid,lats=lats,londel=20,lons=-13,label=2,lonlab=-2.5,latlab=7
                         ;draw the grid
       Make a map with a grid surrounded by a box style axis:
       map_set, /STEREO, 40, -90,scale=50e6,/CONTINENTS, XMARGIN=3, YMARGIN=3
       map_grid, /BOX_AXES, COLOR=3, CHARSIZE=1.5  ;

     MODIFICATION HISTORY:
       Written by: SVP, May, 23 1996.
       DMS, Feb, 1996 Note that this version plots all gridlines
               unless a 4 element LIMIT was specified to MAP_SET.
           SVP, Nov 1996   Changed over !map1 (new IDL5 maps)
       SVP, May 1996   Map_Grid used to live inside of map_set.pro, now
                           it lives here.
           SVP, May 1996   Changed LABEL to determine the skip between labelled
                           gridlines.
                           Also, added the LATS and LONS keywords to give complete
                           control over where the labels go.
           SVP, Sept 1996  Added LATNAMS,LONAMES, and ORIENTATION keywords
       DMS, Nov, 1996  Rev 2 of maps.
       DMS, Jul, 1997  Added Box Axes
       CT, Jan 2004: Added MAP_STRUCTURE keyword.
       Renamed the function FIXED_MAP_GRID with fixed at lines 555-556 and
          664-665 as described here: http://www.dfanning.com/map_tips/missinggrid.html.
          This is required to get proper grid output in some applications, but
          it breaks other code.

(See projects/emm/fixed_map_grid.pro)