Skip to content

Conversation

@yfukai
Copy link

@yfukai yfukai commented Jan 14, 2026

Link to Relevant Issue

This pull request (partly) resolves bioio-devs/bioio#172

Description of Changes

This is a draft implementation for frame_acquisition_times. Currently, it returns a list of dict as

[
      {
        "C": 0, "H": 0, "M": 0, "S": 0, "T": 0, "Z": 0,
        "acquisition_time": "2021-06-15T06:14:14.369569200"
      },
      ...
 ]

for the selected scene, but inputs are welcome! (Maybe we should pop "S" from the dict.)

@yfukai yfukai requested a review from a team as a code owner January 14, 2026 02:45
@yfukai yfukai marked this pull request as draft January 14, 2026 02:45
@yfukai
Copy link
Author

yfukai commented Jan 14, 2026

Cc: @BrianWhitneyAI
I'm looking forward to your feedback!

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 94.23077% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.05%. Comparing base (bd2bb45) to head (b55bb6e).
⚠️ Report is 166 commits behind head on main.

Files with missing lines Patch % Lines
bioio_czi/aicspylibczi_reader/subblock_metadata.py 76.92% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   86.97%   91.05%   +4.07%     
==========================================
  Files           6       16      +10     
  Lines         453     1006     +553     
==========================================
+ Hits          394      916     +522     
- Misses         59       90      +31     

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

czi = CziFile(open_resource.f)
return frame_acquisition_times(
czi=czi,
current_scene=self.current_scene_index,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double checking here, does the index always correlate to the correct scene identification? I remember some issues in different mappings.

Copy link
Author

Choose a reason for hiding this comment

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

I believe so, since similar logic is used in another place. (In both cases, eventually get_coords_from_kwargs is called.)

)
if acquisition_time is None:
continue
d = {**subblock_info, "acquisition_time": acquisition_time}
Copy link
Contributor

Choose a reason for hiding this comment

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

This format definitely needs to be documented, but that is less important in the current draft.

Copy link
Author

Choose a reason for hiding this comment

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

Right. This could be transformed into xarray, but not really straightforward without pandas.

Reader(uri, use_aicspylibczi=True)


@pytest.mark.parametrize(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the test suite needs some work (Understandably less important at this stage). I think that this current test is overly complex for the type of unit testing we would expect. I think that we could have two tests here.

  1. A test similar to this one but it makes direct assertions about the output acq time. This should be a test param for readability. I think we do something similar in our other standard metadata tests. We should include at least one param here that is none.

  2. A test asserting the difference in values across scene selection

Copy link
Author

Choose a reason for hiding this comment

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

Hi, thanks for your comment, I updated the tests!

Copy link
Author

@yfukai yfukai left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your comment @BrianWhitneyAI, I've updated the code.
We still need to decide on the returning data (list of dict or xarray).

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.

Feature request: add frame_acquisition_times to represent frame acquisition times

2 participants