Skip to content
Snippets Groups Projects
Commit f595f4b5 authored by Giulio Gaio's avatar Giulio Gaio
Browse files

Fixed circular buffer shift direction

parent 602d5bb6
No related branches found
No related tags found
No related merge requests found
......@@ -514,19 +514,19 @@ class DeviceObj:
# History for Corr, CorrFiltAbs, CorrLow, CorrHigh
# corr
attribute = self.prefix()+'s{:03d}_t{:03d}_Corr'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'s{:03d}_t{:03d}_Corr_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.corr[target.index]; selfseq_dev.write_attribute(attribute,val)
# corrfiltabs
attribute = self.prefix()+'s{:03d}_t{:03d}_CorrFiltAbs'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'s{:03d}_t{:03d}_CorrFiltAbs_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.lp_filter_corr[target.index]; selfseq_dev.write_attribute(attribute,val)
# corrlow
attribute = self.prefix()+'s{:03d}_t{:03d}_CorrLow'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'s{:03d}_t{:03d}_CorrLow_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.corr_low[target.index]; selfseq_dev.write_attribute(attribute,val)
# corrhigh
attribute = self.prefix()+'s{:03d}_t{:03d}_CorrHigh'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'s{:03d}_t{:03d}_CorrHigh_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.corr_high[target.index]; selfseq_dev.write_attribute(attribute,val)
elif self.tag == TARGET_TAG:
......@@ -546,19 +546,19 @@ class DeviceObj:
# History for Corr, CorrFiltAbs, CorrLow, CorrHigh
# corr
attribute = self.prefix()+'t{:03d}_t{:03d}_Corr'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'t{:03d}_t{:03d}_Corr_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.corr[target.index]; selfseq_dev.write_attribute(attribute,val)
# corrfiltabs
attribute = self.prefix()+'t{:03d}_t{:03d}_CorrFiltAbs'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'t{:03d}_t{:03d}_CorrFiltAbs_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.lp_filter_corr[target.index]; selfseq_dev.write_attribute(attribute,val)
# corrlow
attribute = self.prefix()+'t{:03d}_t{:03d}_CorrLow'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'t{:03d}_t{:03d}_CorrLow_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.corr_low[target.index]; selfseq_dev.write_attribute(attribute,val)
# corrhigh
attribute = self.prefix()+'t{:03d}_t{:03d}_CorrHigh'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
attribute = self.prefix()+'t{:03d}_t{:03d}_CorrHigh_History'.format(self.index+1); val = selfseq_dev.read_attribute(attribute); val = val.value
val = np.roll(val, -1);val[-1] = self.corr_high[target.index]; selfseq_dev.write_attribute(attribute,val)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment