From f85e42622bd5535431ae2a8caa4e0a6c757991a0 Mon Sep 17 00:00:00 2001 From: Debora Pelliccia Date: Mon, 8 Apr 2024 20:26:14 -1000 Subject: [PATCH 1/2] fix it --- pypeit/scripts/sensfunc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() From 51dda66d28c798d0e5faa99754e14c66f87d9eb8 Mon Sep 17 00:00:00 2001 From: Debora Pelliccia Date: Thu, 11 Apr 2024 14:41:27 -1000 Subject: [PATCH 2/2] add to changelog --- doc/releases/1.15.1dev.rst | 2 ++ 1 file changed, 2 insertions(+) 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()`.