Skip to content

Add slicing to CentroidResidualsLite and add tests#36

Open
taldcroft wants to merge 4 commits intomainfrom
centroid-residuals-lite-slice
Open

Add slicing to CentroidResidualsLite and add tests#36
taldcroft wants to merge 4 commits intomainfrom
centroid-residuals-lite-slice

Conversation

@taldcroft
Copy link
Copy Markdown
Member

@taldcroft taldcroft commented May 6, 2026

Description

This makes it a bit easier to use centroid residuals from the centroids dashboard by allowing relative-time based slicing as well as normal getitem functionality. It also adds some tests.

Requires

Interface impacts

  • Adds slicing and indexing to CentroidResidualsLite

Testing

Unit tests

  • Mac
(ska3) ➜  ska_trend git:(centroid-residuals-lite-slice) git rev-parse --short HEAD
0ade2a0
(ska3) ➜  ska_trend git:(centroid-residuals-lite-slice) env PYTHONPATH=/Users/aldcroft/git/kadi pytest
===================================== test session starts =====================================
platform darwin -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/aldcroft/git
configfile: pytest.ini
plugins: anyio-4.12.1, timeout-2.4.0
collected 6 items                                                                             

ska_trend/centroid_dashboard/tests/test_app.py ......                                   [100%]

====================================== 6 passed in 3.37s ======================================

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

No functional testing.

@taldcroft taldcroft changed the title Add slicing to CentroidResidualsLite and tests Add slicing to CentroidResidualsLite and add tests May 6, 2026
@taldcroft taldcroft requested review from javierggt and jeanconn May 6, 2026 15:25
Copy link
Copy Markdown
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

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

This comment looks stale to me and it won't let me do an in-line comment ...

Munge the yag/zag data type and trim by duration if requested.

@taldcroft
Copy link
Copy Markdown
Member Author

Fixed the "munge" comment.

Copy link
Copy Markdown
Contributor

@jeanconn jeanconn left a comment

Choose a reason for hiding this comment

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

For this application I think this slicing code is OK, but if we start using this other places it may need more review.

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