Skip to content

Time-based interpolation of UVCal calibration tables - #1691

Open
kartographer wants to merge 8 commits into
mainfrom
uvcal_interp
Open

Time-based interpolation of UVCal calibration tables#1691
kartographer wants to merge 8 commits into
mainfrom
uvcal_interp

Conversation

@kartographer

Copy link
Copy Markdown
Contributor

Description

A new method has been added to UVCal (interpolate_in_time) that allows for calibration tables to be "upsampled", effectively allowing gains/delay measurements taken at one set of times to be interpolated/extrapolated to another set of times. Code associated with performing the interpolations has also been added to a new module, utils.gain_interpolation, which supports several different interpolation schemes, including nearest, linear, and cubic (PCHIP) interpolation strategies. An additional strategy -- "poly" -- allows for fitting the calibration solution with a variable-order Chebyshev polynomial and then performing interpolation/extrapolation using the fitted polynomial.

A separate small change has been made to uvcalibrate, which also allows users to reweight nsamples_array based on the amplitude calibration being applied to data_array.

Motivation and Context

Higher frequency interferometers like the SMA frequently interleave observations of science targets with observations of bright quasars (or other point sources) that can act as gain calibrators for the data. Because those observations are disjoint in time with the observations of the "source", interpolation between the derived gain solutions is typically used to derive effective gains corrections during science target observations. This PR effectively provides that functionality, allowing uvcalibrate to be used for SMA observations (among other facilities) .

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

New feature checklist:

  • I have added or updated the docstrings associated with my feature using the numpy docstring format.
  • I have updated the tutorial to highlight my new feature (if appropriate).
  • I have added/updated tests to cover my new feature.
  • I have updated the CHANGELOG.

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.94%. Comparing base (ca00b92) to head (35ffcaf).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1691    +/-   ##
========================================
  Coverage   99.93%   99.94%            
========================================
  Files          67       68     +1     
  Lines       22983    23401   +418     
========================================
+ Hits        22969    23387   +418     
  Misses         14       14            

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant