Skip to content

[DataFile] Add support for older INDEX and METADATA versions

Philipp Schmidt requested to merge fix/datafile-old-index-format into master

Description

Alternative to https://git.xfel.eu/detectors/pycalibration/-/merge_requests/751.

This adds a new from_file= argument to DataFile.create_index to take timestamp, validity flag and origin potentially from an existing file. train_ids remains an explicit argument (could theoretically also be None and just take the entire file, but the rest of the API is not really suited for this use case) and is used to filter into the existing file.

@kluyvert Maybe we could introduce a comparable logic FileAccess already has for the validity flag for timestamps and origin?

How Has This Been Tested?

@ahmedk Could you please run this on the exact same file you originally did for https://git.xfel.eu/detectors/pycalibration/-/merge_requests/751?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Reviewers

@ahmedk

Edited by Philipp Schmidt

Merge request reports