feat: add support for user-defined custom metadata from ND acquisition - #300
Open
jmarkow wants to merge 6 commits into
Open
feat: add support for user-defined custom metadata from ND acquisition#300jmarkow wants to merge 6 commits into
jmarkow wants to merge 6 commits into
Conversation
jmarkow
marked this pull request as ready for review
July 13, 2026 17:25
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (54.54%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
==========================================
- Coverage 93.63% 89.83% -3.81%
==========================================
Files 22 22
Lines 2607 2616 +9
==========================================
- Hits 2441 2350 -91
- Misses 166 266 +100 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are using custom metadata when acquiring data via ND acquisition in Nikon Elements (AR 6.02.01 64-bit). We could not find the metadata in any of the commonly used metadata fields in ND2File. After poking around, we found the metadata lived in
CustomData|CustomDescriptionV1_0!. Usingjson_from_clx_lite_variantwithout modification only loaded in a subset of the metadata. This turned out to be due to keys getting clobbered by https://github.com/tlambert03/nd2/blob/main/src/nd2/_parse/_clx_lite.py#L234 . This PR includes a minimal set of changes to safely load in custom metadata under thecustom_metadatafield. We also included an opt-in modification to the clx parser to prevent keys from getting clobbered.Let us know if you need anything else here.