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

Using both HN? and BH? components for a single station #246

Open
ammcpherson opened this issue Jan 30, 2024 · 2 comments
Open

Using both HN? and BH? components for a single station #246

ammcpherson opened this issue Jan 30, 2024 · 2 comments

Comments

@ammcpherson
Copy link
Member

A somewhat niche case, but recently I was trying to use both the broadband components and the strong motion data from 2 stations, and discovered that MTUQ cannot handle this. I get the following error where both types of traces are present in my data directory:

Traceback (most recent call last): File "run_mtuq.py", line 179, in <module> data = read(path_data, File "/home/ammcpherson/REPOSITORIES/mtuq/mtuq/__init__.py", line 86, in read return _readers()[format](path, **kwargs) File "/home/ammcpherson/REPOSITORIES/mtuq/mtuq/io/readers/SAC.py", line 73, in read check_components(stream) File "/home/ammcpherson/REPOSITORIES/mtuq/mtuq/util/signal.py", line 212, in check_components raise Exception('Multiple %s components in stream' % component) Exception: Multiple R components in stream

It would be nice if MTUQ could handle this in a similar vein to how it handles multiple location codes, and use both the strong motion and broadband data in the inversion.

@ammcpherson ammcpherson changed the title Using both HN* and BH* components for a single station Using both HN? and BH? components for a single station Jan 30, 2024
@rmodrak
Copy link
Member

rmodrak commented Feb 2, 2024

Did you try commenting out check_components by chance? It's possible though the runtime error just gets deferred. It could be the reason for check_components in the first place is that the misfit function is just not currently able to handle multiple components of the same type?

@ammcpherson
Copy link
Member Author

Hi @rmodrak,

Sorry for the long time between responses. I'm coming back to this now.

I just commented out check_components in /mtuq/io/readers/SAC.py and MTUQ no longer crashes. However, this does not produce the desired waveform plots either:
Screen Shot 2024-02-28 at 11 13 48
The station in the red box are the stations for which we have both broadband and strong motion data. We'd like them to be both plotted in a similar manner to the stations in the blue box, for which we have 2 separate location codes for the same physical location

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

2 participants