Have cross-correlation resampling function use a more robust copying mechanism
- Dominant language
- Python
- Stars
- 204
- Forks
- 134
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
Description
This is a follow-on to #544 - in the cross-correlation functionality implemented there, there's need to copy a spectrum but with some modification. This is at the bottom of `template_logwl_resample`, after the comment that starts with "Resampler leaves Nans on flux bins that aren't touched by it."
The copying method here is not idea because it drops metadata, masks, etc. #605 is probably the way we want to solve this, so this issue is to fix the `template_logwl_resample` *after* #605 or similar is addressed.
Note an alternative fix *might* be to instead use the `extrapolation_treatment` keyword of the resamplers. I tried to do this but the tests started failing for reasons that were not clear. But then it's left to the resamplers themselves to do copying correctly.
Contributor guide
Research direction
Start at the bottom of template_logwl_resample, after the comment about resampler-created NaNs, and review issue #605 before changing the copying approach. Compare that option with the resamplers’ extrapolation_treatment behavior and run the existing tests that cover this function. Done means copying retains metadata and masks while the resampling tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100