Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P200 DBSP misc updates #1849

Merged
merged 14 commits into from
Sep 9, 2024
19 changes: 18 additions & 1 deletion pypeit/core/wavecal/spectrographs/templ_p200_dbsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ def p200_dbsp_red_1200_9400_d55(overwrite=False): # DBSPr 1200/9400 D55
templates.build_template([wfile0], slits, lcut, binspec, outroot,
lowredux=False, ifiles=ifiles, normalize=True, overwrite=overwrite)

# ##############################
def p200_dbsp_red_1200_7100_d55(overwrite=False): # DBSPr 1200/7100 D55

binspec = 1
outroot = 'p200_dbsp_red_1200_7100_d55_6680.fits'
#
ifiles = [0]
slits = [55] # Be careful with the order..
lcut = None
wfile0 = os.path.join(templates.template_path, 'P200_DBSP',
'R1200_7100_D55', 'wvcalib_6680.fits')

#
templates.build_template([wfile0], slits, lcut, binspec, outroot,
lowredux=False, ifiles=ifiles, normalize=True, overwrite=overwrite)

# ##############################
def p200_dbsp_red_600_10000_d55(overwrite=False): # DBSPr 600/10000 D55

Expand Down Expand Up @@ -144,4 +160,5 @@ def p200_dbsp_blue_1200_5000_d68(overwrite=False): # DBSPb 1200/5000 D68
if __name__ == '__main__':
# p200_dbsp_red_316_7500_d55(overwrite=True)
# p200_dbsp_red_600_10000_d55(overwrite=True)
p200_dbsp_red_1200_7100_d68(overwrite=True)
# p200_dbsp_red_1200_7100_d68(overwrite=True)
p200_dbsp_red_1200_7100_d55(overwrite=True)
Binary file not shown.
2 changes: 1 addition & 1 deletion pypeit/scripts/cache_github_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def main(args):
files = np.array(contents[path])[to_download[path]]
if len(files) == 0:
continue
data_path = PypeItDataPath(path)
data_path = PypeItDataPath(path, remote_host="github")
# NOTE: I'm using POSIX path here because I'm unsure what will
# happen on Windows if the file is in a subdirectory.
root = pathlib.PurePosixPath(f'pypeit/data/{path}')
Expand Down
7 changes: 7 additions & 0 deletions pypeit/spectrographs/p200_dbsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pypeit.spectrographs import spectrograph
from pypeit.core import parse
from pypeit.images import detector_container
from pypeit.spectrographs.ldt_deveny import LDTDeVenySpectrograph


def flip_fits_slice(s: str) -> str:
Expand Down Expand Up @@ -168,6 +169,9 @@ def check_frame_type(self, ftype, fitstbl, exprng=None):
return good_exp & (fitstbl['lampstat01'] != '0000000') & (fitstbl['idname'] == 'cal')
msgs.warn('Cannot determine if frames are of type {0}.'.format(ftype))
return np.zeros(len(fitstbl), dtype=bool)

def get_rawimage(self, raw_file, det):
return LDTDeVenySpectrograph.get_rawimage(self, raw_file, det)


class P200DBSPBlueSpectrograph(P200DBSPSpectrograph):
Expand Down Expand Up @@ -575,6 +579,9 @@ def config_specific_par(self, scifile, inp_par=None):
'D68': {
7600: 'p200_dbsp_red_1200_7100_d68.fits',
8200: 'p200_dbsp_red_1200_7100_d68.fits'
},
'D55': {
6680: 'p200_dbsp_red_1200_7100_d55_6680.fits'
}
},
'1200/9400': {
Expand Down
Loading