Skip to content

Commit

Permalink
exclude options with range_fail from being bases for additional alts
Browse files Browse the repository at this point in the history
This fixes the issue seen on Petal0 2020-08-28
  • Loading branch information
joesilber committed Aug 29, 2020
1 parent fe40659 commit a2574cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/desimeter/transform/xy2tp.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def xy2tp(xy, r, ranges, t_guess=None, t_guess_tol=default_t_guess_tol):
options.append({'TP':TP_alt, 'range_fail':range_fail_alt})

# rotating theta by +/-360 deg
for center_TP in [opt['TP'] for opt in options]:
for opt in options.copy():
if opt['range_fail']:
continue # because cannot base a viable alternate on a config that doesn't achieve xy
center_TP = opt['TP']
TP_alts = [[center_TP[0] + wrap, center_TP[1]] for wrap in [-360.0, 360.0]]
for TP_alt in TP_alts:
TP_alt, range_fail_alt = _wrap_TP_into_ranges(TP_alt, ranges)
Expand Down

0 comments on commit a2574cd

Please sign in to comment.