Changed Zero Adc Integral Reset
Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
@@ -145,6 +145,7 @@ p2.addLegend()
|
|||||||
start = args.irange[0] - 1
|
start = args.irange[0] - 1
|
||||||
stop = args.irange[1]
|
stop = args.irange[1]
|
||||||
# print("WO: ", end='')
|
# print("WO: ", end='')
|
||||||
|
dataIntAll = []
|
||||||
for i in range(start, stop):
|
for i in range(start, stop):
|
||||||
# mdsNode = tree.getNode(f"ATCAIOP1.ADC8INT")
|
# mdsNode = tree.getNode(f"ATCAIOP1.ADC8INT")
|
||||||
if args.decimated:
|
if args.decimated:
|
||||||
@@ -154,8 +155,8 @@ for i in range(start, stop):
|
|||||||
node = ADC_INTEG.format(i)
|
node = ADC_INTEG.format(i)
|
||||||
# mdsNode = tree.getNode(node)
|
# mdsNode = tree.getNode(node)
|
||||||
try:
|
try:
|
||||||
dataAdc = client.getData(node)
|
dataAdcInt = client.getData(node)
|
||||||
# dataAdcInt = getMdsData(tree, node)
|
dataIntAll.append(dataAdcInt[:, 0])
|
||||||
timeData = client.getTime(node)
|
timeData = client.getTime(node)
|
||||||
total_samples = len(dataAdcInt[:, 0])
|
total_samples = len(dataAdcInt[:, 0])
|
||||||
y = dataAdcInt[:args.maxpoints, 0] / 2.0e6 # LSB * sec
|
y = dataAdcInt[:args.maxpoints, 0] / 2.0e6 # LSB * sec
|
||||||
@@ -165,7 +166,6 @@ for i in range(start, stop):
|
|||||||
x *= ADC_DECIM_RATE
|
x *= ADC_DECIM_RATE
|
||||||
if (args.zero):
|
if (args.zero):
|
||||||
y = y - dataAdcInt[0, 0] / 2.0e6 # LSB * sec
|
y = y - dataAdcInt[0, 0] / 2.0e6 # LSB * sec
|
||||||
# wo = (dataAdcInt[-1, 0] - dataAdcInt[0, 0]) /total_samples
|
|
||||||
# print(f"{wo:0.4f} ", end='')
|
# print(f"{wo:0.4f} ", end='')
|
||||||
p2.plot(x, y, pen=pg.mkPen(i, width=2), name=f"Ch {i+1}")
|
p2.plot(x, y, pen=pg.mkPen(i, width=2), name=f"Ch {i+1}")
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -176,6 +176,7 @@ print(" ")
|
|||||||
p2.setLabel('bottom', "Time", units='s')
|
p2.setLabel('bottom', "Time", units='s')
|
||||||
p2.setLabel('left', "Integ", units='lsb.s')
|
p2.setLabel('left', "Integ", units='lsb.s')
|
||||||
p2.setDownsampling(ds=200, auto=False)
|
p2.setDownsampling(ds=200, auto=False)
|
||||||
|
p2.setYRange(-4, 4)
|
||||||
|
|
||||||
# updatePlot()
|
# updatePlot()
|
||||||
|
|
||||||
|
|||||||
@@ -339,11 +339,13 @@ namespace MARTe {
|
|||||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail Write wo0:%6.3f", woValues[0]);
|
REPORT_ERROR(ErrorManagement::ParametersError, "Fail Write wo0:%6.3f", woValues[0]);
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
/* Reset is done by fiber
|
||||||
rv = ioctl(devFileDescriptor, ATCA_PCIE_IOPT_RST_INTEG);
|
rv = ioctl(devFileDescriptor, ATCA_PCIE_IOPT_RST_INTEG);
|
||||||
if (rv ) {
|
if (rv ) {
|
||||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail reset Integrators");
|
REPORT_ERROR(ErrorManagement::ParametersError, "Fail reset Integrators");
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user