|
|
This page describes what you need to do to access, and view, MENA data using IDL.
All of this will only work on Linux. This is due to boneheadedness on the part of UDF, and I don't feel like working around it. So get yourself logged in to a Linux box.
Then, before you do anything with UDF, you must first define the UDF environment variables:
% source /packages/lib/udf/.env.csh (csh users) $ . /packages/lib/udf/.env.sh (sh, bash, ksh)
You may want to put the required command in your login startup (.cshrc, for csh users).
You will probably want your own copy of the source tree, in which to play around. Like all Ed code, it's under CVS control. Here's how you check out your copy of the CVS tree.
All code is available to you by running "idl -mena", so if you just want to use the existing code as is, you don't need to grab sources.
Once you have this directory, cd to the lib subdirectory and start idl:
% cd /n/projects/mena/working/fred/lib
% idl -mena
IDL Version 5.3 (linux x86). (c) 1999, Research Systems, Inc.
Installation number: 8173.
Licensed for use by: Los Alamos National Lab
-----------
/nh/kitchenaid/projects/mena/working/fred/lib (*)
-----------
Mena>
(the `*' indicates that IDL recognizes you being cd'ed to a working directory, so it has prepended "+." to its IDL_PATH, that is, it will search for procedures/functions in the current directory and its subdirectories, before searching in /n/projects/mena/lib. This lets you try out your own code. If you didn't check out a copy of the source tree, you won't see the `*').
Alas, the data are stored in UDF (as of this writing). I've tried to abstract things so you don't need to know too much about UDF, though.
The simplest way to start is by using READ_IM:
Mena> d = read_im( 'ImmStats', [2000,162,11], [2000,162,11,30] )
[1651 records read]
Mena> help, d, /struct
** Structure IMMSTATS, 29 tags, length=13360:
BTIME STRUCT -> UDF_TIME Array[1] -------\
ETIME STRUCT -> UDF_TIME Array[1] these |
D_QUAL DOUBLE 2.0000000 are |
START_AZ FLOAT Array[128] common to |
STOP_AZ FLOAT Array[128] all UDFs |
SCAN_INDEX FLOAT Array[128] ------------------/
START_HEIGHT FLOAT Array[128] ------------------\
STOP_HEIGHT FLOAT Array[128] here on, stuff |
START_POSITION FLOAT Array[128] specific to |
STOP_POSITION FLOAT Array[128] IMMSTATS |
COARSE_AZIMUTH FLOAT Array[128] |
FINE_AZIMUTH FLOAT Array[128] |
TOTAL_AZIMUTH FLOAT Array[128] |
TIME_OF_FLIGHT FLOAT Array[128] |
HEAD_ID FLOAT Array[128] |
[ ... ] :
This reads IMMSTATS data for DOY 162, 2000, 11:00 to 11:30. Results are stored in d, an array of structs. See the UDF-DLM documentation for more information on the returned data structure.
Obviously, d will be different for each MENA dataset (see the PIDF list for all the valid MENA datasets). Feel free to use READ_IM to read whatever you like... but be careful. This dataset is enormous. One hour's worth of data can swamp your IDL session and overload the machine you're running on. Trying to read one entire day might be really painful, and won't win you any friends among people logged in to your UNIX host.
Sigh. UDF, as you know, is not one of my favorite things. Here are just two reasons why:
The long and the short of it is that what READ_IM gave you is not necessarily kosher, so you need to clean it up a bit.
Let's deal with ImmStats (statistics). What I tend to do, after reading in data, is finding the unique spin identifiers:
Mena> u = uniq(d.spin_counter[0])
This gives you a list of indices into d, not a list of spins! You can then use this list to extract a subset of d:
Mena> d = temporary( d[u[1]:u[N_Elements(u)-2]] )
It is actually very important that you do this, since the first and last few records of d will probably comprise only part of a spin. Since they are incomplete, they should be tossed.
The temporary() is a memory-saving measure, useful when assigning to the same variable. If you were creating a new variable to hold your subselection, you must not use temporary().
You can do other stuff with u, e.g., selecting only three spins:
Mena> d1 = d[u[1]:u[3]]
Since this assigns to a new variable, d1, the temporary() is not used.
You must read and select data before you can plot anything.
This is important, and you may have jumped here without reading any of the top bits, so let me say it again:
You must read and select data before you can plot anything.
I know, that's not the way Ed code usually works. Ed code is usually self-sufficient, and can read data for you, then plot it.
However, reading data is a slow process, so for the time being, all my plotting routines get passed the data they will plot. This makes it really quick to experiment with the same dataset. It is likely that in the future, for production code, this mode of operation will be discontinued.
There is too much to cover in this page. See the ImmStats page for more details.
| |
|
|
Operated by the University of California
for the National Nuclear Security Administration,
of the US Department of Energy. Copyright © 2002 UC | Disclaimer/Privacy |
Last Modified $Date: 2004-08-06 18:12:48-06 $