slaclab / pysmurf

Other
2 stars 9 forks source link

Remove errant factor of 4 in `smurf_control.setup()` call to `set_lms_delay()` #789

Open swh76 opened 3 months ago

swh76 commented 3 months ago

Description of this problem in https://github.com/simonsobs/sodetlib/discussions/423. The factor of 4 here - https://github.com/slaclab/pysmurf/blob/e8db8010a6698beedae4e55928ab858f6c7cd0d6/python/pysmurf/client/base/smurf_control.py#L551 needs to be removed; older SMuRF firmware versions used to process four tones in every polyphase filter bank (PFB) subband, but the production firmware we use now processes only one tone in every PFB subband. The 4* was only relevant for older versions of the firmware where there was more delay due to each subband needing to do four times more processing.

This bug prevents users from properly setting the lmsDelay from their pysmurf cfg file (since it gets multiplied by this hidden 4 and then usually overflows the lmsDelay register under the hood, causing it to error out and be zero). lmsDelay is a very important parameter required for tracking.