diff --git a/py/rvspecfit/desi/desi_fit.py b/py/rvspecfit/desi/desi_fit.py index 9754e3c..72232f6 100644 --- a/py/rvspecfit/desi/desi_fit.py +++ b/py/rvspecfit/desi/desi_fit.py @@ -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 """ @@ -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', @@ -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: @@ -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 ] diff --git a/py/rvspecfit/vel_fit.py b/py/rvspecfit/vel_fit.py index 1f8d25f..a0a9c52 100644 --- a/py/rvspecfit/vel_fit.py +++ b/py/rvspecfit/vel_fit.py @@ -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: