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

WIP: added novisim as metadata flag for h5 files #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

a-topic
Copy link
Collaborator

@a-topic a-topic commented Oct 25, 2024

This addition requires a test before merge!!!
Currently processing_steps/0100_cache_esrf2013.py and processing_steps/0200_generate_byte_hdf5.py can only be run using a special file located on James' ERDA directory.

This branch contains two simple additions, that need to be tested/verified:

  1. All h5 files have gotten an attribute at file-level called novisim. For h5 files that are not related to novisim, the attribute will have value 0, or otherwise 1. This avoids various checks in subsequent processing steps being hardcoded.
  2. In lib/py/esrf_read.py in the function esrf_edf_metadata(), there also seems to be an error in the string received for meta["ByteOrder"] which contains a whitespace and a semicolon. For now the quick fix was to strip the string and keep only the first part.

For h5 files that are not related to novisim, the attribute "novisim" will
have value 0, or otherwise 1. This avoids checks being hardcoding during
the processing steps.

There also seems to be an error in the string recieved for
meta["ByteOrder"] which contains a whitespace and a semicolon. For now
the quick fix was to strip the string and keep only the first part.
@a-topic a-topic requested a review from carljohnsen October 25, 2024 11:23
@a-topic a-topic marked this pull request as ready for review October 25, 2024 11:47
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