Reset stats.calib after applying calibration - #3717
Open
zacherle wants to merge 5 commits into
Open
Conversation
zacherle
added a commit
to zacherle/obspy
that referenced
this pull request
Mar 25, 2026
Modify Stream.read, Trace.remove_sensitivity, and Trace.remove_response so that the 'stats.calib' value is automatically reset to 1.0 after each conversion of Trace object data to physical units.
zacherle
force-pushed
the
feat_reset_calib
branch
from
August 2, 2026 17:07
5e31ca2 to
b919e5e
Compare
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.
What does this PR do?
Modify
Stream.read(),Trace.remove_sensitivity(), andTrace.remove_response()to automatically reset
stats.calibto 1.0 after every Trace object data conversion to physical units.This ensures that the
stats.calibattribute remains consistent withthe actual data values in
Trace.dataafter applying calibration andremoving sensitivity or response. This change will help prevent incorrect
scaling in future operations, such as plotting or further processing.
Links to other Issues?
RESOLVES: #3715
This will help resolve open issues #3453 and #2935
AI used?
I am learning to use Copilot as a plugin in the vim editor.
PR Checklist
masterfor new features,maintenance_?.?.xfor bug fixesCHANGELOG.txt(only obsolete if fixing a bug introduced after the last release)ready for reviewlabel when you the PR is ready to be reviewed