Skip to content

Commit

Permalink
Merge branch 'kcwi_cube_updates' into cube_tweakedge
Browse files Browse the repository at this point in the history
# Conflicts:
#	doc/releases/1.15.1dev.rst
  • Loading branch information
rcooke-ast committed Apr 12, 2024
2 parents fe28589 + c1c1360 commit dc2b581
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions doc/releases/1.15.1dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ that need it; see new ``filter2`` parameter.
is generated using the A frame, while the existing `skymodel` is generated using the A-B frame.
This allows to have an actual 1D extracted sky spectrum and to perform the flexure correction for
`bkg_redux` reduction.

- Various improvements in the flexure correction and added the possibility to use a modeled archive
sky spectrum generated with `pypeit.wavemodel.nearIR_modelsky()` to perform the flexure correction.

Expand Down Expand Up @@ -57,8 +57,12 @@ Bug Fixes
produced error cubes that were not properly propagating the noise. The error cubes of the NGP
algorithm were unaffected. The error cubes are now regularly inspected with vet tests to ensure
the error cubes are reliable.
- Allow `spec_flex_shift()` to take as input either the name of an archive sky spectrum or
directly a sky spectrum. This fixes a bug in the flexure correction for SlicerIFU.
- Fix a bug (introduced in a recent PR) that was generating an error if less than 2 spec1d
files were used with `pypeit_coadd_1dspec`. Now the script can be run with only one
file (as it was before).
- Allow `spec_flex_shift()` to take as input either the name of an archive sky spectrum or
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()`.
2 changes: 1 addition & 1 deletion pypeit/core/coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ def coadd_qa(wave, flux, ivar, nused, gpm=None, tell=None,
# plot how may exposures you used at each pixel
# [left, bottom, width, height]
num_plot = fig.add_axes([0.10, 0.70, 0.80, 0.23])
spec_plot = fig.add_axes([0.10, 0.10, 0.80, 0.60])
spec_plot = fig.add_axes([0.10, 0.10, 0.80, 0.60], sharex=num_plot)
num_plot.plot(wave[wave_gpm],nused[wave_gpm],drawstyle='steps-mid',color='k',lw=2)
num_plot.set_xlim([wave_min, wave_max])
num_plot.set_ylim([0.0, np.fmax(1.1*nused.max(), nused.max()+1.0)])
Expand Down
4 changes: 2 additions & 2 deletions pypeit/scripts/sensfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,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
Expand Down Expand Up @@ -180,7 +180,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()
Expand Down

0 comments on commit dc2b581

Please sign in to comment.