In [1]:
from arvpyf import mgmt, cf
from arvpyf.mgmt import ArchiverConfig
from arvpyf.cf import PVFinder
from arvpyf.ar import ArchiverReader
import numpy as np
In [2]:
#bpl_url = 'http://xf11id-ca1.cs.nsls2.local:17665/mgmt/bpl'
#bpl_url = 'xnds://xf11id-ca.cs.nsls2.local/cgi-bin/ArchiveDataServer.cgi'
#bpl_url = 'http://xf04id-ca1.cs.nsls2.local:17665/mgmt/bpl'
bpl_url = 'http://xf11id-ca.cs.nsls2.local:17665/mgmt/bpl'
arvconf = ArchiverConfig(bpl_url)
cf_update = '/cf-update/'
pvfinder = PVFinder(cf_update)
ar_url = 'http://xf11id-ca.cs.nsls2.local:17668'
ar_tz = 'US/Eastern'
config = {'url': ar_url, 'timezone': ar_tz}
arvReader = ArchiverReader(config)
In [3]:
arv_pvs = arvconf.get_all_pvs(limit=100000)
In [8]:
env_pvs = [pv for pv in arv_pvs if 'Dif-Ax:Gam' in pv]
In [9]:
env_pvs
Out[9]:
['XF:11IDB-ES{Dif-Ax:Gam}Abort:Home-Cmd',
'XF:11IDB-ES{Dif-Ax:Gam}Addr:ELoss-I',
'XF:11IDB-ES{Dif-Ax:Gam}Addr:Homing-I',
'XF:11IDB-ES{Dif-Ax:Gam}AxisEnable-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Check:Home-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Cmd-SCalcout_',
'XF:11IDB-ES{Dif-Ax:Gam}Cmd:Home-Asyn_',
'XF:11IDB-ES{Dif-Ax:Gam}Cmd:Kill-Cmd',
'XF:11IDB-ES{Dif-Ax:Gam}Cmd:SetHm-StringOut',
'XF:11IDB-ES{Dif-Ax:Gam}Cnt:Ax-SP',
'XF:11IDB-ES{Dif-Ax:Gam}Dsbl:Hmng-Calc',
'XF:11IDB-ES{Dif-Ax:Gam}Flt:ELoss-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Group:Home-LongOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Group:Home-SC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ax:Gam}Sts:1-FOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:1-SCalcout_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:1-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:2-FOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:2-SCalcout_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:2-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:3-FOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:3-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:4-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:Home-Asyn_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:Home-FOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:Home-SCalcOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:Home-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeCmplt-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr1-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr10-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr11-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr12-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr13-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr14-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr15-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr16-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr17-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr18-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr19-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr2-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr20-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr21-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr22-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr23-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr24-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr25-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr26-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr27-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr28-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr29-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr3-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr30-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr31-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr32-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr4-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr5-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr6-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr7-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr8-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:HomeMtr9-StringOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:Homed-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sts:Homing-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Sw:OT-Sts',
'XF:11IDB-ES{Dif-Ax:Gam}Timeout:Home-I',
'XF:11IDB-ES{Dif-Ax:Gam}Timeout:Home-SCalcOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Timer:Home-Asyn_',
'XF:11IDB-ES{Dif-Ax:Gam}Timer:Home-CalcOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Timer:Home-FOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Timer:Home-I',
'XF:11IDB-ES{Dif-Ax:Gam}Timer:Home-SCalcOut_',
'XF:11IDB-ES{Dif-Ax:Gam}Val:ASLO-I']
In [26]:
pv = 'XF:11IDB-ES{Dif-Ax:Gam}Mtr.RBV'
since = '2019-6-24 20:05:00'
until = '2019-6-24 23:55:00'
target = arvReader.get(pv, since, until)
pv = 'XF:11IDB-ES{Dif-Ax:PhH}Mtr.RBV'
samp = arvReader.get(pv, since, until)
In [27]:
samp
Out[27]:
time
data
0
2019-06-24 18:33:26.681037-04:00
-1.999946
1
2019-06-24 20:29:18.278406-04:00
-2.026483
2
2019-06-24 20:29:18.540332-04:00
-2.039526
3
2019-06-24 20:29:18.701163-04:00
-2.047566
4
2019-06-24 20:29:18.859792-04:00
-2.055514
5
2019-06-24 20:29:19.017346-04:00
-2.063416
6
2019-06-24 20:29:19.175698-04:00
-2.071296
7
2019-06-24 20:29:19.390116-04:00
-2.082029
8
2019-06-24 20:29:19.548535-04:00
-2.089920
9
2019-06-24 20:29:19.709734-04:00
-2.098005
10
2019-06-24 20:29:19.869161-04:00
-2.105976
11
2019-06-24 20:29:20.028552-04:00
-2.113930
12
2019-06-24 20:29:28.183400-04:00
-2.521682
13
2019-06-24 20:29:28.411617-04:00
-2.533084
14
2019-06-24 20:29:28.571179-04:00
-2.541055
15
2019-06-24 20:29:28.729316-04:00
-2.548980
16
2019-06-24 20:29:28.889967-04:00
-2.557003
17
2019-06-24 20:29:29.048003-04:00
-2.564911
18
2019-06-24 20:29:29.208352-04:00
-2.572911
19
2019-06-24 20:29:29.391066-04:00
-2.582088
20
2019-06-24 20:29:29.550571-04:00
-2.590025
21
2019-06-24 20:29:29.711026-04:00
-2.598036
22
2019-06-24 20:29:29.870113-04:00
-2.605995
23
2019-06-24 20:29:36.190201-04:00
-2.922041
24
2019-06-24 20:29:36.391652-04:00
-2.932082
25
2019-06-24 20:29:36.550382-04:00
-2.940041
26
2019-06-24 20:29:36.706401-04:00
-2.947829
27
2019-06-24 20:29:36.865179-04:00
-2.955760
28
2019-06-24 20:29:37.025368-04:00
-2.963771
29
2019-06-24 20:29:37.186017-04:00
-2.971851
...
...
...
3239
2019-06-24 22:48:11.511740-04:00
-3.350052
3240
2019-06-24 22:48:11.827755-04:00
-3.350058
3241
2019-06-24 22:48:12.887381-04:00
-3.350052
3242
2019-06-24 22:48:14.238345-04:00
-3.350058
3243
2019-06-24 22:48:14.411306-04:00
-3.350052
3244
2019-06-24 22:48:14.570833-04:00
-3.350058
3245
2019-06-24 22:48:14.730716-04:00
-3.350052
3246
2019-06-24 22:48:15.458062-04:00
-3.350058
3247
2019-06-24 22:48:15.616420-04:00
-3.350052
3248
2019-06-24 22:48:28.312216-04:00
-3.350058
3249
2019-06-24 22:48:28.471850-04:00
-3.350052
3250
2019-06-24 22:48:36.663986-04:00
-3.350058
3251
2019-06-24 22:48:36.824019-04:00
-3.350052
3252
2019-06-24 22:48:40.342586-04:00
-3.350058
3253
2019-06-24 22:48:40.659851-04:00
-3.350052
3254
2019-06-24 22:48:44.316584-04:00
-3.350058
3255
2019-06-24 22:48:44.474629-04:00
-3.350052
3256
2019-06-24 22:48:52.024675-04:00
-3.350058
3257
2019-06-24 22:48:52.182852-04:00
-3.350052
3258
2019-06-24 22:48:52.342101-04:00
-3.350058
3259
2019-06-24 22:48:52.501789-04:00
-3.350052
3260
2019-06-24 22:48:52.662193-04:00
-3.350058
3261
2019-06-24 22:48:52.821278-04:00
-3.350052
3262
2019-06-24 22:48:53.027293-04:00
-3.350058
3263
2019-06-24 22:48:53.187752-04:00
-3.350052
3264
2019-06-24 22:48:54.563500-04:00
-3.350058
3265
2019-06-24 22:48:56.257966-04:00
-3.350052
3266
2019-06-24 22:53:16.401967-04:00
-3.350040
3267
2019-06-24 22:53:17.471705-04:00
-3.350035
3268
2019-06-24 22:53:20.648288-04:00
-3.350029
3269 rows × 2 columns
In [21]:
%matplotlib widget
#np.save('/home/mjiang/analysis/2019_3/mjiang/T_sample.npy',samp.values)
In [25]:
#np.save('/home/mjiang/analysis/2019_3/mjiang/T_target.npy',target.values)
In [ ]:
In [ ]:
Content source: yugangzhang/CHX_Pipelines
Similar notebooks: