org-arl / arlpy

ARL Python Tools
BSD 3-Clause "New" or "Revised" License
119 stars 37 forks source link

Incorrect amplitude showing in plot_arrivals() #15

Closed rigelifland closed 5 years ago

rigelifland commented 5 years ago

The amplitude is calculated: y = np.abs(arrival_amplitude), but abs takes the magnitude of the complex arrival_amplitude. It should only be using the real part of the amplitude as the complex portion discribes the phase: y = np.abs(np.real(arrival_amplitude))

mchitre commented 5 years ago

I'm not sure I understand what you mean. The magnitude of the complex number is the amplitude, and the angle of the complex number is the phase. So np.abs(arrival_amplitude) should be giving you the correct magnitude.

rigelifland commented 5 years ago

Yes, of course. I got embarassingly confused about this.

mchitre commented 5 years ago

No worries, thanks!