simonsobs / simonsobs/sodetlib
Timeout waiting for PVs to update in estimate_band_phase_delay
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 0
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 4
Description
Timeout errors seem to happen more in band_phase_delay estimation than other pysmurf functions. Here's the full stack trace:
ExceptionTraceback (most recent call last)
<ipython-input-11-b37ac59628f4> in <module>
1 for band in tqdm(bands):
2 S.set_att_dc(band, 30)
----> 3 S.estimate_phase_delay(band)
/usr/local/src/pysmurf/python/pysmurf/client/util/pub.py in wrapper(S, pub_action, *args, **kwargs)
48 S.pub._action_ts = S.get_timestamp()
49
---> 50 rv = func(S, *args, **kwargs)
51
52 finally:
/usr/local/src/pysmurf/python/pysmurf/client/util/smurf_util.py in estimate_phase_delay(self, band, nsamp, make_plot, show_plot, save_plot, save_data, n_scan, timestamp, uc_att, dc_att, freq_min, freq_max)
290 freq_cable, resp_cable = self.full_band_resp(
291 band, nsamp=nsamp, make_plot=make_plot,
--> 292 save_data=save_data, n_scan=n_scan)
293
294 idx_cable = np.where( (freq_cable > freq_min) & (freq_cable < freq_max) )
/usr/local/src/pysmurf/python/pysmurf/client/util/pub.py in wrapper(S, pub_action, *args, **kwargs)
48 S.pub._action_ts = S.get_timestamp()
49
---> 50 rv = func(S, *args, **kwargs)
51
52 finally:
/usr/local/src/pysmurf/python/pysmurf/client/tune/smurf_tune.py in full_band_resp(self, band, n_scan, nsamp, make_plot, save_plot, show_plot, save_data, timestamp, save_raw_data, correct_att, swap, hw_trigger, write_log, return_plot_path, check_if_adc_is_saturated)
643 #If ADC is saturated, throws an exception.
644 if check_if_adc_is_saturated:
--> 645 adc_is_saturated = self.check_adc_saturation(band)
646 if adc_is_saturated:
647 raise ValueError('Playing the noise file saturates the '+
/usr/local/src/pysmurf/python/pysmurf/client/util/pub.py in wrapper(S, pub_action, *args, **kwargs)
48 S.pub._action_ts = S.get_timestamp()
49
---> 50 rv = func(S, *args, **kwargs)
51
52 finally:
/usr/local/src/pysmurf/python/pysmurf/client/util/smurf_util.py in check_adc_saturation(self, band)
1467 """
1468 adc = self.read_adc_data(band, data_length=2**12, make_plot=False,
-> 1469 save_data=False, show_plot=False, save_plot=False)
1470 adc_max = int(np.max((adc.real.max(), adc.imag.max())))
1471 adc_min = int(np.min((adc.real.min(), adc.imag.min())))
/usr/local/src/pysmurf/python/pysmurf/client/util/pub.py in wrapper(S, pub_action, *args, **kwargs)
48 S.pub._action_ts = S.get_timestamp()
49
---> 50 rv = func(S, *args, **kwargs)
51
52 finally:
/usr/local/src/pysmurf/python/pysmurf/client/util/smurf_util.py in read_adc_data(self, band, data_length, hw_trigger, make_plot, save_data, timestamp, show_plot, save_plot, plot_ylimits)
1553
1554 res = self.read_stream_data_daq(data_length, bay=bay,
-> 1555 hw_trigger=hw_trigger)
1556 dat = res[1] + 1.j * res[0]
1557
/usr/local/src/pysmurf/python/pysmurf/client/util/pub.py in wrapper(S, pub_action, *args, **kwargs)
48 S.pub._action_ts = S.get_timestamp()
49
---> 50 rv = func(S, *args, **kwargs)
51
52 finally:
/usr/local/src/pysmurf/python/pysmurf/client/util/smurf_util.py in read_stream_data_daq(self, data_length, bay, hw_trigger, write_log)
1442
1443 time.sleep(.1)
-> 1444 sg.wait()
1445
1446 vals = sg.get_values()
/usr/local/src/pysmurf/python/pysmurf/client/command/sync_group.py in wait(self, epics_poll)
67 time.sleep(.001)
68 if time.time() - t0 > self.timeout:
---> 69 raise Exception('Timeout waiting for PVs to update.')
Exception: Timeout waiting for PVs to update.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with estimate_phase_delay and full_band_resp in python/pysmurf/client/util/smurf_util.py, then trace check_adc_saturation, read_adc_data, and read_stream_data_daq to sync_group.py's wait method. Reproduce the reported Timeout waiting for PVs to update error and determine the cause of the timeout during phase-delay estimation; done means the operation completes reliably or fails with a clear, appropriate error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100