@@ -450,7 +450,7 @@ def make_mom1(source, src_basename, cube_params, patch, opt_head, opt_view, base
450
450
# Convert moment map from Hz into units of km/s
451
451
452
452
if line ['rad_opt' ] == 'Radio' :
453
- print ("\t WARNING: Velocity dispersion calculated in source rest frame because 'radio velocity' convention has no physical meaning." )
453
+ print ("\t WARNING: Velocity calculated in source rest frame because 'radio velocity' convention has no physical meaning." )
454
454
mom1 [0 ].data = (const .c * (source ['freq' ] - mom1 [0 ].data )/ source ['freq' ]).to (u .km / u .s ).value
455
455
# Calculate spectral quantities for plotting
456
456
v_sys = (source ['freq' ] * u .Hz ).to (u .km / u .s , equivalencies = line ['convention' ]).value
@@ -463,8 +463,8 @@ def make_mom1(source, src_basename, cube_params, patch, opt_head, opt_view, base
463
463
elif sofia == 1 :
464
464
freqmin = chan2freq (source ['z_min' ], src_basename + '.fits' ).to (u .Hz ).value
465
465
freqmax = chan2freq (source ['z_max' ], src_basename + '.fits' ).to (u .Hz ).value
466
- velmax = (const .c * (freqmin - source ['freq' ])/ source ['freq' ]).to (u .km / u .s ).value
467
- velmin = (const .c * (freqmax - source ['freq' ])/ source ['freq' ]).to (u .km / u .s ).value
466
+ velmax = (const .c * (source ['freq' ] - freqmin )/ source ['freq' ]).to (u .km / u .s ).value
467
+ velmin = (const .c * (source ['freq' ] - freqmax )/ source ['freq' ]).to (u .km / u .s ).value
468
468
cbar_label = "Rest Frame Velocity [km/s]"
469
469
else :
470
470
print ("\t WARNING: Input cube is in velocity units--no correction to source rest frame velocity has been applied!" )
@@ -915,8 +915,8 @@ def make_pv(source, src_basename, cube_params, opt_view=6*u.arcmin, spec_line=No
915
915
ax1 .set_ylabel ('Frequency [GHz]' , fontsize = 22 )
916
916
ax1 .coords [1 ].set_format_unit (u .GHz )
917
917
ax2 = ax1 .twinx ()
918
- vel1 = (const .c * (freq1 - source ['freq' ])/ source ['freq' ]).to (u .km / u .s ).value
919
- vel2 = (const .c * (freq2 - source ['freq' ])/ source ['freq' ]).to (u .km / u .s ).value
918
+ vel1 = (const .c * (source ['freq' ] - freq1 )/ source ['freq' ]).to (u .km / u .s ).value
919
+ vel2 = (const .c * (source ['freq' ] - freq2 )/ source ['freq' ]).to (u .km / u .s ).value
920
920
ax2 .set_ylim (vel1 , vel2 )
921
921
ax2 .set_ylabel ('Rest Frame Velocity [km/s]' , fontsize = 22 )
922
922
ax2 .tick_params (labelsize = 22 )
0 commit comments