uafgeotools / mtuq

moment tensor uncertainty quantification
BSD 2-Clause "Simplified" License
65 stars 22 forks source link

Modified attribute utility function in annotations #244

Closed thurinj closed 5 months ago

thurinj commented 5 months ago

The utility function that reads attributes to be plotted as annotations by the waveform plot has been modified to check if trace.attrs.static_time_shift or trace.static_time_shift exist.

trace.static_time_shift is set as trace attribute by ProcessData() during the pre-processing stage, and it was not correctly checked by the current function. After this fix, the annotations correctly account for static correction being applied to the synthetics (tested on 2009 example case).

Alternative solution: Make ProcessData() allocate the static_time_shift directly in trace.attrs, if we want to keep all plotting attributes grouped within a single group. This might not be completely straightforward depending on the list of all attributes that are allocated in attrs by the code (do we need several attributes groups?).

rmodrak commented 5 months ago

Julien, Thanks for these changes-- let me respond in detail this afternoon.

rmodrak commented 5 months ago

| Alternative solution: Make ProcessData() allocate the static_time_shift directly in trace.attrs

vote for this solution, so that statics get included when Amanda or I write out attrs to a dictionary

thurinj commented 5 months ago

This has been addressed by @rmodrak latest PR.