Skip to content

[scautopick] cannot process historical data (closed station)#124

Open
luca-s wants to merge 1 commit into
SeisComP:mainfrom
luca-s:patch-1
Open

[scautopick] cannot process historical data (closed station)#124
luca-s wants to merge 1 commit into
SeisComP:mainfrom
luca-s:patch-1

Conversation

@luca-s

@luca-s luca-s commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Fix issue #123 : scautopick fails to detect picks on historical data. The issue happens if the station is closed and if the bindings do not provide a fixed channel (detectStream contains 2 characters, so it relies on SeisComP to find the vertical component) and the sensor doesn't have a Z component.

@cla-bot cla-bot Bot added the cla-signed The CLA has been signed by all contributors label Jun 5, 2026
@luca-s

luca-s commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

A couple of comments.

  1. Since I moved the scanning of epochs before the selection of the detection channel, the logs order has changed (just logs, no change in behaviour). Previously you would see something like this:
12:04:37 [info] Adding detection channel 8R.F2901..KPZ
12:04:37 [debug] Adding data channel 8R.F2901..KP1
12:04:37 [debug] Adding data channel 8R.F2901..KP2

Now you get the following instead:

12:05:50 [debug] Adding data channel 8R.F1901..KP1
12:05:50 [debug] Adding data channel 8R.F1901..KP2
12:05:50 [debug] Adding data channel 8R.F1901..KPZ
12:05:50 [info] Adding detection channel 8R.F1901..KPZ
  1. Also I did quite some refactoring. If you prefer me to minimize the changes and avoid refactoring, just let me know and I will update the PR by removing the following part.
		const string& cfgNet = it->first.first;
		const string& cfgSta = it->first.second;
		const string& cfgLoc = it->second.locationCode;
		const string& cfgCha = it->second.channel;

		auto addDataChannel = 
			[this, cfgNet, cfgSta, cfgLoc, &subscribeStreams](const string & cha) {
				string streamID = cfgNet + "." + cfgSta + "." + cfgLoc + "." + cha;
				if ( subscribeStreams.find(streamID) == subscribeStreams.end() ) {
					SEISCOMP_DEBUG("Adding data channel %s", streamID.c_str());
					recordStream()->addStream(cfgNet, cfgSta, cfgLoc, cha);
					subscribeStreams.insert(streamID);
				}
		};

Fix bug where scautopick fails to detect picks on historical data: the issue happens if the station is closed and if the bindings do not provide a fixed channel (detectStream contains 2 characters, so it relies on SeisComP to find the vertical component) and the sensor doesn't have a Z component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed by all contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant