Support integer types in flag arrays#475
Conversation
|
Related to #346? |
Yes, I've updated the original comment. |
There was a problem hiding this comment.
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.
|
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. |
|
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 |
This reverts commit 314bbfd.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.