mex_h_vel_.pro
1.12 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
function MEX_H_VEL_RESTR_, StartTime, TimeInt, Time, RetSize, Sampling, close=close
common GraphC, graph, GraphN
common MEXHDVEL_COM, ID
FillValue = !Values.F_NAN
if n_elements(ID) EQ 0 then ID = -1L
sampling = 192.0
Size = long(graph[GraphN].DeltaT/sampling)
Bdata=fltarr(3,Size)
Time=dblarr(Size)
Mission ="mex";
VI = Mission + ':ima:param'
ParamName = "Velocity_P";
RetSize = call_external(!PROJLIB + 'libParam.so', 'getLocalData', $
ID, VI, ParamName, StartTime, TimeInt, Size, Time, Bdata)
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,0.0,0.0]
endif
Time=Time[0:Retsize-1]
Bdata=Bdata[*,0:Retsize-1]
num_gap = where(finite(Bdata[0,*]), Cntr)
if Cntr le 0 then begin
Retsize = -999
Time = 0.D0
return, [0.0,0.0,0.0]
endif
Time=Time[num_gap]
Bdata=Bdata[*,num_gap];
Retsize=Cntr
return, Bdata
end