SeismicSource/sourcespec

Possible new features: run_id and P wave_type

krisvanneste opened this issue · 4 comments

Hi Claudio,

I have cloned sourcespec and added a new branch 'rob' (acronym for Royal Observatory of Belgium), where I added two new features:

  • run_id: this is a string used to discern different runs for the same earthquake. It is appended to the output folder and written as an additional column in the SQLite database. This allows running sourcespec with different settings without overwriting the corresponding results. Currently, I just check if the config object that is passed around in sourcespec contains this attribute, but it should probably also be added to sourcespec.conf.
  • wave_type=P: I'm not sure why it is not possible to use P-wave spectra to determine moment magnitude in sourcespec, but it turns out it is not too difficult to implement this. It required adding a 'rpp' configuration parameter (average P-wave radiation coefficient) to sourcespec.conf. Note that I only checked the code involved in source_spec (not source_model or source_residuals). I tested two events and obtained similar results using P and SH waves.

If you would be interested in these modifications, you can examine them on our gitlab server: https://gitlab-as.oma.be/kris/sourcespec
Don't hesitate to contact me if you have questions,
Kris

Hi Kris,
that looks very interesting!

  • run_id : good idea! It would be useful to have this parameter passed as a command line argument (-r, --run-id). We should add a warning, in any case, if source_spec tries to overwrite an existing directory.
  • wave_type=P : super! I always wanted to add this, so I'm really curious to see the results. Ok for implementing it, and if you can provide an example for the test runs that would be great!

So, whenever you feel ready, please submit two pull requests (one for each feature). Please note that I added quite a number of commits in the recent days, since I'm about releasing v1.6.

Claudio,

Thanks, I will try to make separate branches for the two features and see how submitting a pull request works.

Kris

I have prepared the two pull requests. They should be compatible with the most recent changes in master.

Closing this one, since it is resolved by #6 and #9.