Conversation
Stream-data acquisitions now write a `<timestamp>_tune.txt` companion file alongside `<timestamp>.dat`, recording the absolute path of the tune file in use at the moment streaming started (or `None` if no tune has been loaded). This resolves the longstanding ambiguity where a data file's matching tune cannot be inferred from `last_tune()` once a user has `load_tune()`'d an older tune.
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.
Summary
Closes #52.
Stream-data acquisitions now write a
<timestamp>_tune.txtcompanion file alongside<timestamp>.datinoutput_dir, recording the absolute path of the tune file in use at the moment streaming started (orNoneif no tune has been loaded in the session). This resolves the longstanding ambiguity where the matching tune for a given.datcannot be inferred fromlast_tune()once a user hasload_tune()'d an older tune.The new file follows the existing
_mask.txt/_freq.txtcompanion-file pattern instream_data_on()and is registered with the publisher as atune_linkartifact (distinct from the'tune'type registered bysave_tune, so downstream consumers can tell the two apart).self.tune_file, which is set by bothsave_tune(smurf_tune.py:4250) andload_tune(smurf_tune.py:4298). Falls back toNoneviagetattrif no tune has been touched yet.stream_data_on(). No public API change, no behavior change to existing callers.Test plan
flake8 --count python/— 0 errors (matches CI)S.load_tune(<old_tune>); S.take_stream_data(1)and confirm<output_dir>/<timestamp>_tune.txtcontains the loaded path, not whatlast_tune()would returntake_stream_datawith no tune ever loaded; confirm the file is written and containsNonetune_linkregistration alongsidemaskanddata