Feat fdsn identfiers - #3781
Draft
ThomasLecocq wants to merge 6 commits into
Draft
Conversation
… object as virtual elements of ``channel`` (similar to ``component``) - already with st.select compatibility
ThomasLecocq
requested review from
d-chambers,
megies,
paitor and
trichter
as code owners
August 24, 2026 21:22
ThomasLecocq
marked this pull request as draft
August 27, 2026 11:08
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.
Make
Trace/StatsFDSN Source Identifier–nativeCloses part of #3559.
What this does
Makes the FDSN Source Identifier the internal channel identity of a
Trace,while keeping the SEED
channel(andNET.STA.LOC.CHA) fully working. A tracenow carries
network,station,location,band,sourceandsubsourceas its stored codes;
channelis a derived view over them.New API
stats.band,stats.source,stats.subsource— read/write on every trace.stats.sidandTrace.sid— the fullFDSN:…identifier (read/write).Stream.select(band=…, source=…, subsource=…, sid=…)— new selectors (wildcards supported).Stats.from_sid()/Stats.to_sid().Inventory.get_response()/get_channel_metadata()(and theNetworkequivalents) now accept a full Source Identifier as well as a SEED id.Backward compatibility
stats.channel,stats.component,Trace.id,Stream.select(channel=…)behave exactly as before on all existing data.channelis still present as a normalStatskey, sodict(stats),str.format(**stats), equality against a plain dict, and pickling are unchanged.Decisions worth noting
channelstays present and stored (as a derived mirror), never removed. This keepsstats.channelaccess working everywhere, which was the main compatibility concern raised in Stats: How to facilitate FDSN Source Identifier? #3559 — and rules out the alternative designs that either dropchannelin one mode or change the type ofstats.channel="Z"still givescomponent="Z", preserving behaviour for SOH / single-letter channels.Trace.idstays SEED-shaped for compatibility;Trace.sidis the unambiguous identifier.Internal changes
channelby position (channel[0],channel[-1],channel[:-1], …) now uses the named codes, so it is correct for multi-character codes. Migrated:io/sh,io/gcf,io/rg16,io/xseed,signal/polarization, and stream rotation/merging.Tests
Not included / follow-up
WaveformStreamIDin QuakeML) is not yet Source Identifier–aware. Picks and arrivals still carry only NSLC. This is independent of the waveform side and does not affect anything here; it is left for a follow-up PR.Feedback wanted
Trace.idstays SEED-shaped withTrace.sidadded).AI used?
The Claude was used heavily
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