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

Add fast_concat, generic read, and from_file methods to UVCal #1271

Merged
merged 5 commits into from
Apr 24, 2023

Conversation

bhazelton
Copy link
Member

@bhazelton bhazelton commented Mar 14, 2023

Description

Adds the following methods to UVCal:

  • fast_concat, similar to the one on UVData.
  • read, a method that is generic across input file types.
  • from_file, a class method that allows one-line UVCal object creation from a file.

Also deprecates reading multiple files in using file-specific reads (e.g. read_calfits) because the handling of combining the objects from multiple files now resides in the generic read method for less code replication and better maintainability.

Motivation and Context

closes #1169

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change (documentation changes only)
  • Version change
  • Build or continuous integration change

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 tests to cover my new feature.
  • All new and existing tests pass.
  • I have updated the CHANGELOG.

@bhazelton bhazelton added enhancement Calibration HERA Things needed to support HERA development. labels Mar 14, 2023
@bhazelton bhazelton changed the title Add fast_concat, generic read from_file methods to UVCal Add fast_concat, generic read, and from_file methods to UVCal Mar 14, 2023
@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #1271 (8671c7b) into main (4f873aa) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #1271    +/-   ##
========================================
  Coverage   99.91%   99.91%            
========================================
  Files          33       33            
  Lines       19459    19732   +273     
========================================
+ Hits        19443    19716   +273     
  Misses         16       16            
Impacted Files Coverage Δ
pyuvdata/uvcal/uvcal.py 100.00% <100.00%> (ø)
pyuvdata/uvdata/uvdata.py 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f873aa...8671c7b. Read the comment docs.

@bhazelton bhazelton force-pushed the uvcal_fast_concat branch 4 times, most recently from 9175258 to 746cd11 Compare March 17, 2023 18:32
@bhazelton bhazelton force-pushed the uvcal_fast_concat branch 2 times, most recently from f6ae4f1 to a1df75d Compare March 22, 2023 21:02
@bhazelton bhazelton requested a review from plaplant April 6, 2023 17:09
Copy link
Member

@plaplant plaplant left a comment

Choose a reason for hiding this comment

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

Thanks @bhazelton! This is excellent and add lots of nice functionality. Just a few small questions/comments.

pyuvdata/uvcal/uvcal.py Show resolved Hide resolved
pyuvdata/uvcal/uvcal.py Show resolved Hide resolved
pyuvdata/uvcal/uvcal.py Show resolved Hide resolved
pyuvdata/uvcal/uvcal.py Show resolved Hide resolved
pyuvdata/uvcal/uvcal.py Show resolved Hide resolved
Copy link
Member

@plaplant plaplant left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @bhazelton!

@plaplant plaplant merged commit 450b5b8 into main Apr 24, 2023
@plaplant plaplant deleted the uvcal_fast_concat branch April 24, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Calibration enhancement HERA Things needed to support HERA development.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a fast_concat method for UVCal
2 participants