-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scamp
offline mode doesn't provide origins to amplitude processors
#65
Comments
acarapetis
changed the title
Sep 4, 2023
scamp
offline mode processes amplitudes without originsscamp
offline mode doesn't provide origins to amplitude processors
Thank you, I can confirm the bug and a fix is currently in testing. If you want you can test the following fix yourself and report back: diff --git a/apps/processing/scamp/amptool.cpp b/apps/processing/scamp/amptool.cpp
index 57cc45bed..fad7f4ec9 100644
--- a/apps/processing/scamp/amptool.cpp
+++ b/apps/processing/scamp/amptool.cpp
@@ -846,14 +846,15 @@ void AmpTool::process(Origin *origin, Pick *pickInput) {
proc->setReferencingPickID(pickID);
int res = -1;
- if ( pick ) {
+ if ( origin ) {
+ res = addProcessor(proc.get(), origin, pick.get(), distance, depth, (double) origin->time().value());
+ }
+ else {
SC_FMT_DEBUG("Measuring {} amplitude for pick {} independent of origin",
ait->c_str(), pick->publicID().c_str());
res = addProcessor(proc.get(), nullptr, pick.get(), None, None, None);
}
- else {
- res = addProcessor(proc.get(), origin, pick.get(), distance, depth, (double) origin->time().value());
- }
+
if ( res < 0 ) {
// RecordStream not available
if ( res == -2 ) { |
^ can confirm that fixes the issue in 5.5.0. scamp now generates and stores amplitudes via offline processing and scmag reads these properly. thanks both! |
Fixed in 5.5.5. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prior to 5.5.0,
scamp --ep ...
would provide hypocenters toAmplitudeProcessor::setEnvironment()
. It seems that when the--picks
option was introduced, the behaviour changed so thatsetEnvironment
is now never passed a hypocenter, even when--picks
is disabled.I think the culprit is setting
pick
here: https://github.com/SeisComP/main/blob/master/apps/processing/scamp/amptool.cpp#L741This means the
if (pick)
here will always be true: https://github.com/SeisComP/main/blob/master/apps/processing/scamp/amptool.cpp#L849The text was updated successfully, but these errors were encountered: