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

Implement 2D sky subtraction using bivariate splines #193

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tepickering
Copy link
Contributor

This PR implements the Kelson (2003) technique for subtracting the sky background from 2D spectra without the need for rectification or interpolation.

@tepickering tepickering marked this pull request as draft November 15, 2023 18:51
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aea9d50) 81.56% compared to head (4441b8d) 81.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
+ Coverage   81.56%   81.61%   +0.05%     
==========================================
  Files          10       10              
  Lines         998     1001       +3     
==========================================
+ Hits          814      817       +3     
  Misses        184      184              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chris-simpson
Copy link

I really don't think this is an implementation of Kelson's method. You're fitting the BivariateSpline as a function of IMAGE pixel coordinates

spline_fit = LSQBivariateSpline(x.ravel(), y.ravel(), ...)

whereas Kelson says the spline should be fit as a function of x_r and y_r (page 694), coordinates which are orthogonal and aligned with the spatial and dispersion axes, using the known transformation from measuring the distortion from arc lamps or sky lines (page 691).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants