Skip to content

Inconsistent Parameter Saving Between .flt and .h5 #413

@abmajith

Description

@abmajith

HI @jonwright , @jadball

In the long term, we plan to support saving a list of parameters in both .flt and .h5 formats.
Ideally, these lists of parameters should remain consistent across both formats.

Currently, I noticed a difference in how parameters are saved:

The columnfile class's writefile method saves all attributes.
The colfile_to_hdf function mostly (or only) saves title attributes.

This causes an issue during indexing, where it expects to read the wavelength attribute from the loaded columnfile (from the .h5 file), but it isn't available, while using the function

venv/lib/python3.12/site-packages/ImageD11/indexing.py:292: in indexer_from_colfile_and_ucell
    w = float(colfile.parameters.get("wavelength"))

Would it be sufficient to work around this issue by relying solely on the .flt format using writefile and readfile methods?
Or do we need to extend the .h5 saving method to ensure it stores all attributes, similar to how .flt does?

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