Add new comment

Hi, first let me thank you for this very nice piece of software.
I'd like to ask two question regarding ThreadProcess run part, specifically the following code (lines 278-282):

for pwr, freq in itertools.izip(freqs, powers):
xr = pwr + (self.freq / 1e6)
xr = xr + (xr * self.cal / 1e6)
xr = int((xr * 5e4) + 0.5) / 5e4
scan[xr] = freq

1) Maybe I'am missing something, but it seems to me that in this part of code meaning of pwr and freq is swapped. If so, wouldn't it be more clean to have it named the following way?

for freq, pwr in itertools.izip(freqs, powers):
xr = freq + (self.freq / 1e6)
xr = xr + (xr * self.cal / 1e6)
xr = int((xr * 5e4) + 0.5) / 5e4
scan[xr] = pwr

2) I interpret line "xr = int((xr * 5e4) + 0.5) / 5e4" in such way, that it rounds frequency to nearest multiple of 20 Hz. Is there any reason behind this particular value (i.e. 20Hz)?

Thank you. Brux