Skip to content
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

Flipped Syngine R-component seismogram by ForceSource? #82

Open
NickJi98 opened this issue Jul 11, 2021 · 6 comments
Open

Flipped Syngine R-component seismogram by ForceSource? #82

NickJi98 opened this issue Jul 11, 2021 · 6 comments

Comments

@NickJi98
Copy link

Hello,

Recently I attempted to benchmark Instaseis results with normal modes (MINOS) and SPECFEM3D. For the force source, I noticed that the R-components seem to be flipped for seismograms downloaded with Syngine. This phenomenon did not appear for a moment tensor source though. I put detailed descriptions below in the PDF file.

Just a minor issue, and I would like to check if there would be a bug related with the sign.

Issue.pdf

@martinvandriel
Copy link
Collaborator

Hi,

you are probably right, here is a comparison between E and R component in a setting where I would expect them to be equal and with positive onset. So it seems E and N are probably correct as these are what we benchmarked previously and the issue is with R only.

Thanks for reporting, would be happy to get an MR on this.

Cheers,
Martin

import matplotlib.pyplot as plt
import numpy as np

import instaseis

receiver = instaseis.Receiver(latitude=0., longitude=20.)
source = instaseis.ForceSource(latitude=0., longitude=0.0, depth_in_m=0.,
                               f_r=-1e15, f_t=0., f_p=0.)

db = instaseis.open_db('db')

print(db)
components = 'ZRE'
st = db.get_seismograms(source=source, receiver=receiver,
                        components=components)

print(st)
for c in components:
    tr = st.select(channel=f"*{c}")[0]
    plt.plot(tr.times(), tr.data, label=c)

plt.legend()
plt.show()

image

@NickJi98
Copy link
Author

The example is intuitive. Many thanks for this quick clarification!

@qnishida
Copy link

qnishida commented Dec 3, 2022

I faced the same problem. To check the consistency of the moment tensor response of instaseis and the single force Green's function of instaseis, I synthesized a moment tensor response from the single force Green's function numerically as follows.

  1. Calculate the numerical spatial derivative of the single force Green's function
  2. Integrate over time to obtain a response for a step function in time for the moment tensor response
  3. The attached figure shows the comparison. The waveforms in vertical components are almost identical, but the radial component seems to be flipped. I think that the sign should be consistent with each other.

For further reference.

@liamtoney
Copy link
Contributor

This is a duplicate of #77, I think.

@qnishida
Copy link

qnishida commented Jan 7, 2023

As you pointed out the two comments are almost the same. #77 compared the single force Green's function with those by difference code (Mineos). The above comment is a self-consistency check between instaseis' outputs. This is my first comment on GitHub issues, so please excuse any confusion in usage.

@liamtoney
Copy link
Contributor

This is my first comment on GitHub issues, so please excuse any confusion in usage.

Sorry, I was referring to the overall issue identified, not your specific comment.

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

No branches or pull requests

4 participants