Skip to content

Various fixes#71

Merged
bhazelton merged 21 commits intomainfrom
various_fixes
Mar 31, 2026
Merged

Various fixes#71
bhazelton merged 21 commits intomainfrom
various_fixes

Conversation

@bhazelton
Copy link
Copy Markdown
Member

@bhazelton bhazelton commented Oct 22, 2025

Various fixes

This collects a number of bug fixes plus a few doc fixes for things I stumbled on trying to get data through.

fixes #59
fixes #63
fixes #66

progress on #70, but issues remain.

Types of Changes

  • Bug Fixes
  • New Feature(s)
  • Breaking Changes
  • Documentation
  • Version Change
  • Translation from FHD
  • Build or CI Change

Changelog

Bug Fixes

  • Fixed errors when using ~ in file paths to indicate a user's home directory.
  • Fixed a bug that causes errors on current versions of numpy in calibration_utils.py
  • Fixed erroneous assumptions of RA/Dec keywords in uvfits.py. This is not really a full fix, but it got me over the problem. There are still lurking issues around handling of telescope locations.
  • Fixed checkpointing. It was completely broken because it was trying to read data in from a boolean value.
  • Fixed vis_model_transfer.py to handle the standard FHD folder layout.
  • Fixed a misspelled option in the example yamls (and therefore the tutorial) for calibration checkpointing.
  • Fixed a shape error in calibration_utils that occurs when flagging is present.
  • Fixed a KeyError caused by failing to check for key existence
  • Fixed an error in image plotting that caused a variable not to be defined.
  • Fixed a KeyError and numpy indexing errors in beam_image
  • Fixed defaulting of baseline_threshold in dirty_image_generate.

General PR Checklist

  • I have the read the contribution guide
  • Add all the above to the Changelog into the unreleased section

Existing Tests Checklist

  • If some tests fail and they are meant to, have they been changed? if so mention the exact tests that were changed and why here
  • Have the changes to existing tests been documented either through comments, changes to the docstring in ether the test or the associated functions?

Bug Fixes Checklist

  • Added all bug fixes with any issues associated with them linked.
  • Added new tests to cover bugs
  • Adjusted existing tests to cover bug, in which case check the Existing Tests Checklist

Documentation Checklist

  • The documentation is able to build successfully with any new changes and they are visible in your own build

@bhazelton bhazelton added the bug Something isn't working label Oct 22, 2025
@bhazelton bhazelton mentioned this pull request Oct 22, 2025
28 tasks
@bhazelton bhazelton force-pushed the various_fixes branch 2 times, most recently from 8f6af9b to fab41eb Compare October 28, 2025 21:10
pyfhd_header["frequency_array"] = (
np.arange(pyfhd_header["n_freq"]) - freq_ref_i
) * pyfhd_header["freq_res"] + pyfhd_header["freq_ref"]
# the following is guaranteed from the uvfits memo, logic stolen from pyuvdata
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth linking the memo here for the uninitiated? Or putting it in the repo somewhere

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added information about how to find it either in the pyuvdata repo or on the NRAO website

if vis_model_arr is not None:
model_uv = crosspol_reformat(model_uv)
if pyfhd_config["gridding_plots"]:
# TODO: move this after the checkpointing so an error in plotting
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhh agreed.

@bhazelton bhazelton marked this pull request as ready for review March 10, 2026 00:07
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 11.26761% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.74%. Comparing base (a0cea8d) to head (0266cb6).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
PyFHD/pyfhd.py 0.00% 33 Missing ⚠️
PyFHD/beam_setup/beam_utils.py 0.00% 8 Missing ⚠️
PyFHD/data_setup/uvfits.py 36.36% 4 Missing and 3 partials ⚠️
PyFHD/source_modeling/vis_model_transfer.py 0.00% 7 Missing ⚠️
PyFHD/pyfhd_tools/pyfhd_setup.py 44.44% 2 Missing and 3 partials ⚠️
PyFHD/calibration/calibration_utils.py 0.00% 2 Missing ⚠️
PyFHD/plotting/image.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   32.86%   32.74%   -0.13%     
==========================================
  Files          27       27              
  Lines        5501     5540      +39     
  Branches     1002     1012      +10     
==========================================
+ Hits         1808     1814       +6     
- Misses       3496     3525      +29     
- Partials      197      201       +4     

☔ View full report in Codecov by Sentry.
📢 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.

@bhazelton bhazelton merged commit 4c11ade into main Mar 31, 2026
20 of 22 checks passed
@bhazelton bhazelton deleted the various_fixes branch March 31, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need documentation on how to use the checkpointing options calibration-checkpoint vs calibrate-checkpoint None vs ~

2 participants