Skip to content

Support integer types in flag arrays#475

Merged
Jan-Willem merged 6 commits intocasangi:mainfrom
sjperkins:support-integer-flag-arrays
Sep 12, 2025
Merged

Support integer types in flag arrays#475
Jan-Willem merged 6 commits intocasangi:mainfrom
sjperkins:support-integer-flag-arrays

Conversation

@sjperkins
Copy link
Copy Markdown
Collaborator

@sjperkins sjperkins commented Sep 3, 2025

If I recall correctly integer FLAGs were an SKAO use case whereby different bits represented different flag categories. This is somewhat analagous to MSv2 FLAG_CATEGORY.

Signed integer types didn't seem appropriate so they have been left out.

@FedeMPouzols
Copy link
Copy Markdown
Collaborator

Related to #346?

@sjperkins
Copy link
Copy Markdown
Collaborator Author

Related to #346?

Yes, I've updated the original comment.

@Jan-Willem Jan-Willem requested a review from Copilot September 4, 2025 14:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the flag array data types to support unsigned integer types in addition to boolean values. This enables the use of flag arrays where different bits represent different flag categories, similar to the MSv2 FLAG_CATEGORY concept.

  • Extended FlagArray type annotation to include numpy unsigned integer types (uint8, uint16, uint32, uint64)
  • Updated JSON schemas for both VisibilityXds and SpectrumXds to support the corresponding numpy dtypes

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/xradio/measurement_set/schema.py Updates FlagArray type annotation to include unsigned integer types
schemas/VisibilityXds.json Adds unsigned integer dtypes to flag array schema definition
schemas/SpectrumXds.json Adds unsigned integer dtypes to flag array schema definition

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sjperkins
Copy link
Copy Markdown
Collaborator Author

Have been pushing to origin rather than my fork, which has been confusing for github actions. I think it make sense to favour changes made on my fork.

@sjperkins
Copy link
Copy Markdown
Collaborator Author

I think I've cancelled most of the superfluous actions (still getting used to he amount of runners and time this takes), but I'll bump this PR tomorrow morning GMT+2 once #477 has finished running

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@Jan-Willem Jan-Willem merged commit f1a96c3 into casangi:main Sep 12, 2025
16 checks passed
@sjperkins sjperkins deleted the support-integer-flag-arrays branch September 24, 2025 08:29
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.

Flag format: uint8 vs bool

4 participants