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

Upgraded metadata lookup for backwards compatibility, added option to input metadata manually #179

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

Conversation

PriyankaKetkarBNL
Copy link
Collaborator

Addresses issue #178.

mdLookup dictionary was updated so that beamline metaddata key names can be entered as a list instead of single value (or two values in the case of secondary_lookup table). Sets up infrastructure for backwards compatibility with respect to key names used historically at the beamline. secondary_lookup dictionary was removed, as all historical key names are consolidated into mdLookup. These changes were propagated to the code where Tiled is searched for metadata keys as well as in the construction of reverse lookup table (reverse_lut) in loadRun. These changes were tested for scan IDs 92849, 93065, and 91175, which include scans from before and after the beamline codebase upgrades in January 2025.

Loader = phs.load.SST1RSoXSDB(corr_mode="none")

scanID = 92849 ## Count scan with 50 repeats at constant energy and polarization
#scanID = 93065 ## RSoXS energy scan with 1 repeat post-January 2025
#scanID = 91175 ## RSoXS energy scan with 1 repeat December 2024

scan = Loader.loadRun(scanID, dims=["time", "energy", "polarization"]).unstack('system')
scan

Additionally, mdManual input was added into loadRun function so that metadata values can be entered manually in case they were not originally written out with the scan. My understanding is that the current coords input cannot take more qualitative single-value entries (e.g., {"sample_notes": "details"}) that are meant to be stored in attrs. If it makes sense, I could think of how to consolidate these two inputs.

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.

loadRun is not working for 2025-1 cycle scans due to beamline codebase refactoring.
1 participant