Skip to content

Commit

Permalink
add link to redrock file used
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed May 23, 2024
1 parent 4611b33 commit f6f7b3b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions py/rvspecfit/desi/desi_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def get_zbest_fname(fname):
def get_prim_header(versions={},
config=None,
cmdline=None,
spectrum_header=None):
spectrum_header=None,
zbest_path=None):
""" Return the Primary HDU with various info in the header
"""
Expand All @@ -113,7 +114,7 @@ def get_prim_header(versions={},
header['RVS_CONF'] = config['config_file_path']
if cmdline is not None:
header['RVS_CMD'] = cmdline

header['RR_FILE'] = (zbest_path or '', 'Redrock redshift file')
# keywords to copy from the header of the spectrum
copy_keys = [
'SPGRP', 'SPGRPVAL', 'TILEID', 'SPECTRO', 'PETAL', 'NIGHT', 'EXPID',
Expand Down Expand Up @@ -935,7 +936,8 @@ def proc_desi(fname,
header=get_prim_header(versions=versions,
config=config,
cmdline=cmdline,
spectrum_header=spectrum_header))
spectrum_header=spectrum_header,
zbest_path=zbest_path))
]

for curs in setups:
Expand All @@ -951,8 +953,10 @@ def proc_desi(fname,

assert (len(fibermap_subset_hdu.data) == len(outtab))
outtab_hdus = [
pyfits.PrimaryHDU(header=get_prim_header(
versions=versions, config=config, cmdline=cmdline)),
pyfits.PrimaryHDU(header=get_prim_header(versions=versions,
config=config,
cmdline=cmdline,
zbest_path=zbest_path)),
comment_filler(pyfits.BinTableHDU(outtab, name='RVTAB'), columnDesc),
fibermap_subset_hdu, scores_subset_hdu
]
Expand Down

0 comments on commit f6f7b3b

Please sign in to comment.