rotate waterfall display

This commit is contained in:
Sebastien Bourdeauducq 2020-08-11 16:20:15 +08:00
parent f82d5c18a1
commit 028155a54e
1 changed files with 2 additions and 1 deletions

View File

@ -16,9 +16,10 @@ class SpectrogramItem(pg.ImageItem):
pg.ImageItem.__init__(self) pg.ImageItem.__init__(self)
depth = 100 depth = 100
self.setOpts(axisOrder="row-major")
self.img_array = np.zeros((depth, block_size)) self.img_array = np.zeros((depth, block_size))
self.setImage(self.img_array, autoLevels=True, autoDownsample=True) self.setImage(self.img_array, autoLevels=True, autoDownsample=True)
self.setRect(QtCore.QRectF(0.0, (freq_base-freq_sample/2)/1e6, float(depth), freq_sample/1e6)) self.setRect(QtCore.QRectF((freq_base-freq_sample/2)/1e6, -float(depth), freq_sample/1e6, float(depth)))
def add_block(self, block): def add_block(self, block):
self.img_array = np.roll(self.img_array, -1, 0) self.img_array = np.roll(self.img_array, -1, 0)