camonitor2table.py: Enable interpolate to create values before the first one.
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-bii_scripts/bin/camonitor2table.py new-bii_scripts/bin/camonitor2table.py
--- old-bii_scripts/bin/camonitor2table.py 2022-12-09 20:33:55.222829807 +0100
+++ new-bii_scripts/bin/camonitor2table.py 2022-12-09 20:33:55.222829807 +0100
@@ -1175,11 +1175,18 @@
"""
# pylint: disable=too-many-locals
if row2 is None:
- # cannot interpolate, just copy the last value
+ # cannot interpolate, just copy the first value
val= hashedlist2d.lookup(row1, col)
for row in empty_rows:
# note: val is a list, val[:] creates a copy:
hashedlist2d.set(row, col, val[:])
+ return
+ if row1 is None:
+ # cannot interpolate, just copy the last value
+ val= hashedlist2d.lookup(row2, col)
+ for row in empty_rows:
+ # note: val is a list, val[:] creates a copy:
+ hashedlist2d.set(row, col, val[:])
return
if isinstance(row1, datetime.datetime):
tm= lambda t : total_seconds_(t-row1)
patch 846b1cef9df6ee9ec1436784fe7a5c0edc615ec2
Author: Goetz Pfeiffer <Goetz.Pfeiffer@helmholtz-berlin.de>
Date: Mon Jul 5 16:41:36 CEST 2021
* camonitor2table.py: Enable interpolate to create values before the first one.
This is for timestamps at the beginning of the data file where we do not yet
have a value for a PV. In this case the first non-empty value of the PV that
follows is copied there