Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Ginsburg <[email protected]>
  • Loading branch information
e-koch and keflavich committed May 6, 2021
1 parent d6d8d58 commit 30de78e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spectral_cube/cube_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,14 +623,14 @@ def bunit_converters(obj, unit, equivalencies=(), freq=None):
factors = []

# Iterate through spectral channels.
for i in iter:
for ii in iter:

beam = beams[i]
beam = beams[ii]

# Use the range of frequencies when the beam does not change. Otherwise, select the
# frequency corresponding to this beam.
if has_beams:
thisfreq = freq[i]
thisfreq = freq[ii]
else:
thisfreq = freq

Expand Down Expand Up @@ -720,4 +720,3 @@ def bunit_converters(obj, unit, equivalencies=(), freq=None):
else:
# Slice along first axis to return a 1D array.
return factors[0]

0 comments on commit 30de78e

Please sign in to comment.