Home

Introduction

Ionospheric Physics

Registration/
Download


Source Code Description

Tutorial

Graphics

Feedback

Publications

License

Notice



Graphics


The following IDL procedures can be used for SAMI2 graphics. Read the comments at the beginning of each procedure for needed inputs at the idl prompt. The entire set of IDL procedures are contained in sami2-idl.tar.gz.

read-f.pro

This procedure reads in formatted data files.

read-u.pro

This procedure reads in unformatted data files.

contour2d.pro

This procedure makes a color contour plot of the function f (defined by the user at the idl prompt) as a function of geographic latitude and altitude at a given time. It plots to the screen and to a postscript file contour2d.ps.

zalt1d.pro

This procedure makes a line plot of the function f (defined by the user at the idl prompt) as a function of altitude at a given time and geographic latitude. It plots to the screen and to a postscript file zalt1d.ps.

glat1d.pro

This procedure makes a line plot of the function f (defined by the user at the idl prompt) as a function of latitude at a given time and altitude. It plots to the screen and to a postscript file glat1d.ps.

 
Test cases

Example 2

This is an example of graphical output for the data generated from Example 2 in the Tutorial section. This is essentially a single field line case so the procedures contour2d.pro, zalt1d.pro, glat1d.pro are not useful.

  1. Edit the file read-f.pro so that nf = 3 and nt = 96.
    (Note: nt can be found from the file time.dat; the first number in the last line.)
  2. Start IDL - enter the commands that are after the IDL prompt in green.
  3. IDL> .run read-f
  4. IDL> ntm=75
  5. IDL> plot,dene(50:100,1,ntm),zalt(50:100,1),yrange=[0,2000],/xlog,charsize=1.6,xr=[1.e4,1.e7]
  6. The plot should look like this. This is a graph of the electron density as a function of altitude along a geomagnetic field that passes over Millstone Hill at an altitude 300 km at about 1900 UT.
  7. One can also easily plot different ion species.
  8. IDL> ntm=15
  9. IDL> plot,dene(50:100,1,ntm),zalt(50:100,1),yrange=[0,2000],/xlog,charsize=1.6,xr=[1.e3,1.e7]
  10. IDL> oplot,deni(50:100,1,0,ntm),zalt(50:100,1),line=2
  11. IDL> oplot,deni(50:100,1,1,ntm),zalt(50:100,1),line=3
  12. The plot should look like this. This is a graph of the electron density (solid), O+ density (dash-dot), and H+ density (dash) as a function of altitude along a geomagnetic field that passes over Millstone Hill at an altitude 300 km at about 2300 UT.

Example 3

This is an example of graphical output for the data generated from Example 3 in the Tutorial section.

  1. Edit the file read-f.pro or read-u.pro so that nf = 60 depending on whether the data file generated is formatted (denif.dat) or unformatted (deniu.dat) and nt = 191.
  2. Start IDL - enter the commands that are after the IDL prompt.
  3. IDL> .run read-f or .run read-u
  4. IDL> f = alog10(dene)
  5. IDL> ntm = 99
  6. IDL> .run contour2d
  7. The postscript generated plot should look like this. The screen plot positions the labels a little differently.
  8. IDL> glat0=18.3
  9. IDL> .run zalt1d
  10. The postscript generated plot should look like this. This is a plot of the electron density as a function of altitude over Arecibo.
  11. IDL> zalt0=350
  12. IDL> .run glat1d
  13. The postscript generated plot should look like this. This is a plot of the electron density as a function of latitude at a fixed altitude 350 km.

 
Some IDL issues

IDL is an excellent (and expensive) graphics software package from ITT. If you do not have access to a licensed copy, you can download IDL or obtain a trial CD from Research Systems. This trial version only runs for a limited time (7 minutes) and has several limitations (e.g., you cannot write JPEG or GIF files).

The IDL procedures provided can be edited to obtain plots with titles, axes labels, different scales, etc. Also, the procedure contour2d.pro can be edited to show grid points, magnetic field lines, and contour levels.