kasra-hosseini / obspyDMT

A Python toolbox for the query, retrieval, processing and management of seismological data sets, including very large, heterogeneous and/or dynamically growing ones.
http://kasra-hosseini.github.io/obspyDMT/
Other
89 stars 58 forks source link

Syngine Moment Tensor #33

Open sstaehler opened 7 years ago

sstaehler commented 7 years ago

Thanks for the fantastic code!

One question: How can I learn which source parameters were used to get the Syngine waveforms? As I understand https://github.com/kasra-hosseini/obspyDMT/blob/f075be16f327315ad46ca09f367d46b8b122ca48/obspyDMT/utils/data_handler.py#L361, the code uses an explosion source, if not moment tensor is present in the retrieved event. But is this logged somewhere? The synthetics I get, sure look a lot like a explosion source. Also, can I override this somehow?

kasra-hosseini commented 7 years ago

@sstaehler Thanks for your kind comment.

Regarding your questions: if a moment tensor is not present, the code uses the default value for the moment-tensor in the obspy syngine client which is, as you said, explosion. However, maybe it is better to specify the explosion moment tensor in the code, rather than leave it to the default values of obspy? In other words, replace:

syngine_momenttensor = None

with:

syngine_momenttensor = [1E19, 1E19, 1E19, 0, 0, 0]

to be more verbose. what do you think?

About the other point: "can I override this somehow?". One way to do this is via catalog.txt. Please refer to Read an existing local event catalog sub-section in:

https://github.com/kasra-hosseini/obspyDMT#supported-event-catalogs-and-data-centers

Maybe we should also have a flag like --syngine_moment_tensor? If it is specified, obspyDMT uses these values instead. Maybe also --syngine_depth_in_km...

sstaehler commented 7 years ago

@kasra-hosseini Thanks for the explanation! So basically, I need to fill a catalog.txt file myself? Is there an event catalog from which moment tensors can be downloaded or is automated downloading still a problem?

I would maybe even suggest to throw an error, if the user tries to get syngine waveforms if no moment tensor is present, since it can be rather misleading to get explosion ones.

sstaehler commented 7 years ago

Maybe we should also have a flag like --syngine_moment_tensor? If it is specified, obspyDMT uses these values instead. Maybe also --syngine_depth_in_km...

That could be a solution, but of course it would not work for multiple events.

kasra-hosseini commented 7 years ago

@sstaehler: Currently, there are two event catalogs from which moment tensor solutions can be downloaded: NEIC_USGS and GCMT_COMBO. In either case, syngine seismograms are downloaded based on the moment tensor solutions in these catalogs, and not by assuming an explosion source or so. There is one example for this here:

https://github.com/kasra-hosseini/obspyDMT#synthetic-seismograms

If you try the following command:

obspyDMT --datapath data_fiji_island --min_mag 6.8 --min_date 2014-07-21 --max_date 2014-07-22 --event_catalog NEIC_USGS --data_source IRIS --min_azi 50 --max_azi 55 --min_epi 94 --max_epi 100 --cha BHZ --instrument_correction --syngine --syngine_bg_model iasp91_2s

and check:

/data_fiji_island/EVENTS-INFO/catalog.txt

You can find the event information and/or using catalog.ml file (QuakeML). Moreover:

/data_fiji_island/20140721_145441.a/info/event.pkl

contains the event information including moment tensor.

I would maybe even suggest to throw an error, if the user tries to get syngine waveforms if no moment tensor is present, since it can be rather misleading to get explosion ones.

  • That makes sense. Another way would be to give a clear warning message at the beginning...I will think about this, but thanks for reporting this.

That could be a solution, but of course it would not work for multiple events.

  • Yes, that would only work for one event.

OK, I will then: