Skip to content

Add VDS generation #85

@GDYendell

Description

@GDYendell

The driver should create a VDS to interleave frames from the underlying files of an acquisition.

This can be done with h5py:

This must take account of the block_size (batch size to round-robin) and blocks_per_file (blocks to write before closing file and starting a new one) used for the acquisition. The example assumes it is 1000 and 0 (infinite).

My initial idea for where this is done is at the end of in EigerOdinController.start_writing. The creation should be pretty quick, so it may not be an issue to just call it synchronously before returning. h5py is not async, but it could potentially spawn a task so that the start_writing command can return to allow clients to continue logic and block the event loop when it gets to that task.

This will quite likely be pulled out of fastcs-eiger and into fastcs-odin or even fastcs at some point. This should be kept in mind when designing the API and if this implementation does seem eiger specific this should be noted for future planning.

It could probably be a pure function:

def create_interleave_vds(path: str, frame_count: int, frames_per_block: int, blocks_per_file: int) -> None:

This function can calculate what files should exist based on these parameters. They don't have to exist at the time of creating the VDS, so this should not assert the files exist to allow it to be called during or even before the file writing.

Acceptance Criteria

  • <acquisition_id>.h5 is created with a "data" dataset interleaving the "data" datasets from the <acquisition_id>_000001.h5, 000002 etc. files
  • An attribute is added to enable/disable the VDS creation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions