diff --git a/doc/releases/1.15.1dev.rst b/doc/releases/1.15.1dev.rst index 0e241e1963..818353c391 100644 --- a/doc/releases/1.15.1dev.rst +++ b/doc/releases/1.15.1dev.rst @@ -58,3 +58,5 @@ Bug Fixes directly a sky spectrum. This fixes a bug in the flexure correction for SlicerIFU. - The `--show` option of the `pypeit_coadd_1dspec` script was not properly displaying the x-axis of the plot. Both the top and bottom panels now scale together. +- Fix a bug in `pypeit_sensfunc` that was causing the script to crash because `par['fluxcalib']` + was not being passed to `sensfunc.SensFunc.get_instance()`. diff --git a/pypeit/scripts/sensfunc.py b/pypeit/scripts/sensfunc.py index bc4406711c..078500751b 100644 --- a/pypeit/scripts/sensfunc.py +++ b/pypeit/scripts/sensfunc.py @@ -142,7 +142,7 @@ def main(args): par = pypeitpar.PypeItPar.from_cfg_lines(cfg_lines=spectrograph_config_par.to_config(), merge_with=(sensFile.cfg_lines,)) else: - par = spectrograph_config_par + par = pypeitpar.PypeItPar.from_cfg_lines(cfg_lines=spectrograph_config_par.to_config()) # If algorithm was provided override defaults. Note this does undo .sens # file since they cannot both be passed @@ -179,7 +179,7 @@ def main(args): if args.outfile is None else args.outfile # Instantiate the relevant class for the requested algorithm sensobj = sensfunc.SensFunc.get_instance(args.spec1dfile, outfile, par['sensfunc'], - debug=args.debug, + par_fluxcalib=par['fluxcalib'], debug=args.debug, chk_version=par['rdx']['chk_version']) # Generate the sensfunc sensobj.run()