Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reset stats.calib after applying calibration - #3717

Open
zacherle wants to merge 5 commits into
obspy:masterfrom
zacherle:feat_reset_calib
Open

Reset stats.calib after applying calibration#3717
zacherle wants to merge 5 commits into
obspy:masterfrom
zacherle:feat_reset_calib

Conversation

@zacherle

@zacherle zacherle commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Modify Stream.read(), Trace.remove_sensitivity(), and Trace.remove_response()
to automatically reset stats.calib to 1.0 after every Trace object data conversion to physical units.

This ensures that the stats.calib attribute remains consistent with
the actual data values in Trace.data after applying calibration and
removing 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

  • Correct base branch selected? master for new features, maintenance_?.?.x for bug fixes
  • Tests: Added new tests for any new features or fixed regressions
  • Changelog: Added a short note in CHANGELOG.txt (only obsolete if fixing a bug introduced after the last release)
  • Add the yellow ready for review label when you the PR is ready to be reviewed

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.
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.

Reset 'stats.calib' to 1.0 after applying calibration or removing response

1 participant