Skip to content

Commit 4d7d11d

Browse files
committed
cleanup comments in gallery
1 parent d940421 commit 4d7d11d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/gallery.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,14 @@ identifying some spectral lines in the data.
146146
only_NRAO_recommended=True)
147147
lines.pprint()
148148
149+
# Change the cube coordinate system to be in velocity with respect
150+
# to the rest frequency (in the M83 rest frame)
151+
rests_frequency = lines['Freq-GHz'][0]*u.GHz / (1+rvel/constants.c)
149152
vcube = cube.with_spectral_unit(u.km/u.s,
150-
rest_value=lines['Freq-GHz'][0]*u.GHz,
153+
rest_value=rest_frequency,
151154
velocity_convention='radio')
152-
# Ugly, I know, but it's a clever python trick...
153-
linename = "{Species}{Resolved QNs}".format(**dict(zip(row.colnames,row.data)))
155+
156+
# Write the cube with the specified line name
157+
fmt = "{Species}{Resolved QNs}"
158+
linename = fmt.format(**dict(zip(row.colnames,row.data)))
154159
vcube.write('M83_ALMA_{linename}.fits'.format(linename=linename))

0 commit comments

Comments
 (0)