Skip to content

Commit f693897

Browse files
authored
Merge pull request #2079 from pypeit/APF_tweaks
APF tweaks
2 parents 937fa87 + 428ebb8 commit f693897

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

pypeit/calibrations.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,16 +1600,18 @@ def get_association(fitstbl, spectrograph, caldir, setup, calib_ID, det, must_ex
16001600

16011601
# Iterate through each frame type and add the raw and processed
16021602
# calibration frames
1603+
16031604
for frametype, calib_classes in frame_calibrations.items():
16041605
indx = fitstbl.find_frames(frametype) & in_grp
16051606
if not any(indx):
16061607
continue
16071608
if not (all(fitstbl['calib'][indx] == fitstbl['calib'][indx][0]) or
16081609
all([fitstbl['calib'][indx][0] in cc.split(',') for cc in fitstbl['calib'][indx]])):
1609-
raise PypeItError(f'CODING ERROR: All {frametype} frames in group {calib_ID} '
1610-
'are not all associated with the same subset of calibration '
1611-
'groups; calib for the first file is '
1612-
f'{fitstbl["calib"][indx][0]}.')
1610+
log_str = f'All {frametype} frames in group {calib_ID} '
1611+
log_str += 'are not all associated with the same subset of calibration '
1612+
log_str += 'groups; calib for the first file is '
1613+
log_str += f'{fitstbl["calib"][indx][0]}.'
1614+
log.warning(log_str)
16131615
calib_key = CalibFrame.construct_calib_key(setup, fitstbl['calib'][indx][0], detname)
16141616
asn[frametype] = {}
16151617
asn[frametype]['raw'] = fitstbl.frame_paths(indx)

pypeit/spectrographs/apf_levy.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from pypeit import PypeItError
1717
from pypeit import telescopes
1818
from pypeit import io
19+
from pypeit import par
1920
from pypeit.core import framematch
2021
from pypeit.par import parset
2122
from pypeit.spectrographs import spectrograph
@@ -73,11 +74,12 @@ def default_pypeit_par(cls):
7374
par['calibrations']['wavelengths']['ech_nspec_coeff'] = 4
7475
par['calibrations']['wavelengths']['ech_norder_coeff'] = 4
7576
par['calibrations']['wavelengths']['ech_sigrej'] = 3.0
76-
77+
7778
par['calibrations']['flatfield']['slit_illum_finecorr'] = False
7879
par['calibrations']['flatfield']['tweak_slits'] = False
7980
par['calibrations']['flatfield']['spat_samp'] = 0.7
80-
par['calibrations']['flatfield']['slit_trim'] = 0
81+
# this is for the 8" decker
82+
par['calibrations']['flatfield']['slit_trim'] = 3
8183

8284

8385
# Processing steps
@@ -90,7 +92,7 @@ def default_pypeit_par(cls):
9092

9193
# no sky subtraction on standard stars
9294
par['reduce']['skysub']['global_sky_std'] = False
93-
95+
par['reduce']['skysub']['no_local_sky'] = True
9496
# skip sky subtraction when searching for objects
9597
# this is because the sky subtraction is not very good with narrow
9698
# slits and the usual APF target is bright
@@ -378,11 +380,13 @@ def config_specific_par(
378380
par['reduce']['findobj']['find_trim_edge'] = [0, 0]
379381
par['calibrations']['slitedges']['pad'] = 5
380382
par['reduce']['extraction']['sn_gauss'] = 400
383+
par['calibrations']['flatfield']['slit_trim'] = 0
381384
# basically always use the Gaussian model for optimal extraction
382385

383386
if binning == "2,2":
384387
par['calibrations']['slitedges']['min_edge_side_sep'] = 2.0
385388
par['calibrations']['slitedges']['pad'] = 2
389+
par['calibrations']['flatfield']['slit_trim'] = 1
386390
par['reduce']['skysub']['no_local_sky'] = True
387391
par['reduce']['extraction']['sn_gauss'] = 400
388392
par['reduce']['extraction']['model_full_slit'] = True

0 commit comments

Comments
 (0)