Open mikehagerty opened 1 year ago
Mike,
Thanks for your careful attention. Your report matches my recollection of an issue from 2021/early 2022, when we began switching to PyGMT and encountered many bugs and regressions.
A couple things that seem relevant:
plot_beachball
, which makes the code fragilepspolar
-- the function actually responsible for plotting station locations relative to beachball first motionspspolar
executableFrom experimenting just now with different MTUQ versions:
Could others please comment on/confirm the above?
thanks, Ryan
Now zeroing in a bit more, I believe the 180 degree rotation occurred starting with the following commit: 2c66213
@thurinj-- I think you may have a better grasp. Could you please double check, as well as comment about @mikehagerty 's overall issue, which seems very thoughtful and plausible? I just noticed that the MTUQ version Mike mentioned (0.2.0) is the up to date version, which I misunderstood in the last post.
Hi. Thanks for your replies. In the past I've tried to use pyGMT in my own applications but I've run into bugs and abandoned it. However, I did debug the beachball plots a bit -- I made it use _plot_beachball_pygmt vs _plot_beachball_gmt -- and the results were identical, so no issue there.
I'm trying to follow along with last year's virtual workshop on youtube. On day 1 at [1:13:52] Felix shows the beachball.png produced by the GridSearch.DoubleCouple example.
My results - waveform fits, misfit contours, solution s,d,r - are identical to what he shows, except the station triangles/names plotted on the beachball look rotated by 180 deg. e.g., the beachball is the same but the station azimuths are totally different. For instance, you have TRF plotting at 353 deg (towards north) and mine is rotated to the south.
I thought maybe this could be an upper/lower hemisphere focal mechanism thing, since the upper hemisphere plot is rotated 180deg from the lower hemisphere plot, but as I say, only the station locations (azimuths) are rotated, not the fault planes, so that doesn't make sense.
After some debugging ... I think you might have an error in your example. For instance, here is the tmp station file that polar1 plots:
TRF has an azimuth of 353 but a takeoff angle of 93 which is > 90. so in fact, in the lower hemisphere plot, it is an upgoing ray and should plot 180 deg. away from the azimuth(or towards the south) as it does in my plot (see attached).
I don't think I have a way to know the takeoff angles you used, so maybe in a different velocity model it was < 90. for TRF ?
Thanks! -Mike
Versions: python: 3.11.0 mtuq: 0.2.0 pygmt: 0.8.0