Skip to content

Conversation

@jacob720
Copy link

@jacob720 jacob720 commented Feb 10, 2026

@jacob720 jacob720 marked this pull request as draft February 10, 2026 10:15
@jacob720 jacob720 force-pushed the 85_add_vds_generation branch from d1684f5 to 371e9a0 Compare February 10, 2026 10:17
@jacob720 jacob720 changed the base branch from main to top-level-attributes February 10, 2026 13:06
bit_depth_image: AttrR[int]
compression: AttrRW[str]
trigger_mode: AttrR[str]
nimages: AttrR[int]
Copy link
Author

Choose a reason for hiding this comment

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

May be better to get this out of OD.FP.frames?

Copy link
Contributor

@GDYendell GDYendell left a comment

Choose a reason for hiding this comment

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

This looks pretty good! Something I should have mentioned is that we need to create multiple virtual datasets. This should be easy enough, it will just need a bit of re-ordering to avoid repeating the calculations.

I think there should be a for loop over dataset_names (now passed in) inside the with File block where all creation of v_source and v_layout is done, with pre-computation of frame layouts done before if possible.

create_interleave_vds(
path=Path(self.OD.file_path.get()),
prefix=self.OD.file_prefix.get(),
frame_count=self.detector.nimages.get(),
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be OD.FP.frames

prefix=self.OD.file_prefix.get(),
frame_count=self.detector.nimages.get(),
frames_per_block=self.OD.block_size.get(),
blocks_per_file=self.OD.FP.process_blocks_per_file.get(),
Copy link
Contributor

Choose a reason for hiding this comment

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

process_blocks_per_file needs adding to the EigerFrameProcessorPlugin

Copy link
Author

Choose a reason for hiding this comment

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

DiamondLightSource/fastcs-odin#98
Have added this and the other attributes here

frame_shape=(
self.detector.x_pixels_in_detector.get(),
self.detector.y_pixels_in_detector.get(),
),
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be OD.FP.data_dims_0/1. These probably don't change if it is in ROI mode.

dtype=dtype,
)

for file_writer_idx, n_frames in enumerate(frame_count_per_file_writer):
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure that you need to iterate over file writer index and then its local file
index. I think it should just iterate over the global file index and the number of writers
only affects the stride of the layout slice.

Copy link
Author

@jacob720 jacob720 Feb 12, 2026

Choose a reason for hiding this comment

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

I think when calculating the frame distribution, it is useful to iterate over the file writer index, as the total number of files is dependant on the number of file writers, the frame count and block size. And for each file, knowing which file writer wrote it and the number of writers is needed to calculate the start value.

@jacob720 jacob720 requested a review from GDYendell February 12, 2026 17:08
@jacob720
Copy link
Author

Where can I get the dataset names from? Couldn't find them anywhere in the Phoebus screens but I probably missed them

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.72%. Comparing base (1979b0c) to head (9e7fd1a).

Files with missing lines Patch % Lines
...cs_eiger/controllers/odin/eiger_odin_controller.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##           top-level-attributes      #86      +/-   ##
========================================================
+ Coverage                 82.00%   83.72%   +1.72%     
========================================================
  Files                        14       15       +1     
  Lines                       450      510      +60     
========================================================
+ Hits                        369      427      +58     
- Misses                       81       83       +2     

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

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.

Add VDS generation

2 participants