This PR implements a fix for issue737 and sodetlib issue300 where users were seeing duplicate data for unassigned channels stored in the freq_resp dictionary populated by setup_notches. The issue was that the method setup_notches uses to sweep channels can only run on assigned channels. That method is used because it is faster than sweeping every resonator serially, but a bug was causing it to populate the resp data of the unassigned channels, which it wasn't sweeping, with data from other channels. Here's where the bug was:
resulting in a copy, although different for each band, of the wrong data being stored with every unassigned channel in the S.freq_resp dictionary.
I implemented the following fix : added a new optional keyword scan_unassigned to setup_notches which if False, just doesn't scan unassigned channels or if True it scans them serial after the time optimized sweep over the assigned channels. I made it optional, and default disabled, because while this is useful for resonator lab characterization, it would slow down tuning in the field. Here's what the entry to in the freq_resp dictionary for an unassigned channel looks like if it's not scanned:
Fixed setup function docstring which wasn't rendering in ipython due to a non-ascii character!
Added check to setup for whether or not system has already been configured during the uptime of the rogue server to prevent users from running setup over and over again, which should only be run once per system, per power cycle.
Added documentation for the eta_scan function I co-opted to implement the unassigned channel scans.
Unrelated to this PR, added simple script for polling timing packets, scratch/shawn/logtimingpackets.py.
Description
This PR implements a fix for issue737 and sodetlib issue300 where users were seeing duplicate data for unassigned channels stored in the
freq_resp
dictionary populated bysetup_notches
. The issue was that the methodsetup_notches
uses to sweep channels can only run on assigned channels. That method is used because it is faster than sweeping every resonator serially, but a bug was causing it to populate the resp data of the unassigned channels, which it wasn't sweeping, with data from other channels. Here's where the bug was:https://github.com/slaclab/pysmurf/blob/eb9f7be55e6e49446fc72621e21e85596f5962a6/python/pysmurf/client/tune/smurf_tune.py#L3974
Unassigned channels get assigned channel -1 by the
assign_channels
routine, which resulted in a misindexing here:https://github.com/slaclab/pysmurf/blob/eb9f7be55e6e49446fc72621e21e85596f5962a6/python/pysmurf/client/tune/smurf_tune.py#L3975
resulting in a copy, although different for each band, of the wrong data being stored with every unassigned channel in the
S.freq_resp
dictionary.I implemented the following fix : added a new optional keyword
scan_unassigned
tosetup_notches
which ifFalse
, just doesn't scan unassigned channels or ifTrue
it scans them serial after the time optimized sweep over the assigned channels. I made it optional, and default disabled, because while this is useful for resonator lab characterization, it would slow down tuning in the field. Here's what the entry to in thefreq_resp
dictionary for an unassigned channel looks like if it's not scanned:Some other fixes in this PR:
setup
function docstring which wasn't rendering in ipython due to a non-ascii character!setup
for whether or not system has already been configured during the uptime of the rogue server to prevent users from runningsetup
over and over again, which should only be run once per system, per power cycle.eta_scan
function I co-opted to implement the unassigned channel scans.