Skip to content

Phase wraps - #110

Open
r-pascua wants to merge 9 commits into
mainfrom
phase_wraps
Open

Phase wraps#110
r-pascua wants to merge 9 commits into
mainfrom
phase_wraps

Conversation

@r-pascua

Copy link
Copy Markdown
Contributor

This PR fixes a silent bug in plot.labeled_waterfall: prior to this update, the LST axis ticklabels were incorrect when the provided LSTs were wrapped. For example, if the LST array started at 23 hours and ended at 5 hours, then the plotting function would have listed the LST values as ranging from 5 hours to 23 hours, rather than wrapping from 23 hours to 5 hours--this update fixes that problem.

r-pascua and others added 9 commits January 11, 2021 16:51
The code in plot.labeled_waterfall was updated to ensure that
phase-wrapped LSTs are labeled correctly and was implemented in a way
such that Fourier modes are still plotted symmetrically without issue.
These updates should remove the issues that cropped up with the previous
implementation.
The note added is a brief discussion on subtle, seemingly buggy,
behavior around plotting data with phase wrapped LSTs. It provides tips
to users who may not be very familiar with UVData objects and the issue
of appropriately extracting unique phase-wrapped LSTs without messing up
the ordering of the LST array.
@codecov

codecov Bot commented Apr 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.84%. Comparing base (d46d841) to head (f893de3).

Files with missing lines Patch % Lines
uvtools/plot.py 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   62.55%   61.84%   -0.72%     
==========================================
  Files           5        5              
  Lines        1469     1486      +17     
==========================================
  Hits          919      919              
- Misses        550      567      +17     
Flag Coverage Δ
unittests 61.84% <0.00%> (-0.72%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@steven-murray steven-murray left a comment

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.

Thanks @r-pascua, maybe we should get this merged 😆

Comment thread uvtools/plot.py
vmin=None,
vmax=None,
dynamic_range=None,
Nticks=6,

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.

Let's try to use standard python formatting for variables

Suggested change
Nticks=6,
n_ticks=6,

Comment thread uvtools/plot.py
raise TypeError("array-like data must consist of complex numbers.")
if data.ndim != 2 or (data.ndim == 2 and 1 in data.shape):
raise ValueError("array-like data must be 2-dimensional.")
if type(Nticks) is not int:

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.

Suggested change
if type(Nticks) is not int:
if not isinstance(n_ticks, int):

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