----------- DD SYSTEM PROGRAM MANUAL ---------------------

LEVEL 2

V.2.4

A. Fedorov

CESR (Toulouse, France) Andrei.Fedorov@cesr.fr


Last updating: May 11, 2002

GENERAL NOTES

First of all look at Brief Instruments Description to understand some hardware properties.

Using CALL_EXTERNAL function

Interface of IDL to DD data base is realised by CALL_EXTERNAL function. The standard way to use this function is:
          A = CALL_EXTERNAL(DDLIB+'Name_of_libfile.so', $
                                  'Name_Of_function',   $
                                   Argument_list)
Here:

Open and Close the Virtual Instrument DataBase

Each open virtual instrument is referred by unique ID, the LONG non-negative value. Each interface call contains ID in arguments. If the Virtual Instrument is not open yet, you should set ID = -1 and then call the interface function. The DataBase will be open automatically. The function returns to you non-negative ID or negative error identifier. So, check returned ID to be sure the Virtual Instrument exists, open and you sent valid time. In one session you can open any number of Virtual Instruments simultaneously. Use different variables to keep IDs of different open simultaneously Virtual Instrument (like open file discriptors).

Before finishing the program you should close ALL open Virtual Instruments. To do that you have to call:

       error = call_external(DDLIB+'DD_idl.so','CloseID',ID)

Time Manipulation

DD system uses time in two formats: The most of Virtual Instruments calls return the Time in second format. The conversion can be made by two calls:


INTERFACES DESCRIPTION

INTERBALL-TAIL ATTITUDES

To get instant attitudes of the INTERBALL-Tail S/C call:
   Ret=call_external(DDLIB+'libIDLAT.so',$
                         'getframe',$
                         Size,$
                         Time,$
                         Attid,$
                         flag)
Here: To see an example press:

EXAMPLE


CORALL INTERFACE

CORALL Raw Spectra

To obtain CORALL raw spectra use IDL call:
   RetSize=call_external(DDLIB+'idl_corall.so',$
                        'GetCORALLSpectra',$
                         ID, $    
                         Spectra,$
                         Time,$
                         Size,$
                         Mode,$
                         STime,$
                         TInt)
Here: Function returns actual size of obtained data. If the real size of requested data is greater than SIZE value, the trailer of the data is omited. To get an example click:

EXAMPLE

CORALL constant instrument information

Each S/C spin CORALL reads <32 energy step> X <32 azimuth sectorsp> X <5 polar channels> data values. According the mode of data compressin (0 - 8) several nearest azimuthal sectors and energy steps can be combined before data transmittion to telemetry. To get information about data compression degree and about energy levels call:

   ERROR = call_external(DDLIB+'idl_corall.so','GetCORALLInform',$
                           ID, $
                           Energy, $
                           TimeShift, $
                           AzimuthNumber, $
                           EnergiesNumber )
Here: Function returns negative value in case of error. To see an example press:

EXAMPLE

CORALL Decoded and Calibrated Spectra

To obtain CORALL decoded to original and calibrated spectra use IDL call:

   RetSize=call_external('../idl_corall.so',$
                        'GetCORALLSPC',$
                         ID, $
                         Spectra,$
                         Azim,$
                         Time,$
                         OneSectorT,$
                         EffFlag,$
                         Size,$
                         STime,$
                         TInt)
Here: All data are decompressed, that is equivalit to mode "0". Function returns actual size of obtained data. If the real size of requested data is greater than SIZE value, the trailer of the data is omited. To get an example click:

EXAMPLE


ELECTRON INTERFACE

ELECTRON Spectra

To get ELECTRON spectra use IDL call :
   RetSize=call_external(DDLIB+'getelec.so','get_elecsp',$
                         ID, $    
                         Time,$
                         StartTime,$
                         TimeInterval,$
                         Mode,$
                         Spectra,$
                         SIZE)
Here: Function returns actual size of received data. To get an example press:

EXAMPLE

ELECTRON instrument information

The ELECTRON instrument has a maximum 32 energy steps and 12 modes. All constants are arrays with size 12 at least in last dimension. To get ELECTRON instrument constants you can use interface call:

err = call_external(DDLIB+'getelec.so','GetInfo', $
                     ID,                          $
                     Energies,                    $
                     EBounds,                     $
                     DeltaT,                      $
                     AccumTime)
Here: Function returns negative value in case of error. To see an example press:

EXAMPLE


MAGNETOMETERS INTERFACE

High Resolution Magnetic Field

To see an example press:

EXAMPLE

Tzyganenko-96 INTERFACE

To see an example press:

EXAMPLE