From 7aef31701bfdef987da0fbbd4c449d2c73736b8a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 8 Dec 2022 15:45:54 -0500 Subject: [PATCH] Add some commented debug prints for default fmtr --- piker/data/_formatters.py | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/piker/data/_formatters.py b/piker/data/_formatters.py index 7ffe8872..0c402aa4 100644 --- a/piker/data/_formatters.py +++ b/piker/data/_formatters.py @@ -439,12 +439,37 @@ class IncrementalFormatter(msgspec.Struct): ) -> None: # write pushed data to flattened copy - new_y_nd = new_from_src[data_field] - self.y_nd[read_slc] = new_y_nd + y_nd_new = new_from_src[data_field] + self.y_nd[read_slc] = y_nd_new x_nd_new = self.x_nd[read_slc] x_nd_new[:] = new_from_src[self.index_field] + # x_nd = self.x_nd[self.xy_slice] + # y_nd = self.y_nd[self.xy_slice] + # name = self.viz.name + # if 'trade_rate' == name: + # s = 4 + # print( + # f'{name.upper()}:\n' + # 'NEW_FROM_SRC:\n' + # f'new_from_src: {new_from_src}\n\n' + + # f'PRE self.x_nd:' + # f'\n{list(x_nd[-s:])}\n' + + # f'PRE self.y_nd:\n' + # f'{list(y_nd[-s:])}\n\n' + + # f'TO WRITE:\n' + + # f'x_nd_new:\n' + # f'{x_nd_new[0]}\n' + + # f'y_nd_new:\n' + # f'{y_nd_new}\n' + # ) + # XXX: was ``.format_xy()`` def format_xy_nd_to_1d( self, @@ -749,9 +774,6 @@ class StepCurveFmtr(IncrementalFormatter): x_step = self.x_nd[start:stop] y_step = self.y_nd[start:stop] - # pack in duplicate final value to complete last step level - y_step[-1, 1] = last - # debugging # if y_step.any(): # s = 3