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

Source id formatting as string #43

Open
alessandrothea opened this issue Apr 25, 2023 · 4 comments
Open

Source id formatting as string #43

alessandrothea opened this issue Apr 25, 2023 · 4 comments

Comments

@alessandrothea
Copy link
Contributor

alessandrothea commented Apr 25, 2023

The SourceID::to_string method formats the source id as a hex number.
What's the rationale for that? The source id doesn't seem to have any substructure that the hex representation makes easier to visualise, nor the id is expressed as an ex elsewhere (e.g. in the hardware map).

@alessandrothea
Copy link
Contributor Author

@bieryAtFnal Any insight?

@eflumerf
Copy link
Member

eflumerf commented May 2, 2023

I think it followed from the earlier element and link IDs which were also always expressed in hex. I think this is a fairly easy change to make, though it may have some knock-on effects in the HDF5 file format (if they're processing Source ID strings).

@bieryAtFnal
Copy link
Contributor

If we stop using hex, would the numeric values be zero-padded or simple numbers?
Like "Detector_Readout_5"?

I've only run a quick test so far, but some things "just work" with an unadorned decimal number. For example, I can run HDF5LIBS_TestDumpRecord on a file that has been written, and it decodes things correctly. Some of the data checks in the integration tests would need updating, though.

AND, we will certainly need to check with offline folks, before we change this. They may be using the hex digit for something, even though they don't need to ...

@alessandrothea
Copy link
Contributor Author

We could add some padding with zeroes to regularise the size of the field.

You're right about offline, although I hope they're not using it...

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

No branches or pull requests

3 participants