Skip to content

Commit

Permalink
Merge branch 'master' of github.com:segasai/rvspecfit
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed May 24, 2024
2 parents 47ad4b9 + f6f7b3b commit c81c6cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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 @@ -939,7 +940,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 @@ -955,8 +957,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
2 changes: 1 addition & 1 deletion py/rvspecfit/vel_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def hess_func_wrap(p):
'teff': 10,
'vrad': 1,
}[_] for _ in specParamNames]
hess_step = ndf.MinStepGenerator(base_step=hess_step, step_ratio=10)
hess_step = ndf.MaxStepGenerator(base_step=hess_step)
hessian = ndf.Hessian(hess_func_wrap, step=hess_step)(
[ret['param'][_] for _ in specParamNames])
try:
Expand Down

0 comments on commit c81c6cf

Please sign in to comment.