@@ -1,49 +1,73 | |||||
1 | import os,sys |
|
1 | import os,sys | |
2 | import datetime |
|
2 | import datetime | |
3 | import time |
|
3 | import time | |
4 | from schainpy.controller import Project |
|
4 | from schainpy.controller import Project | |
5 | path = '/home/alex/Downloads/NEW_WR2/spc16removeDC' |
|
5 | path = '/home/alex/Downloads/NEW_WR2/spc16removeDC' | |
6 | figpath = path |
|
6 | figpath = path | |
7 | desc = "Simulator Test" |
|
7 | desc = "Simulator Test" | |
8 |
|
8 | |||
9 | controllerObj = Project() |
|
9 | controllerObj = Project() | |
10 |
|
10 | |||
11 | controllerObj.setup(id='10',name='Test Simulator',description=desc) |
|
11 | controllerObj.setup(id='10',name='Test Simulator',description=desc) | |
12 |
|
12 | |||
13 | readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', |
|
13 | readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', | |
14 | frequency=9.345e9, |
|
14 | frequency=9.345e9, | |
15 | FixRCP_IPP= 60, |
|
15 | FixRCP_IPP= 60, | |
16 | Tau_0 = 30, |
|
16 | Tau_0 = 30, | |
17 | AcqH0_0=0, |
|
17 | AcqH0_0=0, | |
18 | samples=330, |
|
18 | samples=330, | |
19 | AcqDH_0=0.15, |
|
19 | AcqDH_0=0.15, | |
20 | FixRCP_TXA=0.15, |
|
20 | FixRCP_TXA=0.15, | |
21 | FixRCP_TXB=0.15, |
|
21 | FixRCP_TXB=0.15, | |
22 | Fdoppler=600.0, |
|
22 | Fdoppler=600.0, | |
23 | Hdoppler=36, |
|
23 | Hdoppler=36, | |
24 | Adoppler=300,#300 |
|
24 | Adoppler=300,#300 | |
25 | delay=0, |
|
25 | delay=0, | |
26 | online=0, |
|
26 | online=0, | |
27 | walk=0, |
|
27 | walk=0, | |
28 |
|
|
28 | profilesPerBlock=625, | |
29 |
|
29 | dataBlocksPerFile=100)#,#nTotalReadFiles=2) | ||
|
30 | ''' | |||
|
31 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', | |||
|
32 | path=path, | |||
|
33 | startDate="2020/01/01", #"2020/01/01",#today, | |||
|
34 | endDate= "2020/12/01", #"2020/12/30",#today, | |||
|
35 | startTime='00:00:00', | |||
|
36 | endTime='23:59:59', | |||
|
37 | delay=0, | |||
|
38 | #set=0, | |||
|
39 | online=0, | |||
|
40 | walk=1) | |||
|
41 | ''' | |||
30 | opObj11 = readUnitConfObj.addOperation(name='printInfo') |
|
42 | opObj11 = readUnitConfObj.addOperation(name='printInfo') | |
31 |
|
43 | |||
32 | procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) |
|
44 | procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) | |
33 | #opObj11 = procUnitConfObjA.addOperation(name='CohInt', optype='other') |
|
45 | #opObj11 = procUnitConfObjA.addOperation(name='CohInt', optype='other') | |
34 | #opObj11.addParameter(name='n', value='10', format='int') |
|
46 | #opObj11.addParameter(name='n', value='10', format='int') | |
35 |
|
47 | |||
36 | #opObj10 = procUnitConfObjA.addOperation(name='selectChannels') |
|
48 | #opObj10 = procUnitConfObjA.addOperation(name='selectChannels') | |
37 | #opObj10.addParameter(name='channelList', value=[0]) |
|
49 | #opObj10.addParameter(name='channelList', value=[0]) | |
38 | opObj11 = procUnitConfObjA.addOperation(name='PulsePairVoltage', optype='other') |
|
50 | opObj11 = procUnitConfObjA.addOperation(name='PulsePairVoltage', optype='other') | |
39 |
opObj11.addParameter(name='n', value=' |
|
51 | opObj11.addParameter(name='n', value='625', format='int')#10 | |
40 | opObj11.addParameter(name='removeDC', value=1, format='int') |
|
52 | opObj11.addParameter(name='removeDC', value=1, format='int') | |
41 |
|
53 | |||
42 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairPowerPlot', optype='other') |
|
54 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairPowerPlot', optype='other') | |
|
55 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSignalPlot', optype='other') | |||
|
56 | ||||
43 |
|
57 | |||
44 | opObj11 = procUnitConfObjA.addOperation(name='PulsepairVelocityPlot', optype='other') |
|
58 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairVelocityPlot', optype='other') | |
45 | #opObj11.addParameter(name='xmax', value=8) |
|
59 | #opObj11.addParameter(name='xmax', value=8) | |
46 |
|
60 | |||
47 | opObj11 = procUnitConfObjA.addOperation(name='PulsepairSpecwidthPlot', optype='other') |
|
61 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSpecwidthPlot', optype='other') | |
|
62 | ||||
|
63 | procUnitConfObjB= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjA.getId()) | |||
|
64 | ||||
|
65 | ||||
|
66 | opObj10 = procUnitConfObjB.addOperation(name='ParameterWriter') | |||
|
67 | opObj10.addParameter(name='path',value=figpath) | |||
|
68 | #opObj10.addParameter(name='mode',value=0) | |||
|
69 | opObj10.addParameter(name='blocksPerFile',value='100',format='int') | |||
|
70 | opObj10.addParameter(name='metadataList',value='utctimeInit,timeInterval',format='list') | |||
|
71 | opObj10.addParameter(name='dataList',value='dataPP_POW,dataPP_DOP,dataPP_SNR,dataPP_WIDTH')#,format='list' | |||
48 |
|
72 | |||
49 | controllerObj.start() |
|
73 | controllerObj.start() |
General Comments 0
You need to be logged in to leave comments.
Login now