Skip to content
Snippets Groups Projects
Commit bf3e85e6 authored by Merlo, Jason's avatar Merlo, Jason
Browse files

Fixed crash on edit without changing dataset attributes

parent bb42ea5f
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ class VirtualDAQ(daq.DAQ):
self.ts_trajectory = TimeSeries(length, shape)
def get_samples(self, stride=1, loop=-1, playback_speed=50):
def get_samples(self, stride=1, loop=-1, playback_speed=30):
"""Read sample from dataset at sampled speed, or one-by-one."""
if self.ds:
# Read in samples from dataset
......
......@@ -187,9 +187,9 @@ class Receiver(object):
# Calculate slow-time complex FFT
dc = self.datacube.get_frame(-1)
print('dc.shape',dc.shape)
# print('dc.shape',dc.shape)
self.fft_mat = self.compute_fft2(dc, (self.slow_fft_size, self.fast_fft_size))
print('fft_mat.shape', self.fft_mat.shape)
# print('fft_mat.shape', self.fft_mat.shape)
# Power Thresholding
# if self.cfft_data[vmax_bin] < POWER_THRESHOLD:
......
......@@ -50,7 +50,7 @@ class RangeDopplerWidget(pg.PlotWidget):
# set colormap
self.img.setLookupTable(lut)
self.img.setLevels([-50, 20])
self.img.setLevels([-30, 30])
self.rescale()
......@@ -76,12 +76,12 @@ class RangeDopplerWidget(pg.PlotWidget):
if self.receiver.fft_mat is not None:
downsampled = self.receiver.fft_mat[::self.downsample, ::self.downsample]
print('rd - downsampled.shape', downsampled.shape)
# print('rd - downsampled.shape', downsampled.shape)
try:
if not np.all(self.receiver.fast_fft_data == 0):
log_fft = 10 * np.log(downsampled)
print('log_fft.shape', log_fft.shape)
# print('log_fft.shape', log_fft.shape)
self.img.setImage(log_fft, autoLevels=False, autoDownsample=True)
except:
pass
......@@ -123,5 +123,9 @@ class RangeDopplerWidget(pg.PlotWidget):
self.img.translate(-np.array(self.receiver.fft_mat.shape[1]) / (2 * self.downsample),
-np.array(self.receiver.fft_mat.shape[0]) / (2 * self.downsample))
# TODO: why is the /4 instead of /2??
slow_limit = self.receiver.slow_bin_size * self.receiver.slow_fft_size / 4
self.setLimits(
xMin=-self.source.sample_rate/(2*self.receiver.slow_bin_size), xMax=self.source.sample_rate/(2 * self.receiver.slow_bin_size))
xMin=-slow_limit, xMax=slow_limit)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment