;==================================================================== ; ; EXCALSP.PRO ; Example of interface level 2 to CORALL calibrated spectra ; ; A.Fedorov, Oct., 27, 1998 ;==================================================================== STime = '1996045223000000' ; 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 = long(20) ; Number of spectra requested. ; If the real data volume will be greater than ; allocated memory, the data will be restricted Spectra = fltarr(32,5,Size) ; Array allocated for spectra. ; Energies X Channels X Size Azim = lonarr(Size) ; Array of azimuth sector number OneSectorT = double(0.0) ; Exposition, sec Time = dblarr(Size) ; Array allocated for Time EffFlag = long(1) ; 0 - raw data, 1 - calibrated, 2 - with deadtime 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('../idl_corall.so',$ 'GetCORALLSPC',$ ID, $ ;0 Spectra,$ ;1 Azim,$ ;2 Time,$ ;3 OneSectorT,$ ;4 EffFlag,$ ;5 Size,$ ;6 STime,$ ;7 TInt) ;8 ; 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 ;==============================================================================