Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion pypeit/core/wavecal/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ def main(flg):
pass
# Keck KCRM
if flg & (2**36):
# RM1
dirc = template_path / 'KCWI' / 'RM1'
infiles = [dirc / 'keck_kcrm_rm1_lcen6230.fits',dirc / 'keck_kcrm_rm1_lcen7010.fits']
outroot = 'keck_kcrm_RM1.fits'
Expand All @@ -914,7 +915,17 @@ def main(flg):
lcut = [6910.0]
build_template(infiles, slits, lcut, binspec, outroot, scalespec=True, scalevals=scalevals,
binning=binning, reid_files=True, shift_wave=True, chk=True)

# RH3
dirc = template_path / 'KCWI' / 'RH3'
infiles = [dirc / 'keck_kcrm_rh3_lcen8550.fits',dirc / 'keck_kcrm_rh3_lcen9010_coadd.fits']
outroot = 'keck_kcrm_RH3.fits'
slits = [0, 0]
binspec = 1 # Desired binning
binning = [2, 2] # Spectral binning of each infile
scalevals = [1.0, 11.0] # Scale the second spectrum to match the first
lcut = [8920.0]
build_template(infiles, slits, lcut, binspec, outroot, scalespec=True, scalevals=scalevals,
binning=binning, reid_files=True, shift_wave=True, chk=True)

# Command line execution
if __name__ == '__main__':
Expand Down
Binary file modified pypeit/data/arc_lines/reid_arxiv/keck_kcrm_RH3.fits
Binary file not shown.
8 changes: 6 additions & 2 deletions pypeit/par/pypeitpar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2893,7 +2893,7 @@ def __init__(self, reference=None, method=None, echelle=None, ech_nspec_coeff=No
reid_arxiv=None, nreid_min=None, reid_cont_sub=None, cc_shift_range=None, cc_thresh=None,
cc_local_thresh=None, nlocal_cc=None, rms_thresh_frac_fwhm=None, match_toler=None, func=None,
n_first=None, n_final=None, sigrej_first=None, sigrej_final=None, numsearch=None,
nfitpix=None, refframe=None,
nfitpix=None, boxcar_radius=None, refframe=None,
nsnippet=None, use_instr_flag=None, wvrng_arxiv=None,
ech_2dfit=None, ech_separate_2d=None, redo_slits=None, qa_log=None,
cc_percent_ceil=None, echelle_pad=None, cc_offset_minmax=None, stretch_func=None):
Expand Down Expand Up @@ -3170,6 +3170,10 @@ def __init__(self, reference=None, method=None, echelle=None, ech_nspec_coeff=No
descr['nfitpix'] = 'Number of pixels to fit when deriving the centroid of the arc ' \
'lines (an odd number is best)'

defaults['boxcar_radius'] = 3
dtypes['boxcar_radius'] = int
descr['boxcar_radius'] = 'Boxcar radius when extracting the arc spectrum'

# TODO: What should the default be? None or 'heliocentric'?
defaults['refframe'] = 'heliocentric'
options['refframe'] = WavelengthSolutionPar.valid_reference_frames()
Expand Down Expand Up @@ -3234,7 +3238,7 @@ def from_dict(cls, cfg):
'lamps', 'sigdetect', 'fwhm', 'fwhm_fromlines', 'fwhm_spat_order', 'fwhm_spec_order',
'reid_arxiv', 'nreid_min', 'reid_cont_sub', 'cc_shift_range', 'cc_thresh', 'cc_local_thresh',
'nlocal_cc', 'rms_thresh_frac_fwhm', 'match_toler', 'func', 'n_first','n_final',
'sigrej_first', 'sigrej_final', 'numsearch', 'nfitpix',
'sigrej_first', 'sigrej_final', 'numsearch', 'nfitpix', 'boxcar_radius',
'refframe', 'nsnippet', 'use_instr_flag', 'wvrng_arxiv',
'redo_slits', 'qa_log', 'cc_percent_ceil', 'echelle_pad', 'cc_offset_minmax', 'stretch_func']

Expand Down
2 changes: 1 addition & 1 deletion pypeit/wavecalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ def extract_arcs(self, slitIDs=None):
arccen, arccen_bpm, arc_maskslit = arc.get_censpec(
self.slitcen, self.slitmask, self.msarc.image,
gpm=self.gpm, slit_bpm=self.wvc_bpm,
slitIDs=slitIDs)
slitIDs=slitIDs, box_rad=self.par['boxcar_radius'])
# Step
self.steps.append(inspect.stack()[0][3])

Expand Down
Loading