next up previous contents index
Next: 4.7.2 Reading Data with Up: 4.7 IDL Routines Previous: 4.7 IDL Routines   Contents   Index


4.7.1 Initialization of UIO Routines under IDL

The directory containing the IDL UIO routines should be added to the IDL variable !PATH. This could be done by a program segment in the startup procedure, like:

; --- Try to determine language ---
if (n_elements(!X.TICKV) eq 150) then langua='WAVE' else langua='IDL'
;
; --- Add user IDL directory to search path ---
if (langua eq 'IDL') then begin &$
  addpath=expand_path('+$UIOPATH/idl') &$
endif else begin &$
  addpath='/home/supas024/uio/idl' + ':' + '/home/supas024/wave' &$
endelse
if strtrim(addpath,2) ne '' then !path=addpath+':'+!path
delvar, addpath
It is reasonable to include the UIO initialization in the startup procedure as e.g.:
; --- Initialize uio-routines ---
uio_init, progrm='by hand'

IDL can handle the conversion types native, ieee_4, ieeele_4, ieee, idl, xdr. Here, ieee_4 is the default and should be used as a standard.

Attention: The IDL type ``long'' corresponds to the standard Fortran type ``integer''. The IDL types ``byte'' and ``integer'' are not known in standard Fortran and are therefore transformed to the IDL type ``long'' before writing (in the IDL routine uio_wr).

Be aware of: The parsing and interpretation of the entry headers can only be done by scalar operations which are comparatively slow in IDL.



Bernd Freytag 2002-02-16