Skip to content

Commit

Permalink
Change definition of speed of light
Browse files Browse the repository at this point in the history
  • Loading branch information
londumas committed Mar 23, 2019
1 parent 030a07f commit 86447fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion py/desitarget/QA.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
matplotlib.use('Agg')
import matplotlib.pyplot as plt # noqa: E402

try:
from scipy import constants
C_LIGHT = constants.c/1000.0
except TypeError: # This can happen during documentation builds.
C_LIGHT = 299792458.0/1000.0

# ADM set up the default logger from desiutil
log = get_logger()

Expand Down Expand Up @@ -1053,7 +1059,7 @@ def mock_qanz(cat, objtype, qadir='.', area=1.0, dndz=None, nobjscut=1000,
zmax = truez.max()*1.1

if 'STD' in objtype or 'MWS' in objtype or 'WD' in objtype:
truez *= 2.99e5 # [km/s]
truez *= C_LIGHT # [km/s]
zlabel = 'True Radial Velocity (km/s)'
else:
zlabel = r'True Redshift $z$'
Expand Down

0 comments on commit 86447fb

Please sign in to comment.