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

creating new branch for PCA telluric corrections #131

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
7 changes: 7 additions & 0 deletions src/muler/hpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
static_telfit_file = files(templates).joinpath("telfit_HPFtemplate_temp286_hum050.csv")
STATIC_TELFIT_DATAFRAME = pd.read_csv(static_telfit_file)

# PCATelluric template
static_pcatel_file = files(templates).joinpath("hpf_pca_telluric.fits")
STATIC_PCATEL_FITSFRAME = fits.open(static_pcatel_file)


class HPFSpectrum(EchelleSpectrum):
r"""
Expand Down Expand Up @@ -340,6 +344,9 @@ def sky_subtract(self, method="scalar"):
sky_estimator = spec.sky.multiply(beta, handle_meta="first_found")
return spec.subtract(sky_estimator, handle_meta="first_found")

def estimate_telluric(self):
pass

def mask_tellurics(self, method="TelFit", threshold=0.999, dilation=5):
"""Mask known telluric lines based on a static TelFit template or heuristics

Expand Down
Binary file added src/muler/templates/hpf_pca_telluric.fits
Binary file not shown.