The MIT Voyager Plasma Science idl Documentation
There are several sets of idl procedures used by the Plasma Group.
One set was written by Adam Szabo, and is documented both integrally
in the
code
and in a memo written by Adam.
This page will document the
code
written by George S. Gordon Jr. for
of Voyager data, although it
can be used on many other types of data.
These procedures can be grouped into four categories: Data Acquisition, Data Manipulation, Data Display and Other.
The Data Acquisition procedures are concerned with reading in data,
and identifying its type.
The Data Manipulation takes the acquired data, and manipulates it to produce data for display.
The Data Display routine allows for plotting, over-plotting, multiple panels
on one page, printing of plots, plotting (on either x or y axis) year & day of year, and reading values off of the plot.
Each of the procedures has internal documentation, which can be viewed by
clicking on the procedure's name.
Common routines, that define the common blocks and data types.
-
Is run at the start of every IDL job.
Initializes needed variables and functions.
It includes common.types.
-
Defines most of the Voyager data types.
Is used by type_file, and also by some non-idl routines
such as typexxx.c to determine the type of file being read.
-
defines the common block 'const_common'.
The Data Acquisition procedures listed below enable the scientist to read in data without having to worry about the details of the format of the data.
-
Similar to read_f, below, except it has the pointer to jwb's coho data base built in.
t1 & t2 are the start & stop time of the data wanted.
-
reads in a file,specifies by the string file_name (f1, f2, f3 ...).
This data is concatenated if cat == 1
The data is put into the array of structures dd
An array, tt, of times associated with each array element of dd.
read_f uses type_file to determine the type of data that is being read in.
It used dd_to_tt to generate the time array.
common.types has the list and definition of the type of file that are recognized.
-
Simlar to read_f except that it reads tha file, which has a list on file name in it.
These files, which must all be of the same type, are then read in and concatinated.
-
checks the file, file_name, and by first checking the number of
words per a line, then the length of the date field etc.
type_file determine the type of data present in the file.
The file common.types is the database that contains the description of the known data types
-
Has a list of the know data types.
Each line is the definition of a structure which is the definition of the named data type.
The name that this structure is assigned to, is the same name
as is used in the naming of data files.
The number at the end of each line, after the semi colon ( comment in idl) is the number of entries per a line.
Note that the data types are in groups of similar structures.
(e.g. key type file go from 6 to 19 entries per a time..
keym stands for key minimal, keyb is for key with b field keybn is key with b & n, (the n telling the number of edits survived by this.
For a more complete description of the data types see Data Types
-
Computes the time associated with each element of dd, and
puts it in an array "tt".
The time is the number of days from the beginning of 'base_year'.
-
Just a model for Docmentation.
-
Averages 'x', over a period, +/- dt/2, (default dt=1).
all positional arguments must have same length.
if x_rms is present, the rms over the t window will also be calculated.
Also is an example of the use of 'call_external'.
-
calculates ns, north/south, and ew, east/west, flow angles for
the protons from the fit velocity in dd
-
calculates bb, magnitude, bb_ns, north/south, and bb_ew, east/west, for the B field
-
Calculates the entries of x1 that are not in x2, to within an acuracy of dx. same for x2 in x1. The results are indicies into arrays x1 &2 in common variable ii1 & ii2.
-
If given a time xrange=[tt1,tt2], lim_range resets xrange.
It then computes the speed using the fit velocity in dd.
It then set any of the following ranges that are not set to default values.
xrange, range_sp_max, range_den_max, range_w_max, range_mag_max, range_ang_max.
-
If time_now is either not set, or set to zero,
Given the date in yr[ ,day, hr...] it gives the time_now.
otherwise it assumes it is
Given the time_now it computes the year, day, hour ...
It checks the number of parameters it is given
to decided whether to compute year & fraction of year,
or year and day plus fraction of day, etc
-
Interpolates the values of d0( t0) at t1
-
Returns the index number of the tag in the structure.
-
Figures out the type of file that file_name is.
Uses the structures in
common.types