c3_whi_ne_.pro
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
; $Id: whi_ne_c3_.pro,v 1.1 2010/02/22 09:36:19 budnik Exp $
;
function c3_whi_ne_, StartTime, TimeInt, Time, RetSize, MaxSampling, close=close
common GraphC, graph, graphN
common WHINEC3_COM, ID
FillValue = -1.0
if n_elements(ID) EQ 0 then ID = -1L
Sampling = 1.5
MaxSampling = 104.0
Size = long(graph[graphN].DeltaT/sampling)
VI = 'clust3:whi:whi'
Val = fltarr(Size)
Time = dblarr(Size)
RetSize = call_external(!PROJLIB + 'libParam.so', 'getLocalData', $
ID, VI, 'Density', StartTime, TimeInt, Size, Time, Val)
if KEYWORD_SET(CLOSE) then begin
error = call_external(!DDLIB+'DD_idl.so','CloseID',ID)
ID = -1L
endif
if (RetSize LE 0) then begin
Time = 0.D0
return, 0.0
endif
Time=Time[0:Retsize-1]
Val=Val[0:Retsize-1]
num_gap = where(Val ne FillValue, Cntr)
if Cntr le 0 then begin
Retsize = -999
Time = 0.D0
return, [0.0, 0.0, 0.0]
endif
Time=Time[num_gap]
Val=Val[num_gap]
Retsize=Cntr
return, Val
end