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

Allow more channels in metadata than in data #546

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

SeanLeRoy
Copy link
Collaborator

Description

In #532 Suraj has a use case for a file with more channels in the metadata than in the data. This becomes an issue for xarray since we give it coordinates for channels that don't exist. Instead, this will now report a warning and just use the first N channels up to the number of channels in the data.

Testing

Where I was previously unable to load the image provided in the issue, this now loads and reports the configured warning. Let me know if anyone feels this seems to warrant adding a test file and matching unit test.

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8c097bd) 93.99% compared to head (bec9ac1) 93.95%.
Report is 2 commits behind head on main.

Files Patch % Lines
aicsimageio/readers/czi_reader.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
- Coverage   93.99%   93.95%   -0.04%     
==========================================
  Files          53       53              
  Lines        4662     4665       +3     
==========================================
+ Hits         4382     4383       +1     
- Misses        280      282       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SeanLeRoy SeanLeRoy marked this pull request as ready for review November 20, 2023 21:37
Copy link
Collaborator

@toloudis toloudis left a comment

Choose a reason for hiding this comment

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

LGTM. I wonder how often this comes up in practice - if it is really frequent then the output warning may be a lot of noise.

@SeanLeRoy SeanLeRoy merged commit e5197d1 into main Nov 21, 2023
92 checks passed
@SeanLeRoy SeanLeRoy deleted the feature/support-more-channels-in-metadata-than-data branch November 21, 2023 18:44
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.

czi number of channels can be out of sync and is reported as error
4 participants