Skip to content

Add optional EB alignment prior to self-calibration#110

Open
psheehan wants to merge 43 commits intojjtobin:mainfrom
psheehan:make_pip_installable+EB_alignment
Open

Add optional EB alignment prior to self-calibration#110
psheehan wants to merge 43 commits intojjtobin:mainfrom
psheehan:make_pip_installable+EB_alignment

Conversation

@psheehan
Copy link
Collaborator

This PR adds the optional ability to align EBs with a visibility based alignment. This is currently only allowed for single fields, as more thought may be needed as to how to manage this for mosaics.

Two decisions/updates need to be made before this is ready to be merged:

  1. What tests should we add? I'm somewhat inclined to just set align_EBs=True in the GitHub tests. I think only the Band8-7m-2 dataset fits the bill of a non-mosaic with multiple EBs, so we would only expect one test to change. But I need to evaluate how the change impacts the data. Which brings me to:
  2. I think we should add some sort of weblog. I think what we want will be the before and after images for each EB as well as for the combined image. @jjtobin, since you've done most of the weblog work, do you have any thoughts on how this should go in? On the main page? Make a new sub-page? Other stats we may want to show?

…me updates to make this happen:

- Correcting data types in a few places
- Specify the grid in pixel space and then multiply by du and dv to avoid rounding errors leading to inconsistencies in specified grid size
- Supply target to find_offset in main call.
- Make suffix a specifiable value and set to '' for .selfcal.ms files so that they are edited in-place
…e and update the applycal and uvcontsub scripts to work on this .shift.ms file. This includes a change that if update_phase_center finds that the vis+suffix ms file already exists (e.g. multiple sources), then update the current source on that file in-place.
…a, including:

- Better calibration/combination of weights
- Add a prior of a zero offset with a ~5% beam width uncertainty
- Fit using MCMC (or Nested Sampling)
- Also make a map of the log likelihood
- Make before and after images of each individual EB.
- Switch to fitting phase differences between EBs
- Properly calibrate data weights
- More accurately calculate phase uncertainties
- Make inclusion of residual phase errors after gaincal optional
- Remove the need for the directory of the caltables as it is not used anymore
…of the image, as estimated by the visibility data.
@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 72.79693% with 142 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
auto_selfcal/alignment_helpers.py 67.17% 129 Missing ⚠️
auto_selfcal/original_ms_helpers.py 44.44% 5 Missing ⚠️
auto_selfcal/auto_selfcal.py 91.11% 4 Missing ⚠️
auto_selfcal/__main__.py 0.00% 2 Missing ⚠️
auto_selfcal/selfcal_helpers.py 81.81% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
auto_selfcal/tests/test_auto_selfcal.py 65.30% <100.00%> (ø)
auto_selfcal/weblog_creation.py 90.66% <100.00%> (+1.12%) ⬆️
auto_selfcal/__main__.py 0.00% <0.00%> (ø)
auto_selfcal/selfcal_helpers.py 65.85% <81.81%> (+0.02%) ⬆️
auto_selfcal/auto_selfcal.py 57.10% <91.11%> (+4.47%) ⬆️
auto_selfcal/original_ms_helpers.py 66.08% <44.44%> (ø)
auto_selfcal/alignment_helpers.py 67.17% <67.17%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@psheehan
Copy link
Collaborator Author

Note following discussion with @jjtobin - add shift to one EB of the Band8-7m-2 test to test that EB alignment gets the correct answer.

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.

2 participants