>  Docs Center  >  Libraries  >  Mankoff  >  MAG_GRID
Libraries

MAG_GRID

MAG_GRID

Name


MAG_GRID

Purpose


      Return a magnetic grid warped to the current map projection,
      that can be overlayed on an image.

Category


      SNOE, image, mapping

Calling Sequence


      result = mag_grid()

Inputs


      NONE

Optional Inputs


      NONE

Keyword Parameters


      HIRES: Set this keword equal to one (1) to produce a high
              quality grid. This may take some time (less than a
              minute). The default is a low quality (but quick)
              image
      MAGTHICK: Set this to the line thickness desired.
      OVAL: Set this to the thickness desired for the auroral oval
              grid lines (i.e. the 60 and 70 degree latitude lines)
      LATDEL, LONDEL: See MAP_GRID documentation

Outputs


      This function returns a bytescaled image. The size is the size
      of the current device. The array returned contains the value 1
      where the field lines are, and 0 everywhere else.

Side Effects


      NONE known

Restrictions


      Must call map_set before this function
      Requires mag_grid.pro

Procedure


      This function warps a CGM magnetic lookup table (LUT) onto the
      current map projection. Since our LUTs are at a 1 degree
      resolution, the quality of the lines is poor. Hence the /HIRES
      keyword. The algorithm is the same in this case, but the image
      is created much larger (approx 20 times), and then shrunk
      down. The result is a higher quality image.

Example



        ;;; set up and display the data
        MAP_SET, 88.5, 277.5, /cyl, /iso
        TV, MAP_IMAGE( data, xx, yy ), xx, yy
        img = TVRD()
        ;;; get the grid for the above map_set projection
        grid0 = MAG_GRID()
        grid1 = MAG_GRID( /HIRES, YEAR=2000, magthick=2, oval=4 )
        ;;; overlay grid on image, and display
        magGridColor = 255
        img[ WHERE( grid1 EQ 1 ) ] = magGridColor
        TV, img

Modification History


  Written by: Ted Fisher, Summer 2000
      Oct, 2001 TAF: made lots of misc usability improvements
      Oct, 2001 KDM: added documentation, removed xysize
      Jul, 2002 KDM: Removed YEAR keyword. LOAD_CGM has
                            own. Uses _EXTRA=e



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us