Repository navigation
feat!: Sample.elements, metadata groups and segment times of Velox single spectra - #44
Merged
Merged
Conversation
…s of Velox single spectra VeloxSpectrumSignals maps Sample.elements as HyperSpy sets it when it applies RosettaSciIO's _convert_element_list (the first of DictionaryTreeBrowser's sorted, slugified keys; atomic_number2name 1 to 119), parses Displays, Operations, SharedProperties and Features as read_file does, and refuses the read wherever RosettaSciIO or HyperSpy raises (int(version) included). FormatoValue gains a .texts([String]) case for the list. VeloxEMDReader.spectrumMetadata() and VeloxMetadata.binaryResultSegmentTimes give each spectrum's live and real times as Velox 4 to 13 store them in Detectors. FormatoLoader.load keeps the images of a file whose spectra are refused. Pinned by tools/velox-elements/pins.py (planted and public). Migration: an exhaustive switch over FormatoValue needs a .texts arm (or default). Done: issue 10 item 2 (single spectra). Next: item 3 (partial PixelSize/Offset, detector name, Ceta date) and item 4 (camera pixel pitch). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Requested by Paul · project thread
Part of #10 (item 2 of the 29 Oct plan). Independent of #43 (item 1). Still open from #10:
PixelSize/Offset, detector name and Ceta date, re-measured against RosettaSciIO on the real files first;Detectors.*carries onlyBinning), and RosettaSciIO maps DM'sAcquisition.Device.CCD.Pixel Size (um)for CL signals only, so item 4 needs a file that states it before a field is added.What changes
VeloxSpectrumSignalsmapsSample.elementsas HyperSpy sets it when it applies RosettaSciIO's_convert_element_list(d.keys()[0]on HyperSpy'sDictionaryTreeBrowser: the first of the sorted, slugified keys;atomic_number2name1 to 119;SharedProperties/EDSSpectrumQuantificationSettingsfrom version 11,Operations/ImageQuantificationOperationbefore).Displays,Operations,SharedProperties,Features) are parsed asread_fileparses them (shared withVeloxTitles); the read is refused wherever RosettaSciIO or HyperSpy raises,int(version)and theversionkey included.FormatoValue.texts([String])holds the list (with atextsaccessor).VeloxEMDReader.spectrumMetadata()andVeloxMetadata.binaryResultSegmentTimes: each spectrum's live and real time as Velox 4 to 13 store them per segment inDetectors(RosettaSciIO maps onlyDetectorMetadata.*, which no public spectrum holds). Not in the signals' metadata, which stays RosettaSciIO's.FormatoLoader.loadkeeps a Velox file's images when its spectra are refused (as it already does for spectrum images).docs/parity.mdanddocs/open-items.mdupdated, with the deviations left.Migration
An exhaustive
switchoverFormatoValueneeds a.textsarm (ordefault). The suite's apps have none.Tests
tools/velox-elements/pins.py: 20 planted files, read by RosettaSciIO 049e7d70 with the mapping applied by HyperSpy 2.4.0's ownDictionaryTreeBrowser, plus the public files (Test SI 16x16 215 kx.emdgives["C", "O", "Ca", "Cu"], as RosettaSciIO's own test).VeloxSpectrumElementsTests: the elements exact or the refusal (unsupported, "RosettaSciIO raises") for every file, a case whose slugified order differs from the raw order, aslugifytable checked against HyperSpy, the segment times to the bit, and the public files when unzipped.swift test -c release --parallel --skip FormatoKitParityTests: green, except the HDF5 exit-barrier test, which needsFORMATO_HDF5_PATHfromtools/test.sh(environment, not this change)._-prefixed keys, duplicate slugs refused, HDF5 errors no longer hidden inspectrumMetadata(), docs.🤖 Generated with Claude Code