Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signed floats cbf #534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maggie-klureza
Copy link

Currently, FabIO does not recognize signed floats as valid data type for .cbf files, only integers. However, floats are a legitimate possibility for the CBF standard, so I have added two lines to DATA_TYPES to accommodate this.

Added signed 32-bit floats (32-bit real IEEE) and signed 64-bit floats (64-bit real IEEE) as valid data types for arrays in cbf files
Added two missing commas to prior commit
@kif
Copy link
Member

kif commented Jun 29, 2023

I am not sure this is enough: yes float CBF are possible but we have been focusing on files produced by Pilatus detectors.
One would need in addition to have the different compression schemes as described in https://www.iucr.org/__data/iucr/cif/software/cbflib/CBFlib_0.7.9/doc/CBFlib.html
Also, in the conversion between formats, CBF is a format declared accepting only integers:
https://github.com/silx-kit/fabio/blob/main/src/fabio/converters.py#L63

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.

2 participants