;==================================================================== ; ; EXRAWSP.PRO ; Example of interface level 2 to CORALL raw spectra ; ; A.Fedorov, Oct., 27, 1998 ; revised May, 9, 2002 ;==================================================================== 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 ; Number of spectra requested. ; If the real data volume will be greater than ; allocated memory, the data will be restricted Spectra = intarr(32,5,Size) ; Array allocated for spectra. ; Energies X Channels X Size Mode = intarr(Size) ; Array allocated for Mode Time = dblarr(Size) ; Array allocated for Time ID = Long(-1) ; Set ID as -1 means the CORALL database is ; not open and DD_Server has to open it. ; The call returns right ID of open databse. DDLIB = getenv('DDLIB') ; Get environment variable to find right path ; to procedure ; Call returns the real size of obtained data Less or Equel Size RetSize=call_external(DDLIB+'idl_corall.so',$ 'GetCORALLSpectra',$ ID, $ Spectra,$ Time,$ Size,$ Mode,$ STime,$ TInt) ; 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 first 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,0,i) endfor end ;==============================================================================