Skip to content

Commit

Permalink
fix(uxm_setup.setup_fixed_tones): Check a tune is present.
Browse files Browse the repository at this point in the history
  • Loading branch information
tristpinsm committed Sep 16, 2024
1 parent f60ea8e commit be4c3f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sodetlib/operations/uxm_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,13 @@ def setup_fixed_tones(

bands = cfg.dev.exp['active_bands']

# ensure we have a tune available
try:
_ = S.freq_resp[bands[0]]["resonances"]
except KeyError as e:
raise ValueError("No tune is available to set fixed tones from.") from e

# identify available frequencies
# TODO check we have a tune?
ft_freq = []
for b in bands:
ft_freq += list(_find_fixed_tone_freq(S, b, fixed_tones_per_band, min_gap))
Expand Down

0 comments on commit be4c3f1

Please sign in to comment.