Los Alamos National Laboratory Go to the Lab's home page Search for people in the Lab's phone book Search the Laboratory's Web site
  MENA  >  UDF  >  Expanding a Virtual Instrument

Expanding a Virtual Instrument

Virtual Instruments must be unique for a given mission. It's therefore a bit redundant to have to spell out:

    key = udf_key('IMAGE', 'IMAGE1', 'MENA', 'MENASCI', 'IMMSTSP')

(in ALL BLOODY CAPS), when just the last part -- the virtual instrument -- is sufficient and unique... at least for IMAGE/IMAGE1, which is all we care about. It's especially annoying when you're trying to work with multiple instruments.

The IDL function vinst_to_full_path.pro can be used to simplify life:

    key = udf_key(vinst_to_full_path('ImmStSp'))

Much nicer, isn't it? There's only one variable field, so you can use it as a command-line parameter (for a multi-purpose program, for instance). Furthermore, since mixed case is acceptable, you can make your code much more legible.

[NOTE: 7-June-2000: To access QuickLook data, add the /QUICKLOOK keyword to your invocation]

vinst_to_full_path returns a 5-element string vector containing all the necessary UDF thingies. The function has a few other options, but I'll let you figure those out. They're really only useful for developers and testers.

In true Ed form, this code is automatically generated by a Perl script. Feel free to grab that and play with it.


NOTE: it is not too hard to write this equivalent functionality into the C source code for UDF_OPEN (in Ed's DLM package). It would eliminate the need for a separate .PRO file... I'm just not sure it's worth the effort. If you think it is, please drop me a line.
ISR-1 Software Team
 Los Alamos National Laboratory  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:17:42-06 $