Main Page
Basics, Building SPICE Applications (IDL)

Table of Contents

      Note About HTML Links
      Environment Set-up
         Unix/Linux
         Windows
         Confirm IDL can access Icy:
      A simple example program


May 25, 2007



Top

Note About HTML Links




The HTML version of this lesson may contain links pointing to various HTML documents provided with the Toolkit. All of these links are relative and, in order to function, require this document to be in a certain location in the Toolkit HTML documentation directory tree.

In order for the links to be resolved, create a subdirectory called ``lessons'' under the ``doc/html'' directory of the Toolkit tree and copy this document to that subdirectory before loading it into a Web browser.



Top

Environment Set-up




Use of Icy from IDL requires the Icy DLM exists in the IDL search path. IDL provides a programatic command to register a DLM (add the path), "dlm_register."



Top

Unix/Linux



Assume Icy is installed at /naif/icy/. The corresponding path to the Icy DLM being /naif/icy/lib/icy.dlm.

   IDL> dlm_register, '/naif/icy/lib/icy.dlm'


Top

Windows



Assume Icy is installed at C:\naif\icy\. The corresponding path to the Icy DLM being C:\naif\icy\lib\icy.dlm.

   IDL> dlm_register, 'C:\naif\icy\lib\icy.dlm'


Top

Confirm IDL can access Icy:



   IDL> help, 'icy', /dlm
A proper response shows a path to the Icy interface library and some version information, similar to:

   ** ICY - IDL/CSPICE interface from JPL/NAIF (not loaded)
   Version: v1.3.02, Build Date: 27-NOV-2006,
   Source: ed.wright@jpl.nasa.gov
   Path: /naif/icy/lib/icy.so
The response

   % Unknown dynamically loadable module: icy.
indicates the IDL search path does not include the Icy ``icy.dlm'' file.



Top

A simple example program




This procedure calls the Icy function 'cspice_tkvrsn' then outputs the return value.

File tk_ver.pro:

   PRO tk_ver
 
      print, 'Toolkit version : ', cspice_tkvrsn('TOOLKIT')
 
   END
From IDL, compile then execute the procedure:

   IDL> .comp tk_ver.pro
   % Compiled module: TK_VER.
 
   IDL> tk_ver
   % Loaded DLM: ICY.
   Toolkit version : CSPICE_N0061