;==================================================================== ; ; EXELECTRON.PRO ; Example of interface level 2 to ELECTRON raw spectra ; ; A.Fedorov, Oct., 29, 1998 ;==================================================================== STime = '1996045220000000' ; Start Time of requested interval ; 1996 year, Feb. 15 (DDday = 045) ; 22:00:00:000 TInt = '0000000000100000' ; Time interval in the same format ; means 1 min. Size = 20 ; The Size of allocated for data arrays. Spectra=fltarr(8,32,Size) ; The Array allocated for ELECTRON spectra ; First dimension - number of polar chanels ; Second dimension - number of energy steps Mode = intarr(Size) ; Array allocated fot Mode Time = dblarr(Size) ; Array allocated for Times of spectra measurements ; Function returns time in DOUBLE format ID = long(-1) ; Electron DataBase ID. Set -1 to open DataBase. DDLIB = getenv('DDLIB') ; Get environment variable to find right path ; to procedure ; Receiving the data. Funcion returns actual size of data oe error. RetSize=call_external(DDLIB+'getelec.so','get_elecsp',$ ID, $ Time,$ STime,$ TInt,$ Mode,$ Spectra,$ Size) ; Close the DataBase error = call_external(DDLIB+'DD_idl.so','CloseID',ID) print, 'Returned Size of data : ',RetSize ;Converting double time to the string time and print data print, 'Time, UT Count at the 31st step of Channel #1' for i = 0, RetSize -1 do begin TimeString = call_external('DD_idl.so','GetTime',Time(i), /S_VALUE) print, TimeString, Spectra(0,31,i) endfor end ;==============================================================================